| 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.cloudresourcemanager.v1; | 3 library googleapis.cloudresourcemanager.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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 "POST", | 84 "POST", |
| 85 body: _body, | 85 body: _body, |
| 86 queryParams: _queryParams, | 86 queryParams: _queryParams, |
| 87 uploadOptions: _uploadOptions, | 87 uploadOptions: _uploadOptions, |
| 88 uploadMedia: _uploadMedia, | 88 uploadMedia: _uploadMedia, |
| 89 downloadOptions: _downloadOptions); | 89 downloadOptions: _downloadOptions); |
| 90 return _response.then((data) => new Empty.fromJson(data)); | 90 return _response.then((data) => new Empty.fromJson(data)); |
| 91 } | 91 } |
| 92 | 92 |
| 93 /** | 93 /** |
| 94 * Clears a `Policy` from a resource. | |
| 95 * | |
| 96 * [request] - The metadata request object. | |
| 97 * | |
| 98 * Request parameters: | |
| 99 * | |
| 100 * [resource] - Name of the resource for the `Policy` to clear. | |
| 101 * Value must have pattern "^folders/[^/]+$". | |
| 102 * | |
| 103 * Completes with a [Empty]. | |
| 104 * | |
| 105 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 106 * error. | |
| 107 * | |
| 108 * If the used [http.Client] completes with an error when making a REST call, | |
| 109 * this method will complete with the same error. | |
| 110 */ | |
| 111 async.Future<Empty> clearOrgPolicyV1(ClearOrgPolicyRequest request, core.Strin
g resource) { | |
| 112 var _url = null; | |
| 113 var _queryParams = new core.Map(); | |
| 114 var _uploadMedia = null; | |
| 115 var _uploadOptions = null; | |
| 116 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 117 var _body = null; | |
| 118 | |
| 119 if (request != null) { | |
| 120 _body = convert.JSON.encode((request).toJson()); | |
| 121 } | |
| 122 if (resource == null) { | |
| 123 throw new core.ArgumentError("Parameter resource is required."); | |
| 124 } | |
| 125 | |
| 126 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':clearO
rgPolicyV1'; | |
| 127 | |
| 128 var _response = _requester.request(_url, | |
| 129 "POST", | |
| 130 body: _body, | |
| 131 queryParams: _queryParams, | |
| 132 uploadOptions: _uploadOptions, | |
| 133 uploadMedia: _uploadMedia, | |
| 134 downloadOptions: _downloadOptions); | |
| 135 return _response.then((data) => new Empty.fromJson(data)); | |
| 136 } | |
| 137 | |
| 138 /** | |
| 139 * Gets the effective `Policy` on a resource. This is the result of merging | 94 * Gets the effective `Policy` on a resource. This is the result of merging |
| 140 * `Policies` in the resource hierarchy. The returned `Policy` will not have | 95 * `Policies` in the resource hierarchy. The returned `Policy` will not have |
| 141 * an `etag`set because it is a computed `Policy` across multiple resources. | 96 * an `etag`set because it is a computed `Policy` across multiple resources. |
| 142 * | 97 * |
| 143 * [request] - The metadata request object. | 98 * [request] - The metadata request object. |
| 144 * | 99 * |
| 145 * Request parameters: | 100 * Request parameters: |
| 146 * | 101 * |
| 147 * [resource] - The name of the resource to start computing the effective | 102 * [resource] - The name of the resource to start computing the effective |
| 148 * `Policy`. | 103 * `Policy`. |
| (...skipping 28 matching lines...) Expand all Loading... |
| 177 "POST", | 132 "POST", |
| 178 body: _body, | 133 body: _body, |
| 179 queryParams: _queryParams, | 134 queryParams: _queryParams, |
| 180 uploadOptions: _uploadOptions, | 135 uploadOptions: _uploadOptions, |
| 181 uploadMedia: _uploadMedia, | 136 uploadMedia: _uploadMedia, |
| 182 downloadOptions: _downloadOptions); | 137 downloadOptions: _downloadOptions); |
| 183 return _response.then((data) => new OrgPolicy.fromJson(data)); | 138 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 184 } | 139 } |
| 185 | 140 |
| 186 /** | 141 /** |
| 187 * Gets the effective `Policy` on a resource. This is the result of merging | |
| 188 * `Policies` in the resource hierarchy. The returned `Policy` will not have | |
| 189 * an `etag`set because it is a computed `Policy` across multiple resources. | |
| 190 * | |
| 191 * [request] - The metadata request object. | |
| 192 * | |
| 193 * Request parameters: | |
| 194 * | |
| 195 * [resource] - The name of the resource to start computing the effective | |
| 196 * `Policy`. | |
| 197 * Value must have pattern "^folders/[^/]+$". | |
| 198 * | |
| 199 * Completes with a [OrgPolicy]. | |
| 200 * | |
| 201 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 202 * error. | |
| 203 * | |
| 204 * If the used [http.Client] completes with an error when making a REST call, | |
| 205 * this method will complete with the same error. | |
| 206 */ | |
| 207 async.Future<OrgPolicy> getEffectiveOrgPolicyV1(GetEffectiveOrgPolicyRequest r
equest, core.String resource) { | |
| 208 var _url = null; | |
| 209 var _queryParams = new core.Map(); | |
| 210 var _uploadMedia = null; | |
| 211 var _uploadOptions = null; | |
| 212 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 213 var _body = null; | |
| 214 | |
| 215 if (request != null) { | |
| 216 _body = convert.JSON.encode((request).toJson()); | |
| 217 } | |
| 218 if (resource == null) { | |
| 219 throw new core.ArgumentError("Parameter resource is required."); | |
| 220 } | |
| 221 | |
| 222 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getEff
ectiveOrgPolicyV1'; | |
| 223 | |
| 224 var _response = _requester.request(_url, | |
| 225 "POST", | |
| 226 body: _body, | |
| 227 queryParams: _queryParams, | |
| 228 uploadOptions: _uploadOptions, | |
| 229 uploadMedia: _uploadMedia, | |
| 230 downloadOptions: _downloadOptions); | |
| 231 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 232 } | |
| 233 | |
| 234 /** | |
| 235 * Gets a `Policy` on a resource. | 142 * Gets a `Policy` on a resource. |
| 236 * | 143 * |
| 237 * If no `Policy` is set on the resource, a `Policy` is returned with default | 144 * If no `Policy` is set on the resource, a `Policy` is returned with default |
| 238 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | 145 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The |
| 239 * `etag` value can be used with `SetOrgPolicy()` to create or update a | 146 * `etag` value can be used with `SetOrgPolicy()` to create or update a |
| 240 * `Policy` during read-modify-write. | 147 * `Policy` during read-modify-write. |
| 241 * | 148 * |
| 242 * [request] - The metadata request object. | 149 * [request] - The metadata request object. |
| 243 * | 150 * |
| 244 * Request parameters: | 151 * Request parameters: |
| (...skipping 30 matching lines...) Expand all Loading... |
| 275 "POST", | 182 "POST", |
| 276 body: _body, | 183 body: _body, |
| 277 queryParams: _queryParams, | 184 queryParams: _queryParams, |
| 278 uploadOptions: _uploadOptions, | 185 uploadOptions: _uploadOptions, |
| 279 uploadMedia: _uploadMedia, | 186 uploadMedia: _uploadMedia, |
| 280 downloadOptions: _downloadOptions); | 187 downloadOptions: _downloadOptions); |
| 281 return _response.then((data) => new OrgPolicy.fromJson(data)); | 188 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 282 } | 189 } |
| 283 | 190 |
| 284 /** | 191 /** |
| 285 * Gets a `Policy` on a resource. | |
| 286 * | |
| 287 * If no `Policy` is set on the resource, a `Policy` is returned with default | |
| 288 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | |
| 289 * `etag` value can be used with `SetOrgPolicy()` to create or update a | |
| 290 * `Policy` during read-modify-write. | |
| 291 * | |
| 292 * [request] - The metadata request object. | |
| 293 * | |
| 294 * Request parameters: | |
| 295 * | |
| 296 * [resource] - Name of the resource the `Policy` is set on. | |
| 297 * Value must have pattern "^folders/[^/]+$". | |
| 298 * | |
| 299 * Completes with a [OrgPolicy]. | |
| 300 * | |
| 301 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 302 * error. | |
| 303 * | |
| 304 * If the used [http.Client] completes with an error when making a REST call, | |
| 305 * this method will complete with the same error. | |
| 306 */ | |
| 307 async.Future<OrgPolicy> getOrgPolicyV1(GetOrgPolicyRequest request, core.Strin
g resource) { | |
| 308 var _url = null; | |
| 309 var _queryParams = new core.Map(); | |
| 310 var _uploadMedia = null; | |
| 311 var _uploadOptions = null; | |
| 312 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 313 var _body = null; | |
| 314 | |
| 315 if (request != null) { | |
| 316 _body = convert.JSON.encode((request).toJson()); | |
| 317 } | |
| 318 if (resource == null) { | |
| 319 throw new core.ArgumentError("Parameter resource is required."); | |
| 320 } | |
| 321 | |
| 322 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
PolicyV1'; | |
| 323 | |
| 324 var _response = _requester.request(_url, | |
| 325 "POST", | |
| 326 body: _body, | |
| 327 queryParams: _queryParams, | |
| 328 uploadOptions: _uploadOptions, | |
| 329 uploadMedia: _uploadMedia, | |
| 330 downloadOptions: _downloadOptions); | |
| 331 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 332 } | |
| 333 | |
| 334 /** | |
| 335 * Lists `Constraints` that could be applied on the specified resource. | 192 * Lists `Constraints` that could be applied on the specified resource. |
| 336 * | 193 * |
| 337 * [request] - The metadata request object. | 194 * [request] - The metadata request object. |
| 338 * | 195 * |
| 339 * Request parameters: | 196 * Request parameters: |
| 340 * | 197 * |
| 341 * [resource] - Name of the resource to list `Constraints` for. | 198 * [resource] - Name of the resource to list `Constraints` for. |
| 342 * Value must have pattern "^folders/[^/]+$". | 199 * Value must have pattern "^folders/[^/]+$". |
| 343 * | 200 * |
| 344 * Completes with a [ListAvailableOrgPolicyConstraintsResponse]. | 201 * Completes with a [ListAvailableOrgPolicyConstraintsResponse]. |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 463 var _response = _requester.request(_url, | 320 var _response = _requester.request(_url, |
| 464 "POST", | 321 "POST", |
| 465 body: _body, | 322 body: _body, |
| 466 queryParams: _queryParams, | 323 queryParams: _queryParams, |
| 467 uploadOptions: _uploadOptions, | 324 uploadOptions: _uploadOptions, |
| 468 uploadMedia: _uploadMedia, | 325 uploadMedia: _uploadMedia, |
| 469 downloadOptions: _downloadOptions); | 326 downloadOptions: _downloadOptions); |
| 470 return _response.then((data) => new OrgPolicy.fromJson(data)); | 327 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 471 } | 328 } |
| 472 | 329 |
| 473 /** | |
| 474 * Updates the specified `Policy` on the resource. Creates a new `Policy` for | |
| 475 * that `Constraint` on the resource if one does not exist. | |
| 476 * | |
| 477 * Not supplying an `etag` on the request `Policy` results in an unconditional | |
| 478 * write of the `Policy`. | |
| 479 * | |
| 480 * [request] - The metadata request object. | |
| 481 * | |
| 482 * Request parameters: | |
| 483 * | |
| 484 * [resource] - Resource name of the resource to attach the `Policy`. | |
| 485 * Value must have pattern "^folders/[^/]+$". | |
| 486 * | |
| 487 * Completes with a [OrgPolicy]. | |
| 488 * | |
| 489 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 490 * error. | |
| 491 * | |
| 492 * If the used [http.Client] completes with an error when making a REST call, | |
| 493 * this method will complete with the same error. | |
| 494 */ | |
| 495 async.Future<OrgPolicy> setOrgPolicyV1(SetOrgPolicyRequest request, core.Strin
g resource) { | |
| 496 var _url = null; | |
| 497 var _queryParams = new core.Map(); | |
| 498 var _uploadMedia = null; | |
| 499 var _uploadOptions = null; | |
| 500 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 501 var _body = null; | |
| 502 | |
| 503 if (request != null) { | |
| 504 _body = convert.JSON.encode((request).toJson()); | |
| 505 } | |
| 506 if (resource == null) { | |
| 507 throw new core.ArgumentError("Parameter resource is required."); | |
| 508 } | |
| 509 | |
| 510 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setOrg
PolicyV1'; | |
| 511 | |
| 512 var _response = _requester.request(_url, | |
| 513 "POST", | |
| 514 body: _body, | |
| 515 queryParams: _queryParams, | |
| 516 uploadOptions: _uploadOptions, | |
| 517 uploadMedia: _uploadMedia, | |
| 518 downloadOptions: _downloadOptions); | |
| 519 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 520 } | |
| 521 | |
| 522 } | 330 } |
| 523 | 331 |
| 524 | 332 |
| 525 class LiensResourceApi { | 333 class LiensResourceApi { |
| 526 final commons.ApiRequester _requester; | 334 final commons.ApiRequester _requester; |
| 527 | 335 |
| 528 LiensResourceApi(commons.ApiRequester client) : | 336 LiensResourceApi(commons.ApiRequester client) : |
| 529 _requester = client; | 337 _requester = client; |
| 530 | 338 |
| 531 /** | 339 /** |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 "POST", | 580 "POST", |
| 773 body: _body, | 581 body: _body, |
| 774 queryParams: _queryParams, | 582 queryParams: _queryParams, |
| 775 uploadOptions: _uploadOptions, | 583 uploadOptions: _uploadOptions, |
| 776 uploadMedia: _uploadMedia, | 584 uploadMedia: _uploadMedia, |
| 777 downloadOptions: _downloadOptions); | 585 downloadOptions: _downloadOptions); |
| 778 return _response.then((data) => new Empty.fromJson(data)); | 586 return _response.then((data) => new Empty.fromJson(data)); |
| 779 } | 587 } |
| 780 | 588 |
| 781 /** | 589 /** |
| 782 * Clears a `Policy` from a resource. | |
| 783 * | |
| 784 * [request] - The metadata request object. | |
| 785 * | |
| 786 * Request parameters: | |
| 787 * | |
| 788 * [resource] - Name of the resource for the `Policy` to clear. | |
| 789 * Value must have pattern "^organizations/[^/]+$". | |
| 790 * | |
| 791 * Completes with a [Empty]. | |
| 792 * | |
| 793 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 794 * error. | |
| 795 * | |
| 796 * If the used [http.Client] completes with an error when making a REST call, | |
| 797 * this method will complete with the same error. | |
| 798 */ | |
| 799 async.Future<Empty> clearOrgPolicyV1(ClearOrgPolicyRequest request, core.Strin
g resource) { | |
| 800 var _url = null; | |
| 801 var _queryParams = new core.Map(); | |
| 802 var _uploadMedia = null; | |
| 803 var _uploadOptions = null; | |
| 804 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 805 var _body = null; | |
| 806 | |
| 807 if (request != null) { | |
| 808 _body = convert.JSON.encode((request).toJson()); | |
| 809 } | |
| 810 if (resource == null) { | |
| 811 throw new core.ArgumentError("Parameter resource is required."); | |
| 812 } | |
| 813 | |
| 814 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':clearO
rgPolicyV1'; | |
| 815 | |
| 816 var _response = _requester.request(_url, | |
| 817 "POST", | |
| 818 body: _body, | |
| 819 queryParams: _queryParams, | |
| 820 uploadOptions: _uploadOptions, | |
| 821 uploadMedia: _uploadMedia, | |
| 822 downloadOptions: _downloadOptions); | |
| 823 return _response.then((data) => new Empty.fromJson(data)); | |
| 824 } | |
| 825 | |
| 826 /** | |
| 827 * Fetches an Organization resource identified by the specified resource name. | 590 * Fetches an Organization resource identified by the specified resource name. |
| 828 * | 591 * |
| 829 * Request parameters: | 592 * Request parameters: |
| 830 * | 593 * |
| 831 * [name] - The resource name of the Organization to fetch, e.g. | 594 * [name] - The resource name of the Organization to fetch, e.g. |
| 832 * "organizations/1234". | 595 * "organizations/1234". |
| 833 * Value must have pattern "^organizations/[^/]+$". | 596 * Value must have pattern "^organizations/[^/]+$". |
| 834 * | 597 * |
| 835 * Completes with a [Organization]. | 598 * Completes with a [Organization]. |
| 836 * | 599 * |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 "POST", | 669 "POST", |
| 907 body: _body, | 670 body: _body, |
| 908 queryParams: _queryParams, | 671 queryParams: _queryParams, |
| 909 uploadOptions: _uploadOptions, | 672 uploadOptions: _uploadOptions, |
| 910 uploadMedia: _uploadMedia, | 673 uploadMedia: _uploadMedia, |
| 911 downloadOptions: _downloadOptions); | 674 downloadOptions: _downloadOptions); |
| 912 return _response.then((data) => new OrgPolicy.fromJson(data)); | 675 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 913 } | 676 } |
| 914 | 677 |
| 915 /** | 678 /** |
| 916 * Gets the effective `Policy` on a resource. This is the result of merging | |
| 917 * `Policies` in the resource hierarchy. The returned `Policy` will not have | |
| 918 * an `etag`set because it is a computed `Policy` across multiple resources. | |
| 919 * | |
| 920 * [request] - The metadata request object. | |
| 921 * | |
| 922 * Request parameters: | |
| 923 * | |
| 924 * [resource] - The name of the resource to start computing the effective | |
| 925 * `Policy`. | |
| 926 * Value must have pattern "^organizations/[^/]+$". | |
| 927 * | |
| 928 * Completes with a [OrgPolicy]. | |
| 929 * | |
| 930 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 931 * error. | |
| 932 * | |
| 933 * If the used [http.Client] completes with an error when making a REST call, | |
| 934 * this method will complete with the same error. | |
| 935 */ | |
| 936 async.Future<OrgPolicy> getEffectiveOrgPolicyV1(GetEffectiveOrgPolicyRequest r
equest, core.String resource) { | |
| 937 var _url = null; | |
| 938 var _queryParams = new core.Map(); | |
| 939 var _uploadMedia = null; | |
| 940 var _uploadOptions = null; | |
| 941 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 942 var _body = null; | |
| 943 | |
| 944 if (request != null) { | |
| 945 _body = convert.JSON.encode((request).toJson()); | |
| 946 } | |
| 947 if (resource == null) { | |
| 948 throw new core.ArgumentError("Parameter resource is required."); | |
| 949 } | |
| 950 | |
| 951 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getEff
ectiveOrgPolicyV1'; | |
| 952 | |
| 953 var _response = _requester.request(_url, | |
| 954 "POST", | |
| 955 body: _body, | |
| 956 queryParams: _queryParams, | |
| 957 uploadOptions: _uploadOptions, | |
| 958 uploadMedia: _uploadMedia, | |
| 959 downloadOptions: _downloadOptions); | |
| 960 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 961 } | |
| 962 | |
| 963 /** | |
| 964 * Gets the access control policy for an Organization resource. May be empty | 679 * Gets the access control policy for an Organization resource. May be empty |
| 965 * if no such policy or resource exists. The `resource` field should be the | 680 * if no such policy or resource exists. The `resource` field should be the |
| 966 * organization's resource name, e.g. "organizations/123". | 681 * organization's resource name, e.g. "organizations/123". |
| 967 * | 682 * |
| 968 * [request] - The metadata request object. | 683 * [request] - The metadata request object. |
| 969 * | 684 * |
| 970 * Request parameters: | 685 * Request parameters: |
| 971 * | 686 * |
| 972 * [resource] - REQUIRED: The resource for which the policy is being | 687 * [resource] - REQUIRED: The resource for which the policy is being |
| 973 * requested. | 688 * requested. |
| (...skipping 20 matching lines...) Expand all Loading... |
| 994 _body = convert.JSON.encode((request).toJson()); | 709 _body = convert.JSON.encode((request).toJson()); |
| 995 } | 710 } |
| 996 if (resource == null) { | 711 if (resource == null) { |
| 997 throw new core.ArgumentError("Parameter resource is required."); | 712 throw new core.ArgumentError("Parameter resource is required."); |
| 998 } | 713 } |
| 999 | 714 |
| 1000 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; | 715 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getIam
Policy'; |
| 1001 | 716 |
| 1002 var _response = _requester.request(_url, | 717 var _response = _requester.request(_url, |
| 1003 "POST", | 718 "POST", |
| 1004 body: _body, | |
| 1005 queryParams: _queryParams, | |
| 1006 uploadOptions: _uploadOptions, | |
| 1007 uploadMedia: _uploadMedia, | |
| 1008 downloadOptions: _downloadOptions); | |
| 1009 return _response.then((data) => new Policy.fromJson(data)); | |
| 1010 } | |
| 1011 | |
| 1012 /** | |
| 1013 * Gets a `Policy` on a resource. | |
| 1014 * | |
| 1015 * If no `Policy` is set on the resource, a `Policy` is returned with default | |
| 1016 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | |
| 1017 * `etag` value can be used with `SetOrgPolicy()` to create or update a | |
| 1018 * `Policy` during read-modify-write. | |
| 1019 * | |
| 1020 * [request] - The metadata request object. | |
| 1021 * | |
| 1022 * Request parameters: | |
| 1023 * | |
| 1024 * [resource] - Name of the resource the `Policy` is set on. | |
| 1025 * Value must have pattern "^organizations/[^/]+$". | |
| 1026 * | |
| 1027 * Completes with a [OrgPolicy]. | |
| 1028 * | |
| 1029 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1030 * error. | |
| 1031 * | |
| 1032 * If the used [http.Client] completes with an error when making a REST call, | |
| 1033 * this method will complete with the same error. | |
| 1034 */ | |
| 1035 async.Future<OrgPolicy> getOrgPolicy(GetOrgPolicyRequest request, core.String
resource) { | |
| 1036 var _url = null; | |
| 1037 var _queryParams = new core.Map(); | |
| 1038 var _uploadMedia = null; | |
| 1039 var _uploadOptions = null; | |
| 1040 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1041 var _body = null; | |
| 1042 | |
| 1043 if (request != null) { | |
| 1044 _body = convert.JSON.encode((request).toJson()); | |
| 1045 } | |
| 1046 if (resource == null) { | |
| 1047 throw new core.ArgumentError("Parameter resource is required."); | |
| 1048 } | |
| 1049 | |
| 1050 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
Policy'; | |
| 1051 | |
| 1052 var _response = _requester.request(_url, | |
| 1053 "POST", | |
| 1054 body: _body, | 719 body: _body, |
| 1055 queryParams: _queryParams, | 720 queryParams: _queryParams, |
| 1056 uploadOptions: _uploadOptions, | 721 uploadOptions: _uploadOptions, |
| 1057 uploadMedia: _uploadMedia, | 722 uploadMedia: _uploadMedia, |
| 1058 downloadOptions: _downloadOptions); | 723 downloadOptions: _downloadOptions); |
| 1059 return _response.then((data) => new OrgPolicy.fromJson(data)); | 724 return _response.then((data) => new Policy.fromJson(data)); |
| 1060 } | 725 } |
| 1061 | 726 |
| 1062 /** | 727 /** |
| 1063 * Gets a `Policy` on a resource. | 728 * Gets a `Policy` on a resource. |
| 1064 * | 729 * |
| 1065 * If no `Policy` is set on the resource, a `Policy` is returned with default | 730 * If no `Policy` is set on the resource, a `Policy` is returned with default |
| 1066 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | 731 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The |
| 1067 * `etag` value can be used with `SetOrgPolicy()` to create or update a | 732 * `etag` value can be used with `SetOrgPolicy()` to create or update a |
| 1068 * `Policy` during read-modify-write. | 733 * `Policy` during read-modify-write. |
| 1069 * | 734 * |
| 1070 * [request] - The metadata request object. | 735 * [request] - The metadata request object. |
| 1071 * | 736 * |
| 1072 * Request parameters: | 737 * Request parameters: |
| 1073 * | 738 * |
| 1074 * [resource] - Name of the resource the `Policy` is set on. | 739 * [resource] - Name of the resource the `Policy` is set on. |
| 1075 * Value must have pattern "^organizations/[^/]+$". | 740 * Value must have pattern "^organizations/[^/]+$". |
| 1076 * | 741 * |
| 1077 * Completes with a [OrgPolicy]. | 742 * Completes with a [OrgPolicy]. |
| 1078 * | 743 * |
| 1079 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | 744 * Completes with a [commons.ApiRequestError] if the API endpoint returned an |
| 1080 * error. | 745 * error. |
| 1081 * | 746 * |
| 1082 * If the used [http.Client] completes with an error when making a REST call, | 747 * If the used [http.Client] completes with an error when making a REST call, |
| 1083 * this method will complete with the same error. | 748 * this method will complete with the same error. |
| 1084 */ | 749 */ |
| 1085 async.Future<OrgPolicy> getOrgPolicyV1(GetOrgPolicyRequest request, core.Strin
g resource) { | 750 async.Future<OrgPolicy> getOrgPolicy(GetOrgPolicyRequest request, core.String
resource) { |
| 1086 var _url = null; | 751 var _url = null; |
| 1087 var _queryParams = new core.Map(); | 752 var _queryParams = new core.Map(); |
| 1088 var _uploadMedia = null; | 753 var _uploadMedia = null; |
| 1089 var _uploadOptions = null; | 754 var _uploadOptions = null; |
| 1090 var _downloadOptions = commons.DownloadOptions.Metadata; | 755 var _downloadOptions = commons.DownloadOptions.Metadata; |
| 1091 var _body = null; | 756 var _body = null; |
| 1092 | 757 |
| 1093 if (request != null) { | 758 if (request != null) { |
| 1094 _body = convert.JSON.encode((request).toJson()); | 759 _body = convert.JSON.encode((request).toJson()); |
| 1095 } | 760 } |
| 1096 if (resource == null) { | 761 if (resource == null) { |
| 1097 throw new core.ArgumentError("Parameter resource is required."); | 762 throw new core.ArgumentError("Parameter resource is required."); |
| 1098 } | 763 } |
| 1099 | 764 |
| 1100 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
PolicyV1'; | 765 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
Policy'; |
| 1101 | 766 |
| 1102 var _response = _requester.request(_url, | 767 var _response = _requester.request(_url, |
| 1103 "POST", | 768 "POST", |
| 1104 body: _body, | 769 body: _body, |
| 1105 queryParams: _queryParams, | 770 queryParams: _queryParams, |
| 1106 uploadOptions: _uploadOptions, | 771 uploadOptions: _uploadOptions, |
| 1107 uploadMedia: _uploadMedia, | 772 uploadMedia: _uploadMedia, |
| 1108 downloadOptions: _downloadOptions); | 773 downloadOptions: _downloadOptions); |
| 1109 return _response.then((data) => new OrgPolicy.fromJson(data)); | 774 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 1110 } | 775 } |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1333 "POST", | 998 "POST", |
| 1334 body: _body, | 999 body: _body, |
| 1335 queryParams: _queryParams, | 1000 queryParams: _queryParams, |
| 1336 uploadOptions: _uploadOptions, | 1001 uploadOptions: _uploadOptions, |
| 1337 uploadMedia: _uploadMedia, | 1002 uploadMedia: _uploadMedia, |
| 1338 downloadOptions: _downloadOptions); | 1003 downloadOptions: _downloadOptions); |
| 1339 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1004 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 1340 } | 1005 } |
| 1341 | 1006 |
| 1342 /** | 1007 /** |
| 1343 * Updates the specified `Policy` on the resource. Creates a new `Policy` for | |
| 1344 * that `Constraint` on the resource if one does not exist. | |
| 1345 * | |
| 1346 * Not supplying an `etag` on the request `Policy` results in an unconditional | |
| 1347 * write of the `Policy`. | |
| 1348 * | |
| 1349 * [request] - The metadata request object. | |
| 1350 * | |
| 1351 * Request parameters: | |
| 1352 * | |
| 1353 * [resource] - Resource name of the resource to attach the `Policy`. | |
| 1354 * Value must have pattern "^organizations/[^/]+$". | |
| 1355 * | |
| 1356 * Completes with a [OrgPolicy]. | |
| 1357 * | |
| 1358 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1359 * error. | |
| 1360 * | |
| 1361 * If the used [http.Client] completes with an error when making a REST call, | |
| 1362 * this method will complete with the same error. | |
| 1363 */ | |
| 1364 async.Future<OrgPolicy> setOrgPolicyV1(SetOrgPolicyRequest request, core.Strin
g resource) { | |
| 1365 var _url = null; | |
| 1366 var _queryParams = new core.Map(); | |
| 1367 var _uploadMedia = null; | |
| 1368 var _uploadOptions = null; | |
| 1369 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1370 var _body = null; | |
| 1371 | |
| 1372 if (request != null) { | |
| 1373 _body = convert.JSON.encode((request).toJson()); | |
| 1374 } | |
| 1375 if (resource == null) { | |
| 1376 throw new core.ArgumentError("Parameter resource is required."); | |
| 1377 } | |
| 1378 | |
| 1379 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setOrg
PolicyV1'; | |
| 1380 | |
| 1381 var _response = _requester.request(_url, | |
| 1382 "POST", | |
| 1383 body: _body, | |
| 1384 queryParams: _queryParams, | |
| 1385 uploadOptions: _uploadOptions, | |
| 1386 uploadMedia: _uploadMedia, | |
| 1387 downloadOptions: _downloadOptions); | |
| 1388 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 1389 } | |
| 1390 | |
| 1391 /** | |
| 1392 * Returns permissions that a caller has on the specified Organization. | 1008 * Returns permissions that a caller has on the specified Organization. |
| 1393 * The `resource` field should be the organization's resource name, | 1009 * The `resource` field should be the organization's resource name, |
| 1394 * e.g. "organizations/123". | 1010 * e.g. "organizations/123". |
| 1395 * | 1011 * |
| 1396 * [request] - The metadata request object. | 1012 * [request] - The metadata request object. |
| 1397 * | 1013 * |
| 1398 * Request parameters: | 1014 * Request parameters: |
| 1399 * | 1015 * |
| 1400 * [resource] - REQUIRED: The resource for which the policy detail is being | 1016 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 1401 * requested. | 1017 * requested. |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1485 "POST", | 1101 "POST", |
| 1486 body: _body, | 1102 body: _body, |
| 1487 queryParams: _queryParams, | 1103 queryParams: _queryParams, |
| 1488 uploadOptions: _uploadOptions, | 1104 uploadOptions: _uploadOptions, |
| 1489 uploadMedia: _uploadMedia, | 1105 uploadMedia: _uploadMedia, |
| 1490 downloadOptions: _downloadOptions); | 1106 downloadOptions: _downloadOptions); |
| 1491 return _response.then((data) => new Empty.fromJson(data)); | 1107 return _response.then((data) => new Empty.fromJson(data)); |
| 1492 } | 1108 } |
| 1493 | 1109 |
| 1494 /** | 1110 /** |
| 1495 * Clears a `Policy` from a resource. | |
| 1496 * | |
| 1497 * [request] - The metadata request object. | |
| 1498 * | |
| 1499 * Request parameters: | |
| 1500 * | |
| 1501 * [resource] - Name of the resource for the `Policy` to clear. | |
| 1502 * Value must have pattern "^projects/[^/]+$". | |
| 1503 * | |
| 1504 * Completes with a [Empty]. | |
| 1505 * | |
| 1506 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1507 * error. | |
| 1508 * | |
| 1509 * If the used [http.Client] completes with an error when making a REST call, | |
| 1510 * this method will complete with the same error. | |
| 1511 */ | |
| 1512 async.Future<Empty> clearOrgPolicyV1(ClearOrgPolicyRequest request, core.Strin
g resource) { | |
| 1513 var _url = null; | |
| 1514 var _queryParams = new core.Map(); | |
| 1515 var _uploadMedia = null; | |
| 1516 var _uploadOptions = null; | |
| 1517 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1518 var _body = null; | |
| 1519 | |
| 1520 if (request != null) { | |
| 1521 _body = convert.JSON.encode((request).toJson()); | |
| 1522 } | |
| 1523 if (resource == null) { | |
| 1524 throw new core.ArgumentError("Parameter resource is required."); | |
| 1525 } | |
| 1526 | |
| 1527 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':clearO
rgPolicyV1'; | |
| 1528 | |
| 1529 var _response = _requester.request(_url, | |
| 1530 "POST", | |
| 1531 body: _body, | |
| 1532 queryParams: _queryParams, | |
| 1533 uploadOptions: _uploadOptions, | |
| 1534 uploadMedia: _uploadMedia, | |
| 1535 downloadOptions: _downloadOptions); | |
| 1536 return _response.then((data) => new Empty.fromJson(data)); | |
| 1537 } | |
| 1538 | |
| 1539 /** | |
| 1540 * Request that a new Project be created. The result is an Operation which | 1111 * Request that a new Project be created. The result is an Operation which |
| 1541 * can be used to track the creation process. It is automatically deleted | 1112 * can be used to track the creation process. It is automatically deleted |
| 1542 * after a few hours, so there is no need to call DeleteOperation. | 1113 * after a few hours, so there is no need to call DeleteOperation. |
| 1543 * | 1114 * |
| 1544 * Our SLO permits Project creation to take up to 30 seconds at the 90th | 1115 * Our SLO permits Project creation to take up to 30 seconds at the 90th |
| 1545 * percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile | 1116 * percentile. As of 2016-08-29, we are observing 6 seconds 50th percentile |
| 1546 * latency. 95th percentile latency is around 11 seconds. We recommend | 1117 * latency. 95th percentile latency is around 11 seconds. We recommend |
| 1547 * polling at the 5th second with an exponential backoff. | 1118 * polling at the 5th second with an exponential backoff. |
| 1548 * | 1119 * |
| 1549 * [request] - The metadata request object. | 1120 * [request] - The metadata request object. |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1781 "POST", | 1352 "POST", |
| 1782 body: _body, | 1353 body: _body, |
| 1783 queryParams: _queryParams, | 1354 queryParams: _queryParams, |
| 1784 uploadOptions: _uploadOptions, | 1355 uploadOptions: _uploadOptions, |
| 1785 uploadMedia: _uploadMedia, | 1356 uploadMedia: _uploadMedia, |
| 1786 downloadOptions: _downloadOptions); | 1357 downloadOptions: _downloadOptions); |
| 1787 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1358 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 1788 } | 1359 } |
| 1789 | 1360 |
| 1790 /** | 1361 /** |
| 1791 * Gets the effective `Policy` on a resource. This is the result of merging | |
| 1792 * `Policies` in the resource hierarchy. The returned `Policy` will not have | |
| 1793 * an `etag`set because it is a computed `Policy` across multiple resources. | |
| 1794 * | |
| 1795 * [request] - The metadata request object. | |
| 1796 * | |
| 1797 * Request parameters: | |
| 1798 * | |
| 1799 * [resource] - The name of the resource to start computing the effective | |
| 1800 * `Policy`. | |
| 1801 * Value must have pattern "^projects/[^/]+$". | |
| 1802 * | |
| 1803 * Completes with a [OrgPolicy]. | |
| 1804 * | |
| 1805 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1806 * error. | |
| 1807 * | |
| 1808 * If the used [http.Client] completes with an error when making a REST call, | |
| 1809 * this method will complete with the same error. | |
| 1810 */ | |
| 1811 async.Future<OrgPolicy> getEffectiveOrgPolicyV1(GetEffectiveOrgPolicyRequest r
equest, core.String resource) { | |
| 1812 var _url = null; | |
| 1813 var _queryParams = new core.Map(); | |
| 1814 var _uploadMedia = null; | |
| 1815 var _uploadOptions = null; | |
| 1816 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1817 var _body = null; | |
| 1818 | |
| 1819 if (request != null) { | |
| 1820 _body = convert.JSON.encode((request).toJson()); | |
| 1821 } | |
| 1822 if (resource == null) { | |
| 1823 throw new core.ArgumentError("Parameter resource is required."); | |
| 1824 } | |
| 1825 | |
| 1826 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getEff
ectiveOrgPolicyV1'; | |
| 1827 | |
| 1828 var _response = _requester.request(_url, | |
| 1829 "POST", | |
| 1830 body: _body, | |
| 1831 queryParams: _queryParams, | |
| 1832 uploadOptions: _uploadOptions, | |
| 1833 uploadMedia: _uploadMedia, | |
| 1834 downloadOptions: _downloadOptions); | |
| 1835 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 1836 } | |
| 1837 | |
| 1838 /** | |
| 1839 * Returns the IAM access control policy for the specified Project. | 1362 * Returns the IAM access control policy for the specified Project. |
| 1840 * Permission is denied if the policy or the resource does not exist. | 1363 * Permission is denied if the policy or the resource does not exist. |
| 1841 * | 1364 * |
| 1842 * [request] - The metadata request object. | 1365 * [request] - The metadata request object. |
| 1843 * | 1366 * |
| 1844 * Request parameters: | 1367 * Request parameters: |
| 1845 * | 1368 * |
| 1846 * [resource] - REQUIRED: The resource for which the policy is being | 1369 * [resource] - REQUIRED: The resource for which the policy is being |
| 1847 * requested. | 1370 * requested. |
| 1848 * See the operation documentation for the appropriate value for this field. | 1371 * See the operation documentation for the appropriate value for this field. |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1926 "POST", | 1449 "POST", |
| 1927 body: _body, | 1450 body: _body, |
| 1928 queryParams: _queryParams, | 1451 queryParams: _queryParams, |
| 1929 uploadOptions: _uploadOptions, | 1452 uploadOptions: _uploadOptions, |
| 1930 uploadMedia: _uploadMedia, | 1453 uploadMedia: _uploadMedia, |
| 1931 downloadOptions: _downloadOptions); | 1454 downloadOptions: _downloadOptions); |
| 1932 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1455 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 1933 } | 1456 } |
| 1934 | 1457 |
| 1935 /** | 1458 /** |
| 1936 * Gets a `Policy` on a resource. | |
| 1937 * | |
| 1938 * If no `Policy` is set on the resource, a `Policy` is returned with default | |
| 1939 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The | |
| 1940 * `etag` value can be used with `SetOrgPolicy()` to create or update a | |
| 1941 * `Policy` during read-modify-write. | |
| 1942 * | |
| 1943 * [request] - The metadata request object. | |
| 1944 * | |
| 1945 * Request parameters: | |
| 1946 * | |
| 1947 * [resource] - Name of the resource the `Policy` is set on. | |
| 1948 * Value must have pattern "^projects/[^/]+$". | |
| 1949 * | |
| 1950 * Completes with a [OrgPolicy]. | |
| 1951 * | |
| 1952 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 1953 * error. | |
| 1954 * | |
| 1955 * If the used [http.Client] completes with an error when making a REST call, | |
| 1956 * this method will complete with the same error. | |
| 1957 */ | |
| 1958 async.Future<OrgPolicy> getOrgPolicyV1(GetOrgPolicyRequest request, core.Strin
g resource) { | |
| 1959 var _url = null; | |
| 1960 var _queryParams = new core.Map(); | |
| 1961 var _uploadMedia = null; | |
| 1962 var _uploadOptions = null; | |
| 1963 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 1964 var _body = null; | |
| 1965 | |
| 1966 if (request != null) { | |
| 1967 _body = convert.JSON.encode((request).toJson()); | |
| 1968 } | |
| 1969 if (resource == null) { | |
| 1970 throw new core.ArgumentError("Parameter resource is required."); | |
| 1971 } | |
| 1972 | |
| 1973 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':getOrg
PolicyV1'; | |
| 1974 | |
| 1975 var _response = _requester.request(_url, | |
| 1976 "POST", | |
| 1977 body: _body, | |
| 1978 queryParams: _queryParams, | |
| 1979 uploadOptions: _uploadOptions, | |
| 1980 uploadMedia: _uploadMedia, | |
| 1981 downloadOptions: _downloadOptions); | |
| 1982 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 1983 } | |
| 1984 | |
| 1985 /** | |
| 1986 * Lists Projects that are visible to the user and satisfy the | 1459 * Lists Projects that are visible to the user and satisfy the |
| 1987 * specified filter. This method returns Projects in an unspecified order. | 1460 * specified filter. This method returns Projects in an unspecified order. |
| 1988 * New Projects do not necessarily appear at the end of the list. | 1461 * New Projects do not necessarily appear at the end of the list. |
| 1989 * | 1462 * |
| 1990 * Request parameters: | 1463 * Request parameters: |
| 1991 * | 1464 * |
| 1992 * [filter] - An expression for filtering the results of the request. Filter | 1465 * [filter] - An expression for filtering the results of the request. Filter |
| 1993 * rules are | 1466 * rules are |
| 1994 * case insensitive. The fields eligible for filtering are: | 1467 * case insensitive. The fields eligible for filtering are: |
| 1995 * | 1468 * |
| 1996 * + `name` | 1469 * + `name` |
| 1997 * + `id` | 1470 * + `id` |
| 1998 * + <code>labels.<em>key</em></code> where *key* is the name of a label | 1471 * + <code>labels.<em>key</em></code> where *key* is the name of a label |
| 1999 * | 1472 * |
| 2000 * Some examples of using labels as filters: | 1473 * Some examples of using labels as filters: |
| 2001 * | 1474 * |
| 2002 * |Filter|Description| | 1475 * |Filter|Description| |
| 2003 * |------|-----------| | 1476 * |------|-----------| |
| 2004 * |name:*|The project has a name.| | 1477 * |name:how*|The project's name starts with "how".| |
| 2005 * |name:Howl|The project's name is `Howl` or `howl`.| | 1478 * |name:Howl|The project's name is `Howl` or `howl`.| |
| 2006 * |name:HOWL|Equivalent to above.| | 1479 * |name:HOWL|Equivalent to above.| |
| 2007 * |NAME:howl|Equivalent to above.| | 1480 * |NAME:howl|Equivalent to above.| |
| 2008 * |labels.color:*|The project has the label `color`.| | 1481 * |labels.color:*|The project has the label `color`.| |
| 2009 * |labels.color:red|The project's label `color` has the value `red`.| | 1482 * |labels.color:red|The project's label `color` has the value `red`.| |
| 2010 * |labels.color:red labels.size:big|The project's label `color` has the | 1483 * |labels.color:red labels.size:big|The project's label `color` has the |
| 2011 * value `red` and its label `size` has the value `big`. | 1484 * value `red` and its label `size` has the value `big`. |
| 2012 * | 1485 * |
| 2013 * Optional. | 1486 * Optional. |
| 2014 * | 1487 * |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2278 "POST", | 1751 "POST", |
| 2279 body: _body, | 1752 body: _body, |
| 2280 queryParams: _queryParams, | 1753 queryParams: _queryParams, |
| 2281 uploadOptions: _uploadOptions, | 1754 uploadOptions: _uploadOptions, |
| 2282 uploadMedia: _uploadMedia, | 1755 uploadMedia: _uploadMedia, |
| 2283 downloadOptions: _downloadOptions); | 1756 downloadOptions: _downloadOptions); |
| 2284 return _response.then((data) => new OrgPolicy.fromJson(data)); | 1757 return _response.then((data) => new OrgPolicy.fromJson(data)); |
| 2285 } | 1758 } |
| 2286 | 1759 |
| 2287 /** | 1760 /** |
| 2288 * Updates the specified `Policy` on the resource. Creates a new `Policy` for | |
| 2289 * that `Constraint` on the resource if one does not exist. | |
| 2290 * | |
| 2291 * Not supplying an `etag` on the request `Policy` results in an unconditional | |
| 2292 * write of the `Policy`. | |
| 2293 * | |
| 2294 * [request] - The metadata request object. | |
| 2295 * | |
| 2296 * Request parameters: | |
| 2297 * | |
| 2298 * [resource] - Resource name of the resource to attach the `Policy`. | |
| 2299 * Value must have pattern "^projects/[^/]+$". | |
| 2300 * | |
| 2301 * Completes with a [OrgPolicy]. | |
| 2302 * | |
| 2303 * Completes with a [commons.ApiRequestError] if the API endpoint returned an | |
| 2304 * error. | |
| 2305 * | |
| 2306 * If the used [http.Client] completes with an error when making a REST call, | |
| 2307 * this method will complete with the same error. | |
| 2308 */ | |
| 2309 async.Future<OrgPolicy> setOrgPolicyV1(SetOrgPolicyRequest request, core.Strin
g resource) { | |
| 2310 var _url = null; | |
| 2311 var _queryParams = new core.Map(); | |
| 2312 var _uploadMedia = null; | |
| 2313 var _uploadOptions = null; | |
| 2314 var _downloadOptions = commons.DownloadOptions.Metadata; | |
| 2315 var _body = null; | |
| 2316 | |
| 2317 if (request != null) { | |
| 2318 _body = convert.JSON.encode((request).toJson()); | |
| 2319 } | |
| 2320 if (resource == null) { | |
| 2321 throw new core.ArgumentError("Parameter resource is required."); | |
| 2322 } | |
| 2323 | |
| 2324 _url = 'v1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':setOrg
PolicyV1'; | |
| 2325 | |
| 2326 var _response = _requester.request(_url, | |
| 2327 "POST", | |
| 2328 body: _body, | |
| 2329 queryParams: _queryParams, | |
| 2330 uploadOptions: _uploadOptions, | |
| 2331 uploadMedia: _uploadMedia, | |
| 2332 downloadOptions: _downloadOptions); | |
| 2333 return _response.then((data) => new OrgPolicy.fromJson(data)); | |
| 2334 } | |
| 2335 | |
| 2336 /** | |
| 2337 * Returns permissions that a caller has on the specified Project. | 1761 * Returns permissions that a caller has on the specified Project. |
| 2338 * | 1762 * |
| 2339 * [request] - The metadata request object. | 1763 * [request] - The metadata request object. |
| 2340 * | 1764 * |
| 2341 * Request parameters: | 1765 * Request parameters: |
| 2342 * | 1766 * |
| 2343 * [resource] - REQUIRED: The resource for which the policy detail is being | 1767 * [resource] - REQUIRED: The resource for which the policy detail is being |
| 2344 * requested. | 1768 * requested. |
| 2345 * See the operation documentation for the appropriate value for this field. | 1769 * See the operation documentation for the appropriate value for this field. |
| 2346 * | 1770 * |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 _json["resourceId"] = (resourceId).toJson(); | 1927 _json["resourceId"] = (resourceId).toJson(); |
| 2504 } | 1928 } |
| 2505 return _json; | 1929 return _json; |
| 2506 } | 1930 } |
| 2507 } | 1931 } |
| 2508 | 1932 |
| 2509 /** | 1933 /** |
| 2510 * Specifies the audit configuration for a service. | 1934 * Specifies the audit configuration for a service. |
| 2511 * The configuration determines which permission types are logged, and what | 1935 * The configuration determines which permission types are logged, and what |
| 2512 * identities, if any, are exempted from logging. | 1936 * identities, if any, are exempted from logging. |
| 2513 * An AuditConifg must have one or more AuditLogConfigs. | 1937 * An AuditConfig must have one or more AuditLogConfigs. |
| 2514 * | 1938 * |
| 2515 * If there are AuditConfigs for both `allServices` and a specific service, | 1939 * If there are AuditConfigs for both `allServices` and a specific service, |
| 2516 * the union of the two AuditConfigs is used for that service: the log_types | 1940 * the union of the two AuditConfigs is used for that service: the log_types |
| 2517 * specified in each AuditConfig are enabled, and the exempted_members in each | 1941 * specified in each AuditConfig are enabled, and the exempted_members in each |
| 2518 * AuditConfig are exempted. | 1942 * AuditConfig are exempted. |
| 1943 * |
| 2519 * Example Policy with multiple AuditConfigs: | 1944 * Example Policy with multiple AuditConfigs: |
| 2520 * { | 1945 * |
| 2521 * "audit_configs": [ | |
| 2522 * { | 1946 * { |
| 2523 * "service": "allServices" | 1947 * "audit_configs": [ |
| 2524 * "audit_log_configs": [ | |
| 2525 * { | 1948 * { |
| 2526 * "log_type": "DATA_READ", | 1949 * "service": "allServices" |
| 2527 * "exempted_members": [ | 1950 * "audit_log_configs": [ |
| 2528 * "user:foo@gmail.com" | 1951 * { |
| 1952 * "log_type": "DATA_READ", |
| 1953 * "exempted_members": [ |
| 1954 * "user:foo@gmail.com" |
| 1955 * ] |
| 1956 * }, |
| 1957 * { |
| 1958 * "log_type": "DATA_WRITE", |
| 1959 * }, |
| 1960 * { |
| 1961 * "log_type": "ADMIN_READ", |
| 1962 * } |
| 2529 * ] | 1963 * ] |
| 2530 * }, | 1964 * }, |
| 2531 * { | 1965 * { |
| 2532 * "log_type": "DATA_WRITE", | 1966 * "service": "fooservice.googleapis.com" |
| 2533 * }, | 1967 * "audit_log_configs": [ |
| 2534 * { | 1968 * { |
| 2535 * "log_type": "ADMIN_READ", | 1969 * "log_type": "DATA_READ", |
| 2536 * } | 1970 * }, |
| 2537 * ] | 1971 * { |
| 2538 * }, | 1972 * "log_type": "DATA_WRITE", |
| 2539 * { | 1973 * "exempted_members": [ |
| 2540 * "service": "fooservice@googleapis.com" | 1974 * "user:bar@gmail.com" |
| 2541 * "audit_log_configs": [ | 1975 * ] |
| 2542 * { | 1976 * } |
| 2543 * "log_type": "DATA_READ", | |
| 2544 * }, | |
| 2545 * { | |
| 2546 * "log_type": "DATA_WRITE", | |
| 2547 * "exempted_members": [ | |
| 2548 * "user:bar@gmail.com" | |
| 2549 * ] | 1977 * ] |
| 2550 * } | 1978 * } |
| 2551 * ] | 1979 * ] |
| 2552 * } | 1980 * } |
| 2553 * ] | 1981 * |
| 2554 * } | |
| 2555 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ | 1982 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ |
| 2556 * logging. It also exempts foo@gmail.com from DATA_READ logging, and | 1983 * logging. It also exempts foo@gmail.com from DATA_READ logging, and |
| 2557 * bar@gmail.com from DATA_WRITE logging. | 1984 * bar@gmail.com from DATA_WRITE logging. |
| 2558 */ | 1985 */ |
| 2559 class AuditConfig { | 1986 class AuditConfig { |
| 2560 /** | 1987 /** |
| 2561 * The configuration for logging of each type of permission. | 1988 * The configuration for logging of each type of permission. |
| 2562 * Next ID: 4 | 1989 * Next ID: 4 |
| 2563 */ | 1990 */ |
| 2564 core.List<AuditLogConfig> auditLogConfigs; | 1991 core.List<AuditLogConfig> auditLogConfigs; |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3044 * display_name constraint. | 2471 * display_name constraint. |
| 3045 * - "RESOURCE_DELETED" : The resource being moved has been deleted. | 2472 * - "RESOURCE_DELETED" : The resource being moved has been deleted. |
| 3046 * - "PARENT_DELETED" : The resource a folder was being added to has been | 2473 * - "PARENT_DELETED" : The resource a folder was being added to has been |
| 3047 * deleted. | 2474 * deleted. |
| 3048 * - "CYCLE_INTRODUCED_ERROR" : The attempted action would introduce cycle in | 2475 * - "CYCLE_INTRODUCED_ERROR" : The attempted action would introduce cycle in |
| 3049 * resource path. | 2476 * resource path. |
| 3050 * - "FOLDER_BEING_MOVED" : The attempted action would move a folder that is | 2477 * - "FOLDER_BEING_MOVED" : The attempted action would move a folder that is |
| 3051 * already being moved. | 2478 * already being moved. |
| 3052 * - "FOLDER_TO_DELETE_NON_EMPTY" : The folder the caller is trying to delete | 2479 * - "FOLDER_TO_DELETE_NON_EMPTY" : The folder the caller is trying to delete |
| 3053 * contains active resources. | 2480 * contains active resources. |
| 2481 * - "DELETED_FOLDER_HEIGHT_VIOLATION" : The attempted action would violate |
| 2482 * the max deleted folder depth |
| 2483 * constraint. |
| 3054 */ | 2484 */ |
| 3055 core.String errorMessageId; | 2485 core.String errorMessageId; |
| 3056 | 2486 |
| 3057 FolderOperationError(); | 2487 FolderOperationError(); |
| 3058 | 2488 |
| 3059 FolderOperationError.fromJson(core.Map _json) { | 2489 FolderOperationError.fromJson(core.Map _json) { |
| 3060 if (_json.containsKey("errorMessageId")) { | 2490 if (_json.containsKey("errorMessageId")) { |
| 3061 errorMessageId = _json["errorMessageId"]; | 2491 errorMessageId = _json["errorMessageId"]; |
| 3062 } | 2492 } |
| 3063 } | 2493 } |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4684 UndeleteProjectRequest(); | 4114 UndeleteProjectRequest(); |
| 4685 | 4115 |
| 4686 UndeleteProjectRequest.fromJson(core.Map _json) { | 4116 UndeleteProjectRequest.fromJson(core.Map _json) { |
| 4687 } | 4117 } |
| 4688 | 4118 |
| 4689 core.Map toJson() { | 4119 core.Map toJson() { |
| 4690 var _json = new core.Map(); | 4120 var _json = new core.Map(); |
| 4691 return _json; | 4121 return _json; |
| 4692 } | 4122 } |
| 4693 } | 4123 } |
| OLD | NEW |