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

Side by Side Diff: generated/googleapis_beta/lib/cloudresourcemanager/v1beta1.dart

Issue 2779563003: Api-roll 47: 2017-03-27 (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // This is a generated file (see the discoveryapis_generator project). 1 // This is a generated file (see the discoveryapis_generator project).
2 2
3 library googleapis_beta.cloudresourcemanager.v1beta1; 3 library googleapis_beta.cloudresourcemanager.v1beta1;
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 25 matching lines...) Expand all
36 } 36 }
37 37
38 38
39 class OrganizationsResourceApi { 39 class OrganizationsResourceApi {
40 final commons.ApiRequester _requester; 40 final commons.ApiRequester _requester;
41 41
42 OrganizationsResourceApi(commons.ApiRequester client) : 42 OrganizationsResourceApi(commons.ApiRequester client) :
43 _requester = client; 43 _requester = client;
44 44
45 /** 45 /**
46 * Clears a `Policy` from a resource.
47 *
48 * [request] - The metadata request object.
49 *
50 * Request parameters:
51 *
52 * [resource] - Name of the resource for the `Policy` to clear.
53 * Value must have pattern "^organizations/[^/]+$".
54 *
55 * Completes with a [Empty].
56 *
57 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
58 * error.
59 *
60 * If the used [http.Client] completes with an error when making a REST call,
61 * this method will complete with the same error.
62 */
63 async.Future<Empty> clearOrgPolicy(ClearOrgPolicyRequest request, core.String resource) {
64 var _url = null;
65 var _queryParams = new core.Map();
66 var _uploadMedia = null;
67 var _uploadOptions = null;
68 var _downloadOptions = commons.DownloadOptions.Metadata;
69 var _body = null;
70
71 if (request != null) {
72 _body = convert.JSON.encode((request).toJson());
73 }
74 if (resource == null) {
75 throw new core.ArgumentError("Parameter resource is required.");
76 }
77
78 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':c learOrgPolicy';
79
80 var _response = _requester.request(_url,
81 "POST",
82 body: _body,
83 queryParams: _queryParams,
84 uploadOptions: _uploadOptions,
85 uploadMedia: _uploadMedia,
86 downloadOptions: _downloadOptions);
87 return _response.then((data) => new Empty.fromJson(data));
88 }
89
90 /**
91 * Clears a `Policy` from a resource.
92 *
93 * [request] - The metadata request object.
94 *
95 * Request parameters:
96 *
97 * [resource] - Name of the resource for the `Policy` to clear.
98 * Value must have pattern "^organizations/[^/]+$".
99 *
100 * Completes with a [Empty].
101 *
102 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
103 * error.
104 *
105 * If the used [http.Client] completes with an error when making a REST call,
106 * this method will complete with the same error.
107 */
108 async.Future<Empty> clearOrgPolicyV1(ClearOrgPolicyRequest request, core.Strin g resource) {
109 var _url = null;
110 var _queryParams = new core.Map();
111 var _uploadMedia = null;
112 var _uploadOptions = null;
113 var _downloadOptions = commons.DownloadOptions.Metadata;
114 var _body = null;
115
116 if (request != null) {
117 _body = convert.JSON.encode((request).toJson());
118 }
119 if (resource == null) {
120 throw new core.ArgumentError("Parameter resource is required.");
121 }
122
123 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':c learOrgPolicyV1';
124
125 var _response = _requester.request(_url,
126 "POST",
127 body: _body,
128 queryParams: _queryParams,
129 uploadOptions: _uploadOptions,
130 uploadMedia: _uploadMedia,
131 downloadOptions: _downloadOptions);
132 return _response.then((data) => new Empty.fromJson(data));
133 }
134
135 /**
46 * Fetches an Organization resource identified by the specified resource name. 136 * Fetches an Organization resource identified by the specified resource name.
47 * 137 *
48 * Request parameters: 138 * Request parameters:
49 * 139 *
50 * [name] - The resource name of the Organization to fetch, e.g. 140 * [name] - The resource name of the Organization to fetch, e.g.
51 * "organizations/1234". 141 * "organizations/1234".
52 * Value must have pattern "^organizations/[^/]+$". 142 * Value must have pattern "^organizations/[^/]+$".
53 * 143 *
54 * [organizationId] - The id of the Organization resource to fetch. 144 * [organizationId] - The id of the Organization resource to fetch.
55 * This field is deprecated and will be removed in v1. Use name instead. 145 * This field is deprecated and will be removed in v1. Use name instead.
(...skipping 27 matching lines...) Expand all
83 "GET", 173 "GET",
84 body: _body, 174 body: _body,
85 queryParams: _queryParams, 175 queryParams: _queryParams,
86 uploadOptions: _uploadOptions, 176 uploadOptions: _uploadOptions,
87 uploadMedia: _uploadMedia, 177 uploadMedia: _uploadMedia,
88 downloadOptions: _downloadOptions); 178 downloadOptions: _downloadOptions);
89 return _response.then((data) => new Organization.fromJson(data)); 179 return _response.then((data) => new Organization.fromJson(data));
90 } 180 }
91 181
92 /** 182 /**
183 * Gets the effective `Policy` on a resource. This is the result of merging
184 * `Policies` in the resource hierarchy. The returned `Policy` will not have
185 * an `etag`set because it is a computed `Policy` across multiple resources.
186 *
187 * [request] - The metadata request object.
188 *
189 * Request parameters:
190 *
191 * [resource] - The name of the resource to start computing the effective
192 * `Policy`.
193 * Value must have pattern "^organizations/[^/]+$".
194 *
195 * Completes with a [OrgPolicy].
196 *
197 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
198 * error.
199 *
200 * If the used [http.Client] completes with an error when making a REST call,
201 * this method will complete with the same error.
202 */
203 async.Future<OrgPolicy> getEffectiveOrgPolicy(GetEffectiveOrgPolicyRequest req uest, core.String resource) {
204 var _url = null;
205 var _queryParams = new core.Map();
206 var _uploadMedia = null;
207 var _uploadOptions = null;
208 var _downloadOptions = commons.DownloadOptions.Metadata;
209 var _body = null;
210
211 if (request != null) {
212 _body = convert.JSON.encode((request).toJson());
213 }
214 if (resource == null) {
215 throw new core.ArgumentError("Parameter resource is required.");
216 }
217
218 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etEffectiveOrgPolicy';
219
220 var _response = _requester.request(_url,
221 "POST",
222 body: _body,
223 queryParams: _queryParams,
224 uploadOptions: _uploadOptions,
225 uploadMedia: _uploadMedia,
226 downloadOptions: _downloadOptions);
227 return _response.then((data) => new OrgPolicy.fromJson(data));
228 }
229
230 /**
231 * Gets the effective `Policy` on a resource. This is the result of merging
232 * `Policies` in the resource hierarchy. The returned `Policy` will not have
233 * an `etag`set because it is a computed `Policy` across multiple resources.
234 *
235 * [request] - The metadata request object.
236 *
237 * Request parameters:
238 *
239 * [resource] - The name of the resource to start computing the effective
240 * `Policy`.
241 * Value must have pattern "^organizations/[^/]+$".
242 *
243 * Completes with a [OrgPolicy].
244 *
245 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
246 * error.
247 *
248 * If the used [http.Client] completes with an error when making a REST call,
249 * this method will complete with the same error.
250 */
251 async.Future<OrgPolicy> getEffectiveOrgPolicyV1(GetEffectiveOrgPolicyRequest r equest, core.String resource) {
252 var _url = null;
253 var _queryParams = new core.Map();
254 var _uploadMedia = null;
255 var _uploadOptions = null;
256 var _downloadOptions = commons.DownloadOptions.Metadata;
257 var _body = null;
258
259 if (request != null) {
260 _body = convert.JSON.encode((request).toJson());
261 }
262 if (resource == null) {
263 throw new core.ArgumentError("Parameter resource is required.");
264 }
265
266 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etEffectiveOrgPolicyV1';
267
268 var _response = _requester.request(_url,
269 "POST",
270 body: _body,
271 queryParams: _queryParams,
272 uploadOptions: _uploadOptions,
273 uploadMedia: _uploadMedia,
274 downloadOptions: _downloadOptions);
275 return _response.then((data) => new OrgPolicy.fromJson(data));
276 }
277
278 /**
93 * Gets the access control policy for an Organization resource. May be empty 279 * Gets the access control policy for an Organization resource. May be empty
94 * if no such policy or resource exists. The `resource` field should be the 280 * if no such policy or resource exists. The `resource` field should be the
95 * organization's resource name, e.g. "organizations/123". 281 * organization's resource name, e.g. "organizations/123".
96 * 282 *
97 * [request] - The metadata request object. 283 * [request] - The metadata request object.
98 * 284 *
99 * Request parameters: 285 * Request parameters:
100 * 286 *
101 * [resource] - REQUIRED: The resource for which the policy is being 287 * [resource] - REQUIRED: The resource for which the policy is being
102 * requested. 288 * requested.
103 * See the operation documentation for the appropriate value for this field. 289 * See the operation documentation for the appropriate value for this field.
104 * Value must have pattern "^organizations/[^/]+$". 290 * Value must have pattern "^organizations/[^/]+$".
105 * 291 *
292 * Completes with a [Policy].
293 *
294 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
295 * error.
296 *
297 * If the used [http.Client] completes with an error when making a REST call,
298 * this method will complete with the same error.
299 */
300 async.Future<Policy> getIamPolicy(GetIamPolicyRequest request, core.String res ource) {
301 var _url = null;
302 var _queryParams = new core.Map();
303 var _uploadMedia = null;
304 var _uploadOptions = null;
305 var _downloadOptions = commons.DownloadOptions.Metadata;
306 var _body = null;
307
308 if (request != null) {
309 _body = convert.JSON.encode((request).toJson());
310 }
311 if (resource == null) {
312 throw new core.ArgumentError("Parameter resource is required.");
313 }
314
315 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etIamPolicy';
316
317 var _response = _requester.request(_url,
318 "POST",
319 body: _body,
320 queryParams: _queryParams,
321 uploadOptions: _uploadOptions,
322 uploadMedia: _uploadMedia,
323 downloadOptions: _downloadOptions);
324 return _response.then((data) => new Policy.fromJson(data));
325 }
326
327 /**
328 * Gets a `Policy` on a resource.
329 *
330 * If no `Policy` is set on the resource, a `Policy` is returned with default
331 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
332 * `etag` value can be used with `SetOrgPolicy()` to create or update a
333 * `Policy` during read-modify-write.
334 *
335 * [request] - The metadata request object.
336 *
337 * Request parameters:
338 *
339 * [resource] - Name of the resource the `Policy` is set on.
340 * Value must have pattern "^organizations/[^/]+$".
341 *
342 * Completes with a [OrgPolicy].
343 *
344 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
345 * error.
346 *
347 * If the used [http.Client] completes with an error when making a REST call,
348 * this method will complete with the same error.
349 */
350 async.Future<OrgPolicy> getOrgPolicy(GetOrgPolicyRequest request, core.String resource) {
351 var _url = null;
352 var _queryParams = new core.Map();
353 var _uploadMedia = null;
354 var _uploadOptions = null;
355 var _downloadOptions = commons.DownloadOptions.Metadata;
356 var _body = null;
357
358 if (request != null) {
359 _body = convert.JSON.encode((request).toJson());
360 }
361 if (resource == null) {
362 throw new core.ArgumentError("Parameter resource is required.");
363 }
364
365 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etOrgPolicy';
366
367 var _response = _requester.request(_url,
368 "POST",
369 body: _body,
370 queryParams: _queryParams,
371 uploadOptions: _uploadOptions,
372 uploadMedia: _uploadMedia,
373 downloadOptions: _downloadOptions);
374 return _response.then((data) => new OrgPolicy.fromJson(data));
375 }
376
377 /**
378 * Gets a `Policy` on a resource.
379 *
380 * If no `Policy` is set on the resource, a `Policy` is returned with default
381 * values including `POLICY_TYPE_NOT_SET` for the `policy_type oneof`. The
382 * `etag` value can be used with `SetOrgPolicy()` to create or update a
383 * `Policy` during read-modify-write.
384 *
385 * [request] - The metadata request object.
386 *
387 * Request parameters:
388 *
389 * [resource] - Name of the resource the `Policy` is set on.
390 * Value must have pattern "^organizations/[^/]+$".
391 *
392 * Completes with a [OrgPolicy].
393 *
394 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
395 * error.
396 *
397 * If the used [http.Client] completes with an error when making a REST call,
398 * this method will complete with the same error.
399 */
400 async.Future<OrgPolicy> getOrgPolicyV1(GetOrgPolicyRequest request, core.Strin g resource) {
401 var _url = null;
402 var _queryParams = new core.Map();
403 var _uploadMedia = null;
404 var _uploadOptions = null;
405 var _downloadOptions = commons.DownloadOptions.Metadata;
406 var _body = null;
407
408 if (request != null) {
409 _body = convert.JSON.encode((request).toJson());
410 }
411 if (resource == null) {
412 throw new core.ArgumentError("Parameter resource is required.");
413 }
414
415 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etOrgPolicyV1';
416
417 var _response = _requester.request(_url,
418 "POST",
419 body: _body,
420 queryParams: _queryParams,
421 uploadOptions: _uploadOptions,
422 uploadMedia: _uploadMedia,
423 downloadOptions: _downloadOptions);
424 return _response.then((data) => new OrgPolicy.fromJson(data));
425 }
426
427 /**
428 * Lists Organization resources that are visible to the user and satisfy
429 * the specified filter. This method returns Organizations in an unspecified
430 * order. New Organizations do not necessarily appear at the end of the list.
431 *
432 * Request parameters:
433 *
434 * [pageSize] - The maximum number of Organizations to return in the response.
435 * This field is optional.
436 *
437 * [filter] - An optional query string used to filter the Organizations to
438 * return in
439 * the response. Filter rules are case-insensitive.
440 *
441 *
442 * Organizations may be filtered by `owner.directoryCustomerId` or by
443 * `domain`, where the domain is a Google for Work domain, for example:
444 *
445 * |Filter|Description|
446 * |------|-----------|
447 * |owner.directorycustomerid:123456789|Organizations with
448 * `owner.directory_customer_id` equal to `123456789`.|
449 * |domain:google.com|Organizations corresponding to the domain `google.com`.|
450 *
451 * This field is optional.
452 *
453 * [pageToken] - A pagination token returned from a previous call to
454 * `ListOrganizations`
455 * that indicates from where listing should continue.
456 * This field is optional.
457 *
458 * Completes with a [ListOrganizationsResponse].
459 *
460 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
461 * error.
462 *
463 * If the used [http.Client] completes with an error when making a REST call,
464 * this method will complete with the same error.
465 */
466 async.Future<ListOrganizationsResponse> list({core.int pageSize, core.String f ilter, core.String pageToken}) {
467 var _url = null;
468 var _queryParams = new core.Map();
469 var _uploadMedia = null;
470 var _uploadOptions = null;
471 var _downloadOptions = commons.DownloadOptions.Metadata;
472 var _body = null;
473
474 if (pageSize != null) {
475 _queryParams["pageSize"] = ["${pageSize}"];
476 }
477 if (filter != null) {
478 _queryParams["filter"] = [filter];
479 }
480 if (pageToken != null) {
481 _queryParams["pageToken"] = [pageToken];
482 }
483
484 _url = 'v1beta1/organizations';
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 ListOrganizationsResponse.fromJson(data) );
494 }
495
496 /**
497 * Lists `Constraints` that could be applied on the specified resource.
498 *
499 * [request] - The metadata request object.
500 *
501 * Request parameters:
502 *
503 * [resource] - Name of the resource to list `Constraints` for.
504 * Value must have pattern "^organizations/[^/]+$".
505 *
506 * Completes with a [ListAvailableOrgPolicyConstraintsResponse].
507 *
508 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
509 * error.
510 *
511 * If the used [http.Client] completes with an error when making a REST call,
512 * this method will complete with the same error.
513 */
514 async.Future<ListAvailableOrgPolicyConstraintsResponse> listAvailableOrgPolicy Constraints(ListAvailableOrgPolicyConstraintsRequest request, core.String resour ce) {
515 var _url = null;
516 var _queryParams = new core.Map();
517 var _uploadMedia = null;
518 var _uploadOptions = null;
519 var _downloadOptions = commons.DownloadOptions.Metadata;
520 var _body = null;
521
522 if (request != null) {
523 _body = convert.JSON.encode((request).toJson());
524 }
525 if (resource == null) {
526 throw new core.ArgumentError("Parameter resource is required.");
527 }
528
529 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':l istAvailableOrgPolicyConstraints';
530
531 var _response = _requester.request(_url,
532 "POST",
533 body: _body,
534 queryParams: _queryParams,
535 uploadOptions: _uploadOptions,
536 uploadMedia: _uploadMedia,
537 downloadOptions: _downloadOptions);
538 return _response.then((data) => new ListAvailableOrgPolicyConstraintsRespons e.fromJson(data));
539 }
540
541 /**
542 * Lists all the `Policies` set for a particular resource.
543 *
544 * [request] - The metadata request object.
545 *
546 * Request parameters:
547 *
548 * [resource] - Name of the resource to list Policies for.
549 * Value must have pattern "^organizations/[^/]+$".
550 *
551 * Completes with a [ListOrgPoliciesResponse].
552 *
553 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
554 * error.
555 *
556 * If the used [http.Client] completes with an error when making a REST call,
557 * this method will complete with the same error.
558 */
559 async.Future<ListOrgPoliciesResponse> listOrgPolicies(ListOrgPoliciesRequest r equest, core.String resource) {
560 var _url = null;
561 var _queryParams = new core.Map();
562 var _uploadMedia = null;
563 var _uploadOptions = null;
564 var _downloadOptions = commons.DownloadOptions.Metadata;
565 var _body = null;
566
567 if (request != null) {
568 _body = convert.JSON.encode((request).toJson());
569 }
570 if (resource == null) {
571 throw new core.ArgumentError("Parameter resource is required.");
572 }
573
574 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':l istOrgPolicies';
575
576 var _response = _requester.request(_url,
577 "POST",
578 body: _body,
579 queryParams: _queryParams,
580 uploadOptions: _uploadOptions,
581 uploadMedia: _uploadMedia,
582 downloadOptions: _downloadOptions);
583 return _response.then((data) => new ListOrgPoliciesResponse.fromJson(data));
584 }
585
586 /**
587 * Sets the access control policy on an Organization resource. Replaces any
588 * existing policy. The `resource` field should be the organization's resource
589 * name, e.g. "organizations/123".
590 *
591 * [request] - The metadata request object.
592 *
593 * Request parameters:
594 *
595 * [resource] - REQUIRED: The resource for which the policy is being
596 * specified.
597 * See the operation documentation for the appropriate value for this field.
598 * Value must have pattern "^organizations/[^/]+$".
599 *
106 * Completes with a [Policy]. 600 * Completes with a [Policy].
107 * 601 *
108 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 602 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
109 * error. 603 * error.
110 * 604 *
111 * If the used [http.Client] completes with an error when making a REST call, 605 * If the used [http.Client] completes with an error when making a REST call,
112 * this method will complete with the same error. 606 * this method will complete with the same error.
113 */ 607 */
114 async.Future<Policy> getIamPolicy(GetIamPolicyRequest request, core.String res ource) { 608 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) {
115 var _url = null; 609 var _url = null;
116 var _queryParams = new core.Map(); 610 var _queryParams = new core.Map();
117 var _uploadMedia = null; 611 var _uploadMedia = null;
118 var _uploadOptions = null; 612 var _uploadOptions = null;
119 var _downloadOptions = commons.DownloadOptions.Metadata; 613 var _downloadOptions = commons.DownloadOptions.Metadata;
120 var _body = null; 614 var _body = null;
121 615
122 if (request != null) { 616 if (request != null) {
123 _body = convert.JSON.encode((request).toJson()); 617 _body = convert.JSON.encode((request).toJson());
124 } 618 }
125 if (resource == null) { 619 if (resource == null) {
126 throw new core.ArgumentError("Parameter resource is required."); 620 throw new core.ArgumentError("Parameter resource is required.");
127 } 621 }
128 622
129 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':g etIamPolicy'; 623 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s etIamPolicy';
130 624
131 var _response = _requester.request(_url, 625 var _response = _requester.request(_url,
132 "POST", 626 "POST",
133 body: _body, 627 body: _body,
134 queryParams: _queryParams, 628 queryParams: _queryParams,
135 uploadOptions: _uploadOptions, 629 uploadOptions: _uploadOptions,
136 uploadMedia: _uploadMedia, 630 uploadMedia: _uploadMedia,
137 downloadOptions: _downloadOptions); 631 downloadOptions: _downloadOptions);
138 return _response.then((data) => new Policy.fromJson(data)); 632 return _response.then((data) => new Policy.fromJson(data));
139 } 633 }
140 634
141 /** 635 /**
142 * Lists Organization resources that are visible to the user and satisfy 636 * Updates the specified `Policy` on the resource. Creates a new `Policy` for
143 * the specified filter. This method returns Organizations in an unspecified 637 * that `Constraint` on the resource if one does not exist.
144 * order. New Organizations do not necessarily appear at the end of the list. 638 *
639 * Not supplying an `etag` on the request `Policy` results in an unconditional
640 * write of the `Policy`.
641 *
642 * [request] - The metadata request object.
145 * 643 *
146 * Request parameters: 644 * Request parameters:
147 * 645 *
148 * [pageSize] - The maximum number of Organizations to return in the response. 646 * [resource] - Resource name of the resource to attach the `Policy`.
149 * This field is optional. 647 * Value must have pattern "^organizations/[^/]+$".
150 * 648 *
151 * [filter] - An optional query string used to filter the Organizations to 649 * Completes with a [OrgPolicy].
152 * return in
153 * the response. Filter rules are case-insensitive.
154 *
155 *
156 * Organizations may be filtered by `owner.directoryCustomerId` or by
157 * `domain`, where the domain is a Google for Work domain, for example:
158 *
159 * |Filter|Description|
160 * |------|-----------|
161 * |owner.directorycustomerid:123456789|Organizations with
162 * `owner.directory_customer_id` equal to `123456789`.|
163 * |domain:google.com|Organizations corresponding to the domain `google.com`.|
164 *
165 * This field is optional.
166 *
167 * [pageToken] - A pagination token returned from a previous call to
168 * `ListOrganizations`
169 * that indicates from where listing should continue.
170 * This field is optional.
171 *
172 * Completes with a [ListOrganizationsResponse].
173 * 650 *
174 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 651 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
175 * error. 652 * error.
176 * 653 *
177 * If the used [http.Client] completes with an error when making a REST call, 654 * If the used [http.Client] completes with an error when making a REST call,
178 * this method will complete with the same error. 655 * this method will complete with the same error.
179 */ 656 */
180 async.Future<ListOrganizationsResponse> list({core.int pageSize, core.String f ilter, core.String pageToken}) { 657 async.Future<OrgPolicy> setOrgPolicy(SetOrgPolicyRequest request, core.String resource) {
181 var _url = null; 658 var _url = null;
182 var _queryParams = new core.Map(); 659 var _queryParams = new core.Map();
183 var _uploadMedia = null; 660 var _uploadMedia = null;
184 var _uploadOptions = null; 661 var _uploadOptions = null;
185 var _downloadOptions = commons.DownloadOptions.Metadata; 662 var _downloadOptions = commons.DownloadOptions.Metadata;
186 var _body = null; 663 var _body = null;
187 664
188 if (pageSize != null) { 665 if (request != null) {
189 _queryParams["pageSize"] = ["${pageSize}"]; 666 _body = convert.JSON.encode((request).toJson());
190 } 667 }
191 if (filter != null) { 668 if (resource == null) {
192 _queryParams["filter"] = [filter]; 669 throw new core.ArgumentError("Parameter resource is required.");
193 }
194 if (pageToken != null) {
195 _queryParams["pageToken"] = [pageToken];
196 } 670 }
197 671
198 _url = 'v1beta1/organizations'; 672 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s etOrgPolicy';
199 673
200 var _response = _requester.request(_url, 674 var _response = _requester.request(_url,
201 "GET", 675 "POST",
202 body: _body, 676 body: _body,
203 queryParams: _queryParams, 677 queryParams: _queryParams,
204 uploadOptions: _uploadOptions, 678 uploadOptions: _uploadOptions,
205 uploadMedia: _uploadMedia, 679 uploadMedia: _uploadMedia,
206 downloadOptions: _downloadOptions); 680 downloadOptions: _downloadOptions);
207 return _response.then((data) => new ListOrganizationsResponse.fromJson(data) ); 681 return _response.then((data) => new OrgPolicy.fromJson(data));
208 } 682 }
209 683
210 /** 684 /**
211 * Sets the access control policy on an Organization resource. Replaces any 685 * Updates the specified `Policy` on the resource. Creates a new `Policy` for
212 * existing policy. The `resource` field should be the organization's resource 686 * that `Constraint` on the resource if one does not exist.
213 * name, e.g. "organizations/123". 687 *
688 * Not supplying an `etag` on the request `Policy` results in an unconditional
689 * write of the `Policy`.
214 * 690 *
215 * [request] - The metadata request object. 691 * [request] - The metadata request object.
216 * 692 *
217 * Request parameters: 693 * Request parameters:
218 * 694 *
219 * [resource] - REQUIRED: The resource for which the policy is being 695 * [resource] - Resource name of the resource to attach the `Policy`.
220 * specified.
221 * See the operation documentation for the appropriate value for this field.
222 * Value must have pattern "^organizations/[^/]+$". 696 * Value must have pattern "^organizations/[^/]+$".
223 * 697 *
224 * Completes with a [Policy]. 698 * Completes with a [OrgPolicy].
225 * 699 *
226 * Completes with a [commons.ApiRequestError] if the API endpoint returned an 700 * Completes with a [commons.ApiRequestError] if the API endpoint returned an
227 * error. 701 * error.
228 * 702 *
229 * If the used [http.Client] completes with an error when making a REST call, 703 * If the used [http.Client] completes with an error when making a REST call,
230 * this method will complete with the same error. 704 * this method will complete with the same error.
231 */ 705 */
232 async.Future<Policy> setIamPolicy(SetIamPolicyRequest request, core.String res ource) { 706 async.Future<OrgPolicy> setOrgPolicyV1(SetOrgPolicyRequest request, core.Strin g resource) {
233 var _url = null; 707 var _url = null;
234 var _queryParams = new core.Map(); 708 var _queryParams = new core.Map();
235 var _uploadMedia = null; 709 var _uploadMedia = null;
236 var _uploadOptions = null; 710 var _uploadOptions = null;
237 var _downloadOptions = commons.DownloadOptions.Metadata; 711 var _downloadOptions = commons.DownloadOptions.Metadata;
238 var _body = null; 712 var _body = null;
239 713
240 if (request != null) { 714 if (request != null) {
241 _body = convert.JSON.encode((request).toJson()); 715 _body = convert.JSON.encode((request).toJson());
242 } 716 }
243 if (resource == null) { 717 if (resource == null) {
244 throw new core.ArgumentError("Parameter resource is required."); 718 throw new core.ArgumentError("Parameter resource is required.");
245 } 719 }
246 720
247 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s etIamPolicy'; 721 _url = 'v1beta1/' + commons.Escaper.ecapeVariableReserved('$resource') + ':s etOrgPolicyV1';
248 722
249 var _response = _requester.request(_url, 723 var _response = _requester.request(_url,
250 "POST", 724 "POST",
251 body: _body, 725 body: _body,
252 queryParams: _queryParams, 726 queryParams: _queryParams,
253 uploadOptions: _uploadOptions, 727 uploadOptions: _uploadOptions,
254 uploadMedia: _uploadMedia, 728 uploadMedia: _uploadMedia,
255 downloadOptions: _downloadOptions); 729 downloadOptions: _downloadOptions);
256 return _response.then((data) => new Policy.fromJson(data)); 730 return _response.then((data) => new OrgPolicy.fromJson(data));
257 } 731 }
258 732
259 /** 733 /**
260 * Returns permissions that a caller has on the specified Organization. 734 * Returns permissions that a caller has on the specified Organization.
261 * The `resource` field should be the organization's resource name, 735 * The `resource` field should be the organization's resource name,
262 * e.g. "organizations/123". 736 * e.g. "organizations/123".
263 * 737 *
264 * [request] - The metadata request object. 738 * [request] - The metadata request object.
265 * 739 *
266 * Request parameters: 740 * Request parameters:
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 * Some examples of using labels as filters: 1115 * Some examples of using labels as filters:
642 * 1116 *
643 * |Filter|Description| 1117 * |Filter|Description|
644 * |------|-----------| 1118 * |------|-----------|
645 * |name:*|The project has a name.| 1119 * |name:*|The project has a name.|
646 * |name:Howl|The project's name is `Howl` or `howl`.| 1120 * |name:Howl|The project's name is `Howl` or `howl`.|
647 * |name:HOWL|Equivalent to above.| 1121 * |name:HOWL|Equivalent to above.|
648 * |NAME:howl|Equivalent to above.| 1122 * |NAME:howl|Equivalent to above.|
649 * |labels.color:*|The project has the label `color`.| 1123 * |labels.color:*|The project has the label `color`.|
650 * |labels.color:red|The project's label `color` has the value `red`.| 1124 * |labels.color:red|The project's label `color` has the value `red`.|
651 * |labels.color:red&nbsp;label.size:big|The project's label `color` has the 1125 * |labels.color:red&nbsp;labels.size:big|The project's label `color` has the
652 * value `red` and its label `size` has the value `big`. 1126 * value `red` and its label `size` has the value `big`.
653 * 1127 *
654 * Optional. 1128 * Optional.
655 * 1129 *
656 * [pageToken] - A pagination token returned from a previous call to 1130 * [pageToken] - A pagination token returned from a previous call to
657 * ListProjects 1131 * ListProjects
658 * that indicates from where listing should continue. 1132 * that indicates from where listing should continue.
659 * 1133 *
660 * Optional. 1134 * Optional.
661 * 1135 *
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 * 1184 *
711 * + Service accounts can be made owners of a project directly 1185 * + Service accounts can be made owners of a project directly
712 * without any restrictions. However, to be added as an owner, a user must be 1186 * without any restrictions. However, to be added as an owner, a user must be
713 * invited via Cloud Platform console and must accept the invitation. 1187 * invited via Cloud Platform console and must accept the invitation.
714 * 1188 *
715 * + A user cannot be granted the owner role using `setIamPolicy()`. The user 1189 * + A user cannot be granted the owner role using `setIamPolicy()`. The user
716 * must be granted the owner role using the Cloud Platform Console and must 1190 * must be granted the owner role using the Cloud Platform Console and must
717 * explicitly accept the invitation. 1191 * explicitly accept the invitation.
718 * 1192 *
719 * + Invitations to grant the owner role cannot be sent using 1193 * + Invitations to grant the owner role cannot be sent using
720 * `setIamPolicy()`; 1194 * `setIamPolicy()`; they must be sent only using the Cloud Platform Console.
721 * they must be sent only using the Cloud Platform Console.
722 * 1195 *
723 * + Membership changes that leave the project without any owners that have 1196 * + Membership changes that leave the project without any owners that have
724 * accepted the Terms of Service (ToS) will be rejected. 1197 * accepted the Terms of Service (ToS) will be rejected.
725 * 1198 *
726 * + There must be at least one owner who has accepted the Terms of 1199 * + There must be at least one owner who has accepted the Terms of
727 * Service (ToS) agreement in the policy. Calling `setIamPolicy()` to 1200 * Service (ToS) agreement in the policy. Calling `setIamPolicy()` to
728 * to remove the last ToS-accepted owner from the policy will fail. This 1201 * remove the last ToS-accepted owner from the policy will fail. This
729 * restriction also applies to legacy projects that no longer have owners 1202 * restriction also applies to legacy projects that no longer have owners
730 * who have accepted the ToS. Edits to IAM policies will be rejected until 1203 * who have accepted the ToS. Edits to IAM policies will be rejected until
731 * the lack of a ToS-accepting owner is rectified. 1204 * the lack of a ToS-accepting owner is rectified.
732 * 1205 *
733 * + Calling this method requires enabling the App Engine Admin API. 1206 * + Calling this method requires enabling the App Engine Admin API.
734 * 1207 *
735 * Note: Removing service accounts from policies or changing their roles 1208 * Note: Removing service accounts from policies or changing their roles
736 * can render services completely inoperable. It is important to understand 1209 * can render services completely inoperable. It is important to understand
737 * how the service account is being used before removing or updating its 1210 * how the service account is being used before removing or updating its
738 * roles. 1211 * roles.
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
946 1419
947 core.Map toJson() { 1420 core.Map toJson() {
948 var _json = new core.Map(); 1421 var _json = new core.Map();
949 if (resourceId != null) { 1422 if (resourceId != null) {
950 _json["resourceId"] = (resourceId).toJson(); 1423 _json["resourceId"] = (resourceId).toJson();
951 } 1424 }
952 return _json; 1425 return _json;
953 } 1426 }
954 } 1427 }
955 1428
1429 /**
1430 * Specifies the audit configuration for a service.
1431 * The configuration determines which permission types are logged, and what
1432 * identities, if any, are exempted from logging.
1433 * An AuditConifg must have one or more AuditLogConfigs.
1434 *
1435 * If there are AuditConfigs for both `allServices` and a specific service,
1436 * the union of the two AuditConfigs is used for that service: the log_types
1437 * specified in each AuditConfig are enabled, and the exempted_members in each
1438 * AuditConfig are exempted.
1439 * Example Policy with multiple AuditConfigs:
1440 * {
1441 * "audit_configs": [
1442 * {
1443 * "service": "allServices"
1444 * "audit_log_configs": [
1445 * {
1446 * "log_type": "DATA_READ",
1447 * "exempted_members": [
1448 * "user:foo@gmail.com"
1449 * ]
1450 * },
1451 * {
1452 * "log_type": "DATA_WRITE",
1453 * },
1454 * {
1455 * "log_type": "ADMIN_READ",
1456 * }
1457 * ]
1458 * },
1459 * {
1460 * "service": "fooservice@googleapis.com"
1461 * "audit_log_configs": [
1462 * {
1463 * "log_type": "DATA_READ",
1464 * },
1465 * {
1466 * "log_type": "DATA_WRITE",
1467 * "exempted_members": [
1468 * "user:bar@gmail.com"
1469 * ]
1470 * }
1471 * ]
1472 * }
1473 * ]
1474 * }
1475 * For fooservice, this policy enables DATA_READ, DATA_WRITE and ADMIN_READ
1476 * logging. It also exempts foo@gmail.com from DATA_READ logging, and
1477 * bar@gmail.com from DATA_WRITE logging.
1478 */
1479 class AuditConfig {
1480 /**
1481 * The configuration for logging of each type of permission.
1482 * Next ID: 4
1483 */
1484 core.List<AuditLogConfig> auditLogConfigs;
1485 /**
1486 * Specifies a service that will be enabled for audit logging.
1487 * For example, `storage.googleapis.com`, `cloudsql.googleapis.com`.
1488 * `allServices` is a special value that covers all services.
1489 */
1490 core.String service;
1491
1492 AuditConfig();
1493
1494 AuditConfig.fromJson(core.Map _json) {
1495 if (_json.containsKey("auditLogConfigs")) {
1496 auditLogConfigs = _json["auditLogConfigs"].map((value) => new AuditLogConf ig.fromJson(value)).toList();
1497 }
1498 if (_json.containsKey("service")) {
1499 service = _json["service"];
1500 }
1501 }
1502
1503 core.Map toJson() {
1504 var _json = new core.Map();
1505 if (auditLogConfigs != null) {
1506 _json["auditLogConfigs"] = auditLogConfigs.map((value) => (value).toJson() ).toList();
1507 }
1508 if (service != null) {
1509 _json["service"] = service;
1510 }
1511 return _json;
1512 }
1513 }
1514
1515 /**
1516 * Provides the configuration for logging a type of permissions.
1517 * Example:
1518 *
1519 * {
1520 * "audit_log_configs": [
1521 * {
1522 * "log_type": "DATA_READ",
1523 * "exempted_members": [
1524 * "user:foo@gmail.com"
1525 * ]
1526 * },
1527 * {
1528 * "log_type": "DATA_WRITE",
1529 * }
1530 * ]
1531 * }
1532 *
1533 * This enables 'DATA_READ' and 'DATA_WRITE' logging, while exempting
1534 * foo@gmail.com from DATA_READ logging.
1535 */
1536 class AuditLogConfig {
1537 /**
1538 * Specifies the identities that do not cause logging for this type of
1539 * permission.
1540 * Follows the same format of Binding.members.
1541 */
1542 core.List<core.String> exemptedMembers;
1543 /**
1544 * The log type that this config enables.
1545 * Possible string values are:
1546 * - "LOG_TYPE_UNSPECIFIED" : Default case. Should never be this.
1547 * - "ADMIN_READ" : Admin reads. Example: CloudIAM getIamPolicy
1548 * - "DATA_WRITE" : Data writes. Example: CloudSQL Users create
1549 * - "DATA_READ" : Data reads. Example: CloudSQL Users list
1550 */
1551 core.String logType;
1552
1553 AuditLogConfig();
1554
1555 AuditLogConfig.fromJson(core.Map _json) {
1556 if (_json.containsKey("exemptedMembers")) {
1557 exemptedMembers = _json["exemptedMembers"];
1558 }
1559 if (_json.containsKey("logType")) {
1560 logType = _json["logType"];
1561 }
1562 }
1563
1564 core.Map toJson() {
1565 var _json = new core.Map();
1566 if (exemptedMembers != null) {
1567 _json["exemptedMembers"] = exemptedMembers;
1568 }
1569 if (logType != null) {
1570 _json["logType"] = logType;
1571 }
1572 return _json;
1573 }
1574 }
1575
956 /** Associates `members` with a `role`. */ 1576 /** Associates `members` with a `role`. */
957 class Binding { 1577 class Binding {
958 /** 1578 /**
959 * Specifies the identities requesting access for a Cloud Platform resource. 1579 * Specifies the identities requesting access for a Cloud Platform resource.
960 * `members` can have the following values: 1580 * `members` can have the following values:
961 * 1581 *
962 * * `allUsers`: A special identifier that represents anyone who is 1582 * * `allUsers`: A special identifier that represents anyone who is
963 * on the internet; with or without a Google account. 1583 * on the internet; with or without a Google account.
964 * 1584 *
965 * * `allAuthenticatedUsers`: A special identifier that represents anyone 1585 * * `allAuthenticatedUsers`: A special identifier that represents anyone
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
1003 _json["members"] = members; 1623 _json["members"] = members;
1004 } 1624 }
1005 if (role != null) { 1625 if (role != null) {
1006 _json["role"] = role; 1626 _json["role"] = role;
1007 } 1627 }
1008 return _json; 1628 return _json;
1009 } 1629 }
1010 } 1630 }
1011 1631
1012 /** 1632 /**
1633 * A `Constraint` that is either enforced or not.
1634 *
1635 * For example a constraint `constraints/compute.disableSerialPortAccess`.
1636 * If it is enforced on a VM instance, serial port connections will not be
1637 * opened to that instance.
1638 */
1639 class BooleanConstraint {
1640
1641 BooleanConstraint();
1642
1643 BooleanConstraint.fromJson(core.Map _json) {
1644 }
1645
1646 core.Map toJson() {
1647 var _json = new core.Map();
1648 return _json;
1649 }
1650 }
1651
1652 /**
1653 * Used in `policy_type` to specify how `boolean_policy` will behave at this
1654 * resource.
1655 */
1656 class BooleanPolicy {
1657 /**
1658 * If `true`, then the `Policy` is enforced. If `false`, then any
1659 * configuration is acceptable.
1660 *
1661 * Suppose you have a `Constraint`
1662 * `constraints/compute.disableSerialPortAccess`
1663 * with `constraint_default` set to `ALLOW`. A `Policy` for that
1664 * `Constraint` exhibits the following behavior:
1665 * - If the `Policy` at this resource has enforced set to `false`, serial
1666 * port connection attempts will be allowed.
1667 * - If the `Policy` at this resource has enforced set to `true`, serial
1668 * port connection attempts will be refused.
1669 * - If the `Policy` at this resource is `RestoreDefault`, serial port
1670 * connection attempts will be allowed.
1671 * - If no `Policy` is set at this resource or anywhere higher in the
1672 * resource hierarchy, serial port connection attempts will be allowed.
1673 * - If no `Policy` is set at this resource, but one exists higher in the
1674 * resource hierarchy, the behavior is as if the`Policy` were set at
1675 * this resource.
1676 *
1677 * The following examples demonstrate the different possible layerings:
1678 *
1679 * Example 1 (nearest `Constraint` wins):
1680 * `organizations/foo` has a `Policy` with:
1681 * {enforced: false}
1682 * `projects/bar` has no `Policy` set.
1683 * The constraint at `projects/bar` and `organizations/foo` will not be
1684 * enforced.
1685 *
1686 * Example 2 (enforcement gets replaced):
1687 * `organizations/foo` has a `Policy` with:
1688 * {enforced: false}
1689 * `projects/bar` has a `Policy` with:
1690 * {enforced: true}
1691 * The constraint at `organizations/foo` is not enforced.
1692 * The constraint at `projects/bar` is enforced.
1693 *
1694 * Example 3 (RestoreDefault):
1695 * `organizations/foo` has a `Policy` with:
1696 * {enforced: true}
1697 * `projects/bar` has a `Policy` with:
1698 * {RestoreDefault: {}}
1699 * The constraint at `organizations/foo` is enforced.
1700 * The constraint at `projects/bar` is not enforced, because
1701 * `constraint_default` for the `Constraint` is `ALLOW`.
1702 */
1703 core.bool enforced;
1704
1705 BooleanPolicy();
1706
1707 BooleanPolicy.fromJson(core.Map _json) {
1708 if (_json.containsKey("enforced")) {
1709 enforced = _json["enforced"];
1710 }
1711 }
1712
1713 core.Map toJson() {
1714 var _json = new core.Map();
1715 if (enforced != null) {
1716 _json["enforced"] = enforced;
1717 }
1718 return _json;
1719 }
1720 }
1721
1722 /** The request sent to the ClearOrgPolicy method. */
1723 class ClearOrgPolicyRequest {
1724 /** Name of the `Constraint` of the `Policy` to clear. */
1725 core.String constraint;
1726 /**
1727 * The current version, for concurrency control. Not sending an `etag`
1728 * will cause the `Policy` to be cleared blindly.
1729 */
1730 core.String etag;
1731 core.List<core.int> get etagAsBytes {
1732 return convert.BASE64.decode(etag);
1733 }
1734
1735 void set etagAsBytes(core.List<core.int> _bytes) {
1736 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
1737 }
1738
1739 ClearOrgPolicyRequest();
1740
1741 ClearOrgPolicyRequest.fromJson(core.Map _json) {
1742 if (_json.containsKey("constraint")) {
1743 constraint = _json["constraint"];
1744 }
1745 if (_json.containsKey("etag")) {
1746 etag = _json["etag"];
1747 }
1748 }
1749
1750 core.Map toJson() {
1751 var _json = new core.Map();
1752 if (constraint != null) {
1753 _json["constraint"] = constraint;
1754 }
1755 if (etag != null) {
1756 _json["etag"] = etag;
1757 }
1758 return _json;
1759 }
1760 }
1761
1762 /**
1763 * A `Constraint` describes a way in which a resource's configuration can be
1764 * restricted. For example, it controls which cloud services can be activated
1765 * across an organization, or whether a Compute Engine instance can have
1766 * serial port connections established. `Constraints` can be configured by the
1767 * organization's policy adminstrator to fit the needs of the organzation by
1768 * setting Policies for `Constraints` at different locations in the
1769 * organization's resource hierarchy. Policies are inherited down the resource
1770 * hierarchy from higher levels, but can also be overridden. For details about
1771 * the inheritance rules please read about
1772 * Policies.
1773 *
1774 * `Constraints` have a default behavior determined by the `constraint_default`
1775 * field, which is the enforcement behavior that is used in the absence of a
1776 * `Policy` being defined or inherited for the resource in question.
1777 */
1778 class Constraint {
1779 /** Defines this constraint as being a BooleanConstraint. */
1780 BooleanConstraint booleanConstraint;
1781 /**
1782 * The evaluation behavior of this constraint in the absense of 'Policy'.
1783 * Possible string values are:
1784 * - "CONSTRAINT_DEFAULT_UNSPECIFIED" : This is only used for distinguishing
1785 * unset values and should never be
1786 * used.
1787 * - "ALLOW" : Indicate that all values are allowed for list constraints.
1788 * Indicate that enforcement is off for boolean constraints.
1789 * - "DENY" : Indicate that all values are denied for list constraints.
1790 * Indicate that enforcement is on for boolean constraints.
1791 */
1792 core.String constraintDefault;
1793 /**
1794 * Detailed description of what this `Constraint` controls as well as how and
1795 * where it is enforced.
1796 *
1797 * Mutable.
1798 */
1799 core.String description;
1800 /**
1801 * The human readable name.
1802 *
1803 * Mutable.
1804 */
1805 core.String displayName;
1806 /** Defines this constraint as being a ListConstraint. */
1807 ListConstraint listConstraint;
1808 /**
1809 * Immutable value, required to globally be unique. For example,
1810 * `constraints/serviceuser.services`
1811 */
1812 core.String name;
1813 /** Version of the `Constraint`. Default version is 0; */
1814 core.int version;
1815
1816 Constraint();
1817
1818 Constraint.fromJson(core.Map _json) {
1819 if (_json.containsKey("booleanConstraint")) {
1820 booleanConstraint = new BooleanConstraint.fromJson(_json["booleanConstrain t"]);
1821 }
1822 if (_json.containsKey("constraintDefault")) {
1823 constraintDefault = _json["constraintDefault"];
1824 }
1825 if (_json.containsKey("description")) {
1826 description = _json["description"];
1827 }
1828 if (_json.containsKey("displayName")) {
1829 displayName = _json["displayName"];
1830 }
1831 if (_json.containsKey("listConstraint")) {
1832 listConstraint = new ListConstraint.fromJson(_json["listConstraint"]);
1833 }
1834 if (_json.containsKey("name")) {
1835 name = _json["name"];
1836 }
1837 if (_json.containsKey("version")) {
1838 version = _json["version"];
1839 }
1840 }
1841
1842 core.Map toJson() {
1843 var _json = new core.Map();
1844 if (booleanConstraint != null) {
1845 _json["booleanConstraint"] = (booleanConstraint).toJson();
1846 }
1847 if (constraintDefault != null) {
1848 _json["constraintDefault"] = constraintDefault;
1849 }
1850 if (description != null) {
1851 _json["description"] = description;
1852 }
1853 if (displayName != null) {
1854 _json["displayName"] = displayName;
1855 }
1856 if (listConstraint != null) {
1857 _json["listConstraint"] = (listConstraint).toJson();
1858 }
1859 if (name != null) {
1860 _json["name"] = name;
1861 }
1862 if (version != null) {
1863 _json["version"] = version;
1864 }
1865 return _json;
1866 }
1867 }
1868
1869 /**
1013 * A generic empty message that you can re-use to avoid defining duplicated 1870 * A generic empty message that you can re-use to avoid defining duplicated
1014 * empty messages in your APIs. A typical example is to use it as the request 1871 * empty messages in your APIs. A typical example is to use it as the request
1015 * or the response type of an API method. For instance: 1872 * or the response type of an API method. For instance:
1016 * 1873 *
1017 * service Foo { 1874 * service Foo {
1018 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); 1875 * rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
1019 * } 1876 * }
1020 * 1877 *
1021 * The JSON representation for `Empty` is empty JSON object `{}`. 1878 * The JSON representation for `Empty` is empty JSON object `{}`.
1022 */ 1879 */
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 * - "MAX_CHILD_FOLDERS_VIOLATION" : The attempted action would violate the 1960 * - "MAX_CHILD_FOLDERS_VIOLATION" : The attempted action would violate the
1104 * max child folders constraint. 1961 * max child folders constraint.
1105 * - "FOLDER_NAME_UNIQUENESS_VIOLATION" : The attempted action would violate 1962 * - "FOLDER_NAME_UNIQUENESS_VIOLATION" : The attempted action would violate
1106 * the locally-unique folder 1963 * the locally-unique folder
1107 * display_name constraint. 1964 * display_name constraint.
1108 * - "RESOURCE_DELETED" : The resource being moved has been deleted. 1965 * - "RESOURCE_DELETED" : The resource being moved has been deleted.
1109 * - "PARENT_DELETED" : The resource a folder was being added to has been 1966 * - "PARENT_DELETED" : The resource a folder was being added to has been
1110 * deleted. 1967 * deleted.
1111 * - "CYCLE_INTRODUCED_ERROR" : The attempted action would introduce cycle in 1968 * - "CYCLE_INTRODUCED_ERROR" : The attempted action would introduce cycle in
1112 * resource path. 1969 * resource path.
1113 * - "FOLDER_ALREADY_BEING_MOVED" : The attempted action would move a folder 1970 * - "FOLDER_BEING_MOVED" : The attempted action would move a folder that is
1114 * that is already being moved. 1971 * already being moved.
1115 * - "FOLDER_TO_DELETE_NON_EMPTY" : The folder the caller is trying to delete 1972 * - "FOLDER_TO_DELETE_NON_EMPTY" : The folder the caller is trying to delete
1116 * contains active resources. 1973 * contains active resources.
1117 */ 1974 */
1118 core.String errorMessageId; 1975 core.String errorMessageId;
1119 1976
1120 FolderOperationError(); 1977 FolderOperationError();
1121 1978
1122 FolderOperationError.fromJson(core.Map _json) { 1979 FolderOperationError.fromJson(core.Map _json) {
1123 if (_json.containsKey("errorMessageId")) { 1980 if (_json.containsKey("errorMessageId")) {
1124 errorMessageId = _json["errorMessageId"]; 1981 errorMessageId = _json["errorMessageId"];
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1171 2028
1172 core.Map toJson() { 2029 core.Map toJson() {
1173 var _json = new core.Map(); 2030 var _json = new core.Map();
1174 if (ancestor != null) { 2031 if (ancestor != null) {
1175 _json["ancestor"] = ancestor.map((value) => (value).toJson()).toList(); 2032 _json["ancestor"] = ancestor.map((value) => (value).toJson()).toList();
1176 } 2033 }
1177 return _json; 2034 return _json;
1178 } 2035 }
1179 } 2036 }
1180 2037
2038 /** The request sent to the GetEffectiveOrgPolicy method. */
2039 class GetEffectiveOrgPolicyRequest {
2040 /** The name of the `Constraint` to compute the effective `Policy`. */
2041 core.String constraint;
2042
2043 GetEffectiveOrgPolicyRequest();
2044
2045 GetEffectiveOrgPolicyRequest.fromJson(core.Map _json) {
2046 if (_json.containsKey("constraint")) {
2047 constraint = _json["constraint"];
2048 }
2049 }
2050
2051 core.Map toJson() {
2052 var _json = new core.Map();
2053 if (constraint != null) {
2054 _json["constraint"] = constraint;
2055 }
2056 return _json;
2057 }
2058 }
2059
1181 /** Request message for `GetIamPolicy` method. */ 2060 /** Request message for `GetIamPolicy` method. */
1182 class GetIamPolicyRequest { 2061 class GetIamPolicyRequest {
1183 2062
1184 GetIamPolicyRequest(); 2063 GetIamPolicyRequest();
1185 2064
1186 GetIamPolicyRequest.fromJson(core.Map _json) { 2065 GetIamPolicyRequest.fromJson(core.Map _json) {
1187 } 2066 }
1188 2067
1189 core.Map toJson() { 2068 core.Map toJson() {
1190 var _json = new core.Map(); 2069 var _json = new core.Map();
1191 return _json; 2070 return _json;
1192 } 2071 }
1193 } 2072 }
1194 2073
2074 /** The request sent to the GetOrgPolicy method. */
2075 class GetOrgPolicyRequest {
2076 /** Name of the `Constraint` to get the `Policy`. */
2077 core.String constraint;
2078
2079 GetOrgPolicyRequest();
2080
2081 GetOrgPolicyRequest.fromJson(core.Map _json) {
2082 if (_json.containsKey("constraint")) {
2083 constraint = _json["constraint"];
2084 }
2085 }
2086
2087 core.Map toJson() {
2088 var _json = new core.Map();
2089 if (constraint != null) {
2090 _json["constraint"] = constraint;
2091 }
2092 return _json;
2093 }
2094 }
2095
2096 /**
2097 * The request sent to the [ListAvailableOrgPolicyConstraints]
2098 * google.cloud.OrgPolicy.v1.ListAvailableOrgPolicyConstraints] method.
2099 */
2100 class ListAvailableOrgPolicyConstraintsRequest {
2101 /**
2102 * Size of the pages to be returned. This is currently unsupported and will
2103 * be ignored. The server may at any point start using this field to limit
2104 * page size.
2105 */
2106 core.int pageSize;
2107 /**
2108 * Page token used to retrieve the next page. This is currently unsupported
2109 * and will be ignored. The server may at any point start using this field.
2110 */
2111 core.String pageToken;
2112
2113 ListAvailableOrgPolicyConstraintsRequest();
2114
2115 ListAvailableOrgPolicyConstraintsRequest.fromJson(core.Map _json) {
2116 if (_json.containsKey("pageSize")) {
2117 pageSize = _json["pageSize"];
2118 }
2119 if (_json.containsKey("pageToken")) {
2120 pageToken = _json["pageToken"];
2121 }
2122 }
2123
2124 core.Map toJson() {
2125 var _json = new core.Map();
2126 if (pageSize != null) {
2127 _json["pageSize"] = pageSize;
2128 }
2129 if (pageToken != null) {
2130 _json["pageToken"] = pageToken;
2131 }
2132 return _json;
2133 }
2134 }
2135
2136 /**
2137 * The response returned from the ListAvailableOrgPolicyConstraints method.
2138 * Returns all `Constraints` that could be set at this level of the hierarchy
2139 * (contrast with the response from `ListPolicies`, which returns all policies
2140 * which are set).
2141 */
2142 class ListAvailableOrgPolicyConstraintsResponse {
2143 /**
2144 * The collection of constraints that are settable on the request resource.
2145 */
2146 core.List<Constraint> constraints;
2147 /** Page token used to retrieve the next page. This is currently not used. */
2148 core.String nextPageToken;
2149
2150 ListAvailableOrgPolicyConstraintsResponse();
2151
2152 ListAvailableOrgPolicyConstraintsResponse.fromJson(core.Map _json) {
2153 if (_json.containsKey("constraints")) {
2154 constraints = _json["constraints"].map((value) => new Constraint.fromJson( value)).toList();
2155 }
2156 if (_json.containsKey("nextPageToken")) {
2157 nextPageToken = _json["nextPageToken"];
2158 }
2159 }
2160
2161 core.Map toJson() {
2162 var _json = new core.Map();
2163 if (constraints != null) {
2164 _json["constraints"] = constraints.map((value) => (value).toJson()).toList ();
2165 }
2166 if (nextPageToken != null) {
2167 _json["nextPageToken"] = nextPageToken;
2168 }
2169 return _json;
2170 }
2171 }
2172
2173 /**
2174 * A `Constraint` that allows or disallows a list of string values, which are
2175 * configured by an Organization's policy administrator with a `Policy`.
2176 */
2177 class ListConstraint {
2178 /**
2179 * Optional. The Google Cloud Console will try to default to a configuration
2180 * that matches the value specified in this `Constraint`.
2181 */
2182 core.String suggestedValue;
2183
2184 ListConstraint();
2185
2186 ListConstraint.fromJson(core.Map _json) {
2187 if (_json.containsKey("suggestedValue")) {
2188 suggestedValue = _json["suggestedValue"];
2189 }
2190 }
2191
2192 core.Map toJson() {
2193 var _json = new core.Map();
2194 if (suggestedValue != null) {
2195 _json["suggestedValue"] = suggestedValue;
2196 }
2197 return _json;
2198 }
2199 }
2200
2201 /** The request sent to the ListOrgPolicies method. */
2202 class ListOrgPoliciesRequest {
2203 /**
2204 * Size of the pages to be returned. This is currently unsupported and will
2205 * be ignored. The server may at any point start using this field to limit
2206 * page size.
2207 */
2208 core.int pageSize;
2209 /**
2210 * Page token used to retrieve the next page. This is currently unsupported
2211 * and will be ignored. The server may at any point start using this field.
2212 */
2213 core.String pageToken;
2214
2215 ListOrgPoliciesRequest();
2216
2217 ListOrgPoliciesRequest.fromJson(core.Map _json) {
2218 if (_json.containsKey("pageSize")) {
2219 pageSize = _json["pageSize"];
2220 }
2221 if (_json.containsKey("pageToken")) {
2222 pageToken = _json["pageToken"];
2223 }
2224 }
2225
2226 core.Map toJson() {
2227 var _json = new core.Map();
2228 if (pageSize != null) {
2229 _json["pageSize"] = pageSize;
2230 }
2231 if (pageToken != null) {
2232 _json["pageToken"] = pageToken;
2233 }
2234 return _json;
2235 }
2236 }
2237
2238 /**
2239 * The response returned from the ListOrgPolicies method. It will be empty
2240 * if no `Policies` are set on the resource.
2241 */
2242 class ListOrgPoliciesResponse {
2243 /**
2244 * Page token used to retrieve the next page. This is currently not used, but
2245 * the server may at any point start supplying a valid token.
2246 */
2247 core.String nextPageToken;
2248 /**
2249 * The `Policies` that are set on the resource. It will be empty if no
2250 * `Policies` are set.
2251 */
2252 core.List<OrgPolicy> policies;
2253
2254 ListOrgPoliciesResponse();
2255
2256 ListOrgPoliciesResponse.fromJson(core.Map _json) {
2257 if (_json.containsKey("nextPageToken")) {
2258 nextPageToken = _json["nextPageToken"];
2259 }
2260 if (_json.containsKey("policies")) {
2261 policies = _json["policies"].map((value) => new OrgPolicy.fromJson(value)) .toList();
2262 }
2263 }
2264
2265 core.Map toJson() {
2266 var _json = new core.Map();
2267 if (nextPageToken != null) {
2268 _json["nextPageToken"] = nextPageToken;
2269 }
2270 if (policies != null) {
2271 _json["policies"] = policies.map((value) => (value).toJson()).toList();
2272 }
2273 return _json;
2274 }
2275 }
2276
1195 /** The response returned from the `ListOrganizations` method. */ 2277 /** The response returned from the `ListOrganizations` method. */
1196 class ListOrganizationsResponse { 2278 class ListOrganizationsResponse {
1197 /** 2279 /**
1198 * A pagination token to be used to retrieve the next page of results. If the 2280 * A pagination token to be used to retrieve the next page of results. If the
1199 * result is too large to fit within the page size specified in the request, 2281 * result is too large to fit within the page size specified in the request,
1200 * this field will be set with a token that can be used to fetch the next page 2282 * this field will be set with a token that can be used to fetch the next page
1201 * of results. If this field is empty, it indicates that this response 2283 * of results. If this field is empty, it indicates that this response
1202 * contains the last page of results. 2284 * contains the last page of results.
1203 */ 2285 */
1204 core.String nextPageToken; 2286 core.String nextPageToken;
(...skipping 19 matching lines...) Expand all
1224 _json["nextPageToken"] = nextPageToken; 2306 _json["nextPageToken"] = nextPageToken;
1225 } 2307 }
1226 if (organizations != null) { 2308 if (organizations != null) {
1227 _json["organizations"] = organizations.map((value) => (value).toJson()).to List(); 2309 _json["organizations"] = organizations.map((value) => (value).toJson()).to List();
1228 } 2310 }
1229 return _json; 2311 return _json;
1230 } 2312 }
1231 } 2313 }
1232 2314
1233 /** 2315 /**
2316 * Used in `policy_type` to specify how `list_policy` behaves at this
2317 * resource.
2318 *
2319 * A `ListPolicy` can define specific values that are allowed or denied by
2320 * setting either the `allowed_values` or `denied_values` fields. It can also
2321 * be used to allow or deny all values, by setting the `all_values` field. If
2322 * `all_values` is `ALL_VALUES_UNSPECIFIED`, exactly one of `allowed_values`
2323 * or `denied_values` must be set (attempting to set both or neither will
2324 * result in a failed request). If `all_values` is set to either `ALLOW` or
2325 * `DENY`, `allowed_values` and `denied_values` must be unset.
2326 */
2327 class ListPolicy {
2328 /**
2329 * The policy all_values state.
2330 * Possible string values are:
2331 * - "ALL_VALUES_UNSPECIFIED" : Indicates that either allowed_values or
2332 * denied_values must be set.
2333 * - "ALLOW" : A policy with this set allows all values.
2334 * - "DENY" : A policy with this set denies all values.
2335 */
2336 core.String allValues;
2337 /**
2338 * List of values allowed at this resource. an only be set if no values are
2339 * set for `denied_values` and `all_values` is set to
2340 * `ALL_VALUES_UNSPECIFIED`.
2341 */
2342 core.List<core.String> allowedValues;
2343 /**
2344 * List of values denied at this resource. Can only be set if no values are
2345 * set for `allowed_values` and `all_values` is set to
2346 * `ALL_VALUES_UNSPECIFIED`.
2347 */
2348 core.List<core.String> deniedValues;
2349 /**
2350 * Determines the inheritance behavior for this `Policy`.
2351 *
2352 * By default, a `ListPolicy` set at a resource supercedes any `Policy` set
2353 * anywhere up the resource hierarchy. However, if `inherit_from_parent` is
2354 * set to `true`, then the values from the effective `Policy` of the parent
2355 * resource are inherited, meaning the values set in this `Policy` are
2356 * added to the values inherited up the hierarchy.
2357 *
2358 * Setting `Policy` hierarchies that inherit both allowed values and denied
2359 * values isn't recommended in most circumstances to keep the configuration
2360 * simple and understandable. However, it is possible to set a `Policy` with
2361 * `allowed_values` set that inherits a `Policy` with `denied_values` set.
2362 * In this case, the values that are allowed must be in `allowed_values` and
2363 * not present in `denied_values`.
2364 *
2365 * For example, suppose you have a `Constraint`
2366 * `constraints/serviceuser.services`, which has a `constraint_type` of
2367 * `list_constraint`, and with `constraint_default` set to `ALLOW`.
2368 * Suppose that at the Organization level, a `Policy` is applied that
2369 * restricts the allowed API activations to {`E1`, `E2`}. Then, if a
2370 * `Policy` is applied to a project below the Organization that has
2371 * `inherit_from_parent` set to `false` and field all_values set to DENY,
2372 * then an attempt to activate any API will be denied.
2373 *
2374 * The following examples demonstrate different possible layerings:
2375 *
2376 * Example 1 (no inherited values):
2377 * `organizations/foo` has a `Policy` with values:
2378 * {allowed_values: “E1” allowed_values:”E2”}
2379 * ``projects/bar`` has `inherit_from_parent` `false` and values:
2380 * {allowed_values: "E3" allowed_values: "E4"}
2381 * The accepted values at `organizations/foo` are `E1`, `E2`.
2382 * The accepted values at `projects/bar` are `E3`, and `E4`.
2383 *
2384 * Example 2 (inherited values):
2385 * `organizations/foo` has a `Policy` with values:
2386 * {allowed_values: “E1” allowed_values:”E2”}
2387 * `projects/bar` has a `Policy` with values:
2388 * {value: “E3” value: ”E4” inherit_from_parent: true}
2389 * The accepted values at `organizations/foo` are `E1`, `E2`.
2390 * The accepted values at `projects/bar` are `E1`, `E2`, `E3`, and `E4`.
2391 *
2392 * Example 3 (inheriting both allowed and denied values):
2393 * `organizations/foo` has a `Policy` with values:
2394 * {allowed_values: "E1" allowed_values: "E2"}
2395 * `projects/bar` has a `Policy` with:
2396 * {denied_values: "E1"}
2397 * The accepted values at `organizations/foo` are `E1`, `E2`.
2398 * The value accepted at `projects/bar` is `E2`.
2399 *
2400 * Example 4 (RestoreDefault):
2401 * `organizations/foo` has a `Policy` with values:
2402 * {allowed_values: “E1” allowed_values:”E2”}
2403 * `projects/bar` has a `Policy` with values:
2404 * {RestoreDefault: {}}
2405 * The accepted values at `organizations/foo` are `E1`, `E2`.
2406 * The accepted values at `projects/bar` are either all or none depending on
2407 * the value of `constraint_default` (if `ALLOW`, all; if
2408 * `DENY`, none).
2409 *
2410 * Example 5 (no policy inherits parent policy):
2411 * `organizations/foo` has no `Policy` set.
2412 * `projects/bar` has no `Policy` set.
2413 * The accepted values at both levels are either all or none depending on
2414 * the value of `constraint_default` (if `ALLOW`, all; if
2415 * `DENY`, none).
2416 *
2417 * Example 6 (ListConstraint allowing all):
2418 * `organizations/foo` has a `Policy` with values:
2419 * {allowed_values: “E1” allowed_values: ”E2”}
2420 * `projects/bar` has a `Policy` with:
2421 * {all: ALLOW}
2422 * The accepted values at `organizations/foo` are `E1`, E2`.
2423 * Any value is accepted at `projects/bar`.
2424 *
2425 * Example 7 (ListConstraint allowing none):
2426 * `organizations/foo` has a `Policy` with values:
2427 * {allowed_values: “E1” allowed_values: ”E2”}
2428 * `projects/bar` has a `Policy` with:
2429 * {all: DENY}
2430 * The accepted values at `organizations/foo` are `E1`, E2`.
2431 * No value is accepted at `projects/bar`.
2432 */
2433 core.bool inheritFromParent;
2434 /**
2435 * Optional. The Google Cloud Console will try to default to a configuration
2436 * that matches the value specified in this `Policy`. If `suggested_value`
2437 * is not set, it will inherit the value specified higher in the hierarchy,
2438 * unless `inherit_from_parent` is `false`.
2439 */
2440 core.String suggestedValue;
2441
2442 ListPolicy();
2443
2444 ListPolicy.fromJson(core.Map _json) {
2445 if (_json.containsKey("allValues")) {
2446 allValues = _json["allValues"];
2447 }
2448 if (_json.containsKey("allowedValues")) {
2449 allowedValues = _json["allowedValues"];
2450 }
2451 if (_json.containsKey("deniedValues")) {
2452 deniedValues = _json["deniedValues"];
2453 }
2454 if (_json.containsKey("inheritFromParent")) {
2455 inheritFromParent = _json["inheritFromParent"];
2456 }
2457 if (_json.containsKey("suggestedValue")) {
2458 suggestedValue = _json["suggestedValue"];
2459 }
2460 }
2461
2462 core.Map toJson() {
2463 var _json = new core.Map();
2464 if (allValues != null) {
2465 _json["allValues"] = allValues;
2466 }
2467 if (allowedValues != null) {
2468 _json["allowedValues"] = allowedValues;
2469 }
2470 if (deniedValues != null) {
2471 _json["deniedValues"] = deniedValues;
2472 }
2473 if (inheritFromParent != null) {
2474 _json["inheritFromParent"] = inheritFromParent;
2475 }
2476 if (suggestedValue != null) {
2477 _json["suggestedValue"] = suggestedValue;
2478 }
2479 return _json;
2480 }
2481 }
2482
2483 /**
1234 * A page of the response received from the 2484 * A page of the response received from the
1235 * ListProjects 2485 * ListProjects
1236 * method. 2486 * method.
1237 * 2487 *
1238 * A paginated response where more pages are available has 2488 * A paginated response where more pages are available has
1239 * `next_page_token` set. This token can be used in a subsequent request to 2489 * `next_page_token` set. This token can be used in a subsequent request to
1240 * retrieve the next request page. 2490 * retrieve the next request page.
1241 */ 2491 */
1242 class ListProjectsResponse { 2492 class ListProjectsResponse {
1243 /** 2493 /**
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 _json["nextPageToken"] = nextPageToken; 2527 _json["nextPageToken"] = nextPageToken;
1278 } 2528 }
1279 if (projects != null) { 2529 if (projects != null) {
1280 _json["projects"] = projects.map((value) => (value).toJson()).toList(); 2530 _json["projects"] = projects.map((value) => (value).toJson()).toList();
1281 } 2531 }
1282 return _json; 2532 return _json;
1283 } 2533 }
1284 } 2534 }
1285 2535
1286 /** 2536 /**
2537 * Defines a Cloud Organization `Policy` which is used to specify `Constraints`
2538 * for configurations of Cloud Platform resources.
2539 */
2540 class OrgPolicy {
2541 /** For boolean `Constraints`, whether to enforce the `Constraint` or not. */
2542 BooleanPolicy booleanPolicy;
2543 /**
2544 * The name of the `Constraint` the `Policy` is configuring, for example,
2545 * `constraints/serviceuser.services`.
2546 *
2547 * Immutable after creation.
2548 */
2549 core.String constraint;
2550 /**
2551 * An opaque tag indicating the current version of the `Policy`, used for
2552 * concurrency control.
2553 *
2554 * When the `Policy` is returned from either a `GetPolicy` or a
2555 * `ListOrgPolicy` request, this `etag` indicates the version of the current
2556 * `Policy` to use when executing a read-modify-write loop.
2557 *
2558 * When the `Policy` is returned from a `GetEffectivePolicy` request, the
2559 * `etag` will be unset.
2560 *
2561 * When the `Policy` is used in a `SetOrgPolicy` method, use the `etag` value
2562 * that was returned from a `GetOrgPolicy` request as part of a
2563 * read-modify-write loop for concurrency control. Not setting the `etag`in a
2564 * `SetOrgPolicy` request will result in an unconditional write of the
2565 * `Policy`.
2566 */
2567 core.String etag;
2568 core.List<core.int> get etagAsBytes {
2569 return convert.BASE64.decode(etag);
2570 }
2571
2572 void set etagAsBytes(core.List<core.int> _bytes) {
2573 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
2574 }
2575 /** List of values either allowed or disallowed. */
2576 ListPolicy listPolicy;
2577 /**
2578 * Restores the default behavior of the constraint; independent of
2579 * `Constraint` type.
2580 */
2581 RestoreDefault restoreDefault;
2582 /**
2583 * The time stamp the `Policy` was previously updated. This is set by the
2584 * server, not specified by the caller, and represents the last time a call to
2585 * `SetOrgPolicy` was made for that `Policy`. Any value set by the client will
2586 * be ignored.
2587 */
2588 core.String updateTime;
2589 /** Version of the `Policy`. Default version is 0; */
2590 core.int version;
2591
2592 OrgPolicy();
2593
2594 OrgPolicy.fromJson(core.Map _json) {
2595 if (_json.containsKey("booleanPolicy")) {
2596 booleanPolicy = new BooleanPolicy.fromJson(_json["booleanPolicy"]);
2597 }
2598 if (_json.containsKey("constraint")) {
2599 constraint = _json["constraint"];
2600 }
2601 if (_json.containsKey("etag")) {
2602 etag = _json["etag"];
2603 }
2604 if (_json.containsKey("listPolicy")) {
2605 listPolicy = new ListPolicy.fromJson(_json["listPolicy"]);
2606 }
2607 if (_json.containsKey("restoreDefault")) {
2608 restoreDefault = new RestoreDefault.fromJson(_json["restoreDefault"]);
2609 }
2610 if (_json.containsKey("updateTime")) {
2611 updateTime = _json["updateTime"];
2612 }
2613 if (_json.containsKey("version")) {
2614 version = _json["version"];
2615 }
2616 }
2617
2618 core.Map toJson() {
2619 var _json = new core.Map();
2620 if (booleanPolicy != null) {
2621 _json["booleanPolicy"] = (booleanPolicy).toJson();
2622 }
2623 if (constraint != null) {
2624 _json["constraint"] = constraint;
2625 }
2626 if (etag != null) {
2627 _json["etag"] = etag;
2628 }
2629 if (listPolicy != null) {
2630 _json["listPolicy"] = (listPolicy).toJson();
2631 }
2632 if (restoreDefault != null) {
2633 _json["restoreDefault"] = (restoreDefault).toJson();
2634 }
2635 if (updateTime != null) {
2636 _json["updateTime"] = updateTime;
2637 }
2638 if (version != null) {
2639 _json["version"] = version;
2640 }
2641 return _json;
2642 }
2643 }
2644
2645 /**
1287 * The root node in the resource hierarchy to which a particular entity's 2646 * The root node in the resource hierarchy to which a particular entity's
1288 * (e.g., company) resources belong. 2647 * (e.g., company) resources belong.
1289 */ 2648 */
1290 class Organization { 2649 class Organization {
1291 /** 2650 /**
1292 * Timestamp when the Organization was created. Assigned by the server. 2651 * Timestamp when the Organization was created. Assigned by the server.
1293 * @OutputOnly 2652 * @OutputOnly
1294 */ 2653 */
1295 core.String creationTime; 2654 core.String creationTime;
1296 /** 2655 /**
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1432 * "role": "roles/viewer", 2791 * "role": "roles/viewer",
1433 * "members": ["user:sean@example.com"] 2792 * "members": ["user:sean@example.com"]
1434 * } 2793 * }
1435 * ] 2794 * ]
1436 * } 2795 * }
1437 * 2796 *
1438 * For a description of IAM and its features, see the 2797 * For a description of IAM and its features, see the
1439 * [IAM developer's guide](https://cloud.google.com/iam). 2798 * [IAM developer's guide](https://cloud.google.com/iam).
1440 */ 2799 */
1441 class Policy { 2800 class Policy {
2801 /** Specifies cloud audit logging configuration for this policy. */
2802 core.List<AuditConfig> auditConfigs;
1442 /** 2803 /**
1443 * Associates a list of `members` to a `role`. 2804 * Associates a list of `members` to a `role`.
1444 * Multiple `bindings` must not be specified for the same `role`. 2805 * Multiple `bindings` must not be specified for the same `role`.
1445 * `bindings` with no members will result in an error. 2806 * `bindings` with no members will result in an error.
1446 */ 2807 */
1447 core.List<Binding> bindings; 2808 core.List<Binding> bindings;
1448 /** 2809 /**
1449 * `etag` is used for optimistic concurrency control as a way to help 2810 * `etag` is used for optimistic concurrency control as a way to help
1450 * prevent simultaneous updates of a policy from overwriting each other. 2811 * prevent simultaneous updates of a policy from overwriting each other.
1451 * It is strongly suggested that systems make use of the `etag` in the 2812 * It is strongly suggested that systems make use of the `etag` in the
(...skipping 12 matching lines...) Expand all
1464 2825
1465 void set etagAsBytes(core.List<core.int> _bytes) { 2826 void set etagAsBytes(core.List<core.int> _bytes) {
1466 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- "); 2827 etag = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "- ");
1467 } 2828 }
1468 /** Version of the `Policy`. The default version is 0. */ 2829 /** Version of the `Policy`. The default version is 0. */
1469 core.int version; 2830 core.int version;
1470 2831
1471 Policy(); 2832 Policy();
1472 2833
1473 Policy.fromJson(core.Map _json) { 2834 Policy.fromJson(core.Map _json) {
2835 if (_json.containsKey("auditConfigs")) {
2836 auditConfigs = _json["auditConfigs"].map((value) => new AuditConfig.fromJs on(value)).toList();
2837 }
1474 if (_json.containsKey("bindings")) { 2838 if (_json.containsKey("bindings")) {
1475 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList(); 2839 bindings = _json["bindings"].map((value) => new Binding.fromJson(value)).t oList();
1476 } 2840 }
1477 if (_json.containsKey("etag")) { 2841 if (_json.containsKey("etag")) {
1478 etag = _json["etag"]; 2842 etag = _json["etag"];
1479 } 2843 }
1480 if (_json.containsKey("version")) { 2844 if (_json.containsKey("version")) {
1481 version = _json["version"]; 2845 version = _json["version"];
1482 } 2846 }
1483 } 2847 }
1484 2848
1485 core.Map toJson() { 2849 core.Map toJson() {
1486 var _json = new core.Map(); 2850 var _json = new core.Map();
2851 if (auditConfigs != null) {
2852 _json["auditConfigs"] = auditConfigs.map((value) => (value).toJson()).toLi st();
2853 }
1487 if (bindings != null) { 2854 if (bindings != null) {
1488 _json["bindings"] = bindings.map((value) => (value).toJson()).toList(); 2855 _json["bindings"] = bindings.map((value) => (value).toJson()).toList();
1489 } 2856 }
1490 if (etag != null) { 2857 if (etag != null) {
1491 _json["etag"] = etag; 2858 _json["etag"] = etag;
1492 } 2859 }
1493 if (version != null) { 2860 if (version != null) {
1494 _json["version"] = version; 2861 _json["version"] = version;
1495 } 2862 }
1496 return _json; 2863 return _json;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
1716 if (id != null) { 3083 if (id != null) {
1717 _json["id"] = id; 3084 _json["id"] = id;
1718 } 3085 }
1719 if (type != null) { 3086 if (type != null) {
1720 _json["type"] = type; 3087 _json["type"] = type;
1721 } 3088 }
1722 return _json; 3089 return _json;
1723 } 3090 }
1724 } 3091 }
1725 3092
3093 /**
3094 * Ignores policies set above this resource and restores the
3095 * `constraint_default` enforcement behavior of the specific `Constraint` at
3096 * this resource.
3097 *
3098 * Suppose that `constraint_default` is set to `ALLOW` for the
3099 * `Constraint` `constraints/serviceuser.services`. Suppose that organization
3100 * foo.com sets a `Policy` at their Organization resource node that restricts
3101 * the allowed service activations to deny all service activations. They
3102 * could then set a `Policy` with the `policy_type` `restore_default` on
3103 * several experimental projects, restoring the `constraint_default`
3104 * enforcement of the `Constraint` for only those projects, allowing those
3105 * projects to have all services activated.
3106 */
3107 class RestoreDefault {
3108
3109 RestoreDefault();
3110
3111 RestoreDefault.fromJson(core.Map _json) {
3112 }
3113
3114 core.Map toJson() {
3115 var _json = new core.Map();
3116 return _json;
3117 }
3118 }
3119
1726 /** Request message for `SetIamPolicy` method. */ 3120 /** Request message for `SetIamPolicy` method. */
1727 class SetIamPolicyRequest { 3121 class SetIamPolicyRequest {
1728 /** 3122 /**
1729 * REQUIRED: The complete policy to be applied to the `resource`. The size of 3123 * REQUIRED: The complete policy to be applied to the `resource`. The size of
1730 * the policy is limited to a few 10s of KB. An empty policy is a 3124 * the policy is limited to a few 10s of KB. An empty policy is a
1731 * valid policy but certain Cloud Platform services (such as Projects) 3125 * valid policy but certain Cloud Platform services (such as Projects)
1732 * might reject them. 3126 * might reject them.
1733 */ 3127 */
1734 Policy policy; 3128 Policy policy;
3129 /**
3130 * OPTIONAL: A FieldMask specifying which fields of the policy to modify. Only
3131 * the fields in the mask will be modified. If no mask is provided, the
3132 * following default mask is used:
3133 * paths: "bindings, etag"
3134 * This field is only used by Cloud IAM.
3135 */
3136 core.String updateMask;
1735 3137
1736 SetIamPolicyRequest(); 3138 SetIamPolicyRequest();
1737 3139
1738 SetIamPolicyRequest.fromJson(core.Map _json) { 3140 SetIamPolicyRequest.fromJson(core.Map _json) {
1739 if (_json.containsKey("policy")) { 3141 if (_json.containsKey("policy")) {
1740 policy = new Policy.fromJson(_json["policy"]); 3142 policy = new Policy.fromJson(_json["policy"]);
1741 } 3143 }
3144 if (_json.containsKey("updateMask")) {
3145 updateMask = _json["updateMask"];
3146 }
1742 } 3147 }
1743 3148
1744 core.Map toJson() { 3149 core.Map toJson() {
3150 var _json = new core.Map();
3151 if (policy != null) {
3152 _json["policy"] = (policy).toJson();
3153 }
3154 if (updateMask != null) {
3155 _json["updateMask"] = updateMask;
3156 }
3157 return _json;
3158 }
3159 }
3160
3161 /** The request sent to the SetOrgPolicyRequest method. */
3162 class SetOrgPolicyRequest {
3163 /** `Policy` to set on the resource. */
3164 OrgPolicy policy;
3165
3166 SetOrgPolicyRequest();
3167
3168 SetOrgPolicyRequest.fromJson(core.Map _json) {
3169 if (_json.containsKey("policy")) {
3170 policy = new OrgPolicy.fromJson(_json["policy"]);
3171 }
3172 }
3173
3174 core.Map toJson() {
1745 var _json = new core.Map(); 3175 var _json = new core.Map();
1746 if (policy != null) { 3176 if (policy != null) {
1747 _json["policy"] = (policy).toJson(); 3177 _json["policy"] = (policy).toJson();
1748 } 3178 }
1749 return _json; 3179 return _json;
1750 } 3180 }
1751 } 3181 }
1752 3182
1753 /** Request message for `TestIamPermissions` method. */ 3183 /** Request message for `TestIamPermissions` method. */
1754 class TestIamPermissionsRequest { 3184 class TestIamPermissionsRequest {
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1811 UndeleteProjectRequest(); 3241 UndeleteProjectRequest();
1812 3242
1813 UndeleteProjectRequest.fromJson(core.Map _json) { 3243 UndeleteProjectRequest.fromJson(core.Map _json) {
1814 } 3244 }
1815 3245
1816 core.Map toJson() { 3246 core.Map toJson() {
1817 var _json = new core.Map(); 3247 var _json = new core.Map();
1818 return _json; 3248 return _json;
1819 } 3249 }
1820 } 3250 }
OLDNEW
« no previous file with comments | « generated/googleapis_beta/lib/cloudkms/v1beta1.dart ('k') | generated/googleapis_beta/lib/dataflow/v1b3.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698