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

Side by Side Diff: generated/googleapis_beta/test/cloudresourcemanager/v1beta1_test.dart

Issue 2779563003: Api-roll 47: 2017-03-27 (Closed)
Patch Set: Created 3 years, 8 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 library googleapis_beta.cloudresourcemanager.v1beta1.test; 1 library googleapis_beta.cloudresourcemanager.v1beta1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:unittest/unittest.dart' as unittest;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 } 63 }
64 64
65 checkAncestor(api.Ancestor o) { 65 checkAncestor(api.Ancestor o) {
66 buildCounterAncestor++; 66 buildCounterAncestor++;
67 if (buildCounterAncestor < 3) { 67 if (buildCounterAncestor < 3) {
68 checkResourceId(o.resourceId); 68 checkResourceId(o.resourceId);
69 } 69 }
70 buildCounterAncestor--; 70 buildCounterAncestor--;
71 } 71 }
72 72
73 buildUnnamed3312() { 73 buildUnnamed3422() {
74 var o = new core.List<api.AuditLogConfig>();
75 o.add(buildAuditLogConfig());
76 o.add(buildAuditLogConfig());
77 return o;
78 }
79
80 checkUnnamed3422(core.List<api.AuditLogConfig> o) {
81 unittest.expect(o, unittest.hasLength(2));
82 checkAuditLogConfig(o[0]);
83 checkAuditLogConfig(o[1]);
84 }
85
86 core.int buildCounterAuditConfig = 0;
87 buildAuditConfig() {
88 var o = new api.AuditConfig();
89 buildCounterAuditConfig++;
90 if (buildCounterAuditConfig < 3) {
91 o.auditLogConfigs = buildUnnamed3422();
92 o.service = "foo";
93 }
94 buildCounterAuditConfig--;
95 return o;
96 }
97
98 checkAuditConfig(api.AuditConfig o) {
99 buildCounterAuditConfig++;
100 if (buildCounterAuditConfig < 3) {
101 checkUnnamed3422(o.auditLogConfigs);
102 unittest.expect(o.service, unittest.equals('foo'));
103 }
104 buildCounterAuditConfig--;
105 }
106
107 buildUnnamed3423() {
74 var o = new core.List<core.String>(); 108 var o = new core.List<core.String>();
75 o.add("foo"); 109 o.add("foo");
76 o.add("foo"); 110 o.add("foo");
77 return o; 111 return o;
78 } 112 }
79 113
80 checkUnnamed3312(core.List<core.String> o) { 114 checkUnnamed3423(core.List<core.String> o) {
81 unittest.expect(o, unittest.hasLength(2)); 115 unittest.expect(o, unittest.hasLength(2));
82 unittest.expect(o[0], unittest.equals('foo')); 116 unittest.expect(o[0], unittest.equals('foo'));
83 unittest.expect(o[1], unittest.equals('foo')); 117 unittest.expect(o[1], unittest.equals('foo'));
118 }
119
120 core.int buildCounterAuditLogConfig = 0;
121 buildAuditLogConfig() {
122 var o = new api.AuditLogConfig();
123 buildCounterAuditLogConfig++;
124 if (buildCounterAuditLogConfig < 3) {
125 o.exemptedMembers = buildUnnamed3423();
126 o.logType = "foo";
127 }
128 buildCounterAuditLogConfig--;
129 return o;
130 }
131
132 checkAuditLogConfig(api.AuditLogConfig o) {
133 buildCounterAuditLogConfig++;
134 if (buildCounterAuditLogConfig < 3) {
135 checkUnnamed3423(o.exemptedMembers);
136 unittest.expect(o.logType, unittest.equals('foo'));
137 }
138 buildCounterAuditLogConfig--;
139 }
140
141 buildUnnamed3424() {
142 var o = new core.List<core.String>();
143 o.add("foo");
144 o.add("foo");
145 return o;
146 }
147
148 checkUnnamed3424(core.List<core.String> o) {
149 unittest.expect(o, unittest.hasLength(2));
150 unittest.expect(o[0], unittest.equals('foo'));
151 unittest.expect(o[1], unittest.equals('foo'));
84 } 152 }
85 153
86 core.int buildCounterBinding = 0; 154 core.int buildCounterBinding = 0;
87 buildBinding() { 155 buildBinding() {
88 var o = new api.Binding(); 156 var o = new api.Binding();
89 buildCounterBinding++; 157 buildCounterBinding++;
90 if (buildCounterBinding < 3) { 158 if (buildCounterBinding < 3) {
91 o.members = buildUnnamed3312(); 159 o.members = buildUnnamed3424();
92 o.role = "foo"; 160 o.role = "foo";
93 } 161 }
94 buildCounterBinding--; 162 buildCounterBinding--;
95 return o; 163 return o;
96 } 164 }
97 165
98 checkBinding(api.Binding o) { 166 checkBinding(api.Binding o) {
99 buildCounterBinding++; 167 buildCounterBinding++;
100 if (buildCounterBinding < 3) { 168 if (buildCounterBinding < 3) {
101 checkUnnamed3312(o.members); 169 checkUnnamed3424(o.members);
102 unittest.expect(o.role, unittest.equals('foo')); 170 unittest.expect(o.role, unittest.equals('foo'));
103 } 171 }
104 buildCounterBinding--; 172 buildCounterBinding--;
105 } 173 }
106 174
175 core.int buildCounterBooleanConstraint = 0;
176 buildBooleanConstraint() {
177 var o = new api.BooleanConstraint();
178 buildCounterBooleanConstraint++;
179 if (buildCounterBooleanConstraint < 3) {
180 }
181 buildCounterBooleanConstraint--;
182 return o;
183 }
184
185 checkBooleanConstraint(api.BooleanConstraint o) {
186 buildCounterBooleanConstraint++;
187 if (buildCounterBooleanConstraint < 3) {
188 }
189 buildCounterBooleanConstraint--;
190 }
191
192 core.int buildCounterBooleanPolicy = 0;
193 buildBooleanPolicy() {
194 var o = new api.BooleanPolicy();
195 buildCounterBooleanPolicy++;
196 if (buildCounterBooleanPolicy < 3) {
197 o.enforced = true;
198 }
199 buildCounterBooleanPolicy--;
200 return o;
201 }
202
203 checkBooleanPolicy(api.BooleanPolicy o) {
204 buildCounterBooleanPolicy++;
205 if (buildCounterBooleanPolicy < 3) {
206 unittest.expect(o.enforced, unittest.isTrue);
207 }
208 buildCounterBooleanPolicy--;
209 }
210
211 core.int buildCounterClearOrgPolicyRequest = 0;
212 buildClearOrgPolicyRequest() {
213 var o = new api.ClearOrgPolicyRequest();
214 buildCounterClearOrgPolicyRequest++;
215 if (buildCounterClearOrgPolicyRequest < 3) {
216 o.constraint = "foo";
217 o.etag = "foo";
218 }
219 buildCounterClearOrgPolicyRequest--;
220 return o;
221 }
222
223 checkClearOrgPolicyRequest(api.ClearOrgPolicyRequest o) {
224 buildCounterClearOrgPolicyRequest++;
225 if (buildCounterClearOrgPolicyRequest < 3) {
226 unittest.expect(o.constraint, unittest.equals('foo'));
227 unittest.expect(o.etag, unittest.equals('foo'));
228 }
229 buildCounterClearOrgPolicyRequest--;
230 }
231
232 core.int buildCounterConstraint = 0;
233 buildConstraint() {
234 var o = new api.Constraint();
235 buildCounterConstraint++;
236 if (buildCounterConstraint < 3) {
237 o.booleanConstraint = buildBooleanConstraint();
238 o.constraintDefault = "foo";
239 o.description = "foo";
240 o.displayName = "foo";
241 o.listConstraint = buildListConstraint();
242 o.name = "foo";
243 o.version = 42;
244 }
245 buildCounterConstraint--;
246 return o;
247 }
248
249 checkConstraint(api.Constraint o) {
250 buildCounterConstraint++;
251 if (buildCounterConstraint < 3) {
252 checkBooleanConstraint(o.booleanConstraint);
253 unittest.expect(o.constraintDefault, unittest.equals('foo'));
254 unittest.expect(o.description, unittest.equals('foo'));
255 unittest.expect(o.displayName, unittest.equals('foo'));
256 checkListConstraint(o.listConstraint);
257 unittest.expect(o.name, unittest.equals('foo'));
258 unittest.expect(o.version, unittest.equals(42));
259 }
260 buildCounterConstraint--;
261 }
262
107 core.int buildCounterEmpty = 0; 263 core.int buildCounterEmpty = 0;
108 buildEmpty() { 264 buildEmpty() {
109 var o = new api.Empty(); 265 var o = new api.Empty();
110 buildCounterEmpty++; 266 buildCounterEmpty++;
111 if (buildCounterEmpty < 3) { 267 if (buildCounterEmpty < 3) {
112 } 268 }
113 buildCounterEmpty--; 269 buildCounterEmpty--;
114 return o; 270 return o;
115 } 271 }
116 272
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return o; 331 return o;
176 } 332 }
177 333
178 checkGetAncestryRequest(api.GetAncestryRequest o) { 334 checkGetAncestryRequest(api.GetAncestryRequest o) {
179 buildCounterGetAncestryRequest++; 335 buildCounterGetAncestryRequest++;
180 if (buildCounterGetAncestryRequest < 3) { 336 if (buildCounterGetAncestryRequest < 3) {
181 } 337 }
182 buildCounterGetAncestryRequest--; 338 buildCounterGetAncestryRequest--;
183 } 339 }
184 340
185 buildUnnamed3313() { 341 buildUnnamed3425() {
186 var o = new core.List<api.Ancestor>(); 342 var o = new core.List<api.Ancestor>();
187 o.add(buildAncestor()); 343 o.add(buildAncestor());
188 o.add(buildAncestor()); 344 o.add(buildAncestor());
189 return o; 345 return o;
190 } 346 }
191 347
192 checkUnnamed3313(core.List<api.Ancestor> o) { 348 checkUnnamed3425(core.List<api.Ancestor> o) {
193 unittest.expect(o, unittest.hasLength(2)); 349 unittest.expect(o, unittest.hasLength(2));
194 checkAncestor(o[0]); 350 checkAncestor(o[0]);
195 checkAncestor(o[1]); 351 checkAncestor(o[1]);
196 } 352 }
197 353
198 core.int buildCounterGetAncestryResponse = 0; 354 core.int buildCounterGetAncestryResponse = 0;
199 buildGetAncestryResponse() { 355 buildGetAncestryResponse() {
200 var o = new api.GetAncestryResponse(); 356 var o = new api.GetAncestryResponse();
201 buildCounterGetAncestryResponse++; 357 buildCounterGetAncestryResponse++;
202 if (buildCounterGetAncestryResponse < 3) { 358 if (buildCounterGetAncestryResponse < 3) {
203 o.ancestor = buildUnnamed3313(); 359 o.ancestor = buildUnnamed3425();
204 } 360 }
205 buildCounterGetAncestryResponse--; 361 buildCounterGetAncestryResponse--;
206 return o; 362 return o;
207 } 363 }
208 364
209 checkGetAncestryResponse(api.GetAncestryResponse o) { 365 checkGetAncestryResponse(api.GetAncestryResponse o) {
210 buildCounterGetAncestryResponse++; 366 buildCounterGetAncestryResponse++;
211 if (buildCounterGetAncestryResponse < 3) { 367 if (buildCounterGetAncestryResponse < 3) {
212 checkUnnamed3313(o.ancestor); 368 checkUnnamed3425(o.ancestor);
213 } 369 }
214 buildCounterGetAncestryResponse--; 370 buildCounterGetAncestryResponse--;
215 } 371 }
216 372
373 core.int buildCounterGetEffectiveOrgPolicyRequest = 0;
374 buildGetEffectiveOrgPolicyRequest() {
375 var o = new api.GetEffectiveOrgPolicyRequest();
376 buildCounterGetEffectiveOrgPolicyRequest++;
377 if (buildCounterGetEffectiveOrgPolicyRequest < 3) {
378 o.constraint = "foo";
379 }
380 buildCounterGetEffectiveOrgPolicyRequest--;
381 return o;
382 }
383
384 checkGetEffectiveOrgPolicyRequest(api.GetEffectiveOrgPolicyRequest o) {
385 buildCounterGetEffectiveOrgPolicyRequest++;
386 if (buildCounterGetEffectiveOrgPolicyRequest < 3) {
387 unittest.expect(o.constraint, unittest.equals('foo'));
388 }
389 buildCounterGetEffectiveOrgPolicyRequest--;
390 }
391
217 core.int buildCounterGetIamPolicyRequest = 0; 392 core.int buildCounterGetIamPolicyRequest = 0;
218 buildGetIamPolicyRequest() { 393 buildGetIamPolicyRequest() {
219 var o = new api.GetIamPolicyRequest(); 394 var o = new api.GetIamPolicyRequest();
220 buildCounterGetIamPolicyRequest++; 395 buildCounterGetIamPolicyRequest++;
221 if (buildCounterGetIamPolicyRequest < 3) { 396 if (buildCounterGetIamPolicyRequest < 3) {
222 } 397 }
223 buildCounterGetIamPolicyRequest--; 398 buildCounterGetIamPolicyRequest--;
224 return o; 399 return o;
225 } 400 }
226 401
227 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) { 402 checkGetIamPolicyRequest(api.GetIamPolicyRequest o) {
228 buildCounterGetIamPolicyRequest++; 403 buildCounterGetIamPolicyRequest++;
229 if (buildCounterGetIamPolicyRequest < 3) { 404 if (buildCounterGetIamPolicyRequest < 3) {
230 } 405 }
231 buildCounterGetIamPolicyRequest--; 406 buildCounterGetIamPolicyRequest--;
232 } 407 }
233 408
234 buildUnnamed3314() { 409 core.int buildCounterGetOrgPolicyRequest = 0;
410 buildGetOrgPolicyRequest() {
411 var o = new api.GetOrgPolicyRequest();
412 buildCounterGetOrgPolicyRequest++;
413 if (buildCounterGetOrgPolicyRequest < 3) {
414 o.constraint = "foo";
415 }
416 buildCounterGetOrgPolicyRequest--;
417 return o;
418 }
419
420 checkGetOrgPolicyRequest(api.GetOrgPolicyRequest o) {
421 buildCounterGetOrgPolicyRequest++;
422 if (buildCounterGetOrgPolicyRequest < 3) {
423 unittest.expect(o.constraint, unittest.equals('foo'));
424 }
425 buildCounterGetOrgPolicyRequest--;
426 }
427
428 core.int buildCounterListAvailableOrgPolicyConstraintsRequest = 0;
429 buildListAvailableOrgPolicyConstraintsRequest() {
430 var o = new api.ListAvailableOrgPolicyConstraintsRequest();
431 buildCounterListAvailableOrgPolicyConstraintsRequest++;
432 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) {
433 o.pageSize = 42;
434 o.pageToken = "foo";
435 }
436 buildCounterListAvailableOrgPolicyConstraintsRequest--;
437 return o;
438 }
439
440 checkListAvailableOrgPolicyConstraintsRequest(api.ListAvailableOrgPolicyConstrai ntsRequest o) {
441 buildCounterListAvailableOrgPolicyConstraintsRequest++;
442 if (buildCounterListAvailableOrgPolicyConstraintsRequest < 3) {
443 unittest.expect(o.pageSize, unittest.equals(42));
444 unittest.expect(o.pageToken, unittest.equals('foo'));
445 }
446 buildCounterListAvailableOrgPolicyConstraintsRequest--;
447 }
448
449 buildUnnamed3426() {
450 var o = new core.List<api.Constraint>();
451 o.add(buildConstraint());
452 o.add(buildConstraint());
453 return o;
454 }
455
456 checkUnnamed3426(core.List<api.Constraint> o) {
457 unittest.expect(o, unittest.hasLength(2));
458 checkConstraint(o[0]);
459 checkConstraint(o[1]);
460 }
461
462 core.int buildCounterListAvailableOrgPolicyConstraintsResponse = 0;
463 buildListAvailableOrgPolicyConstraintsResponse() {
464 var o = new api.ListAvailableOrgPolicyConstraintsResponse();
465 buildCounterListAvailableOrgPolicyConstraintsResponse++;
466 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) {
467 o.constraints = buildUnnamed3426();
468 o.nextPageToken = "foo";
469 }
470 buildCounterListAvailableOrgPolicyConstraintsResponse--;
471 return o;
472 }
473
474 checkListAvailableOrgPolicyConstraintsResponse(api.ListAvailableOrgPolicyConstra intsResponse o) {
475 buildCounterListAvailableOrgPolicyConstraintsResponse++;
476 if (buildCounterListAvailableOrgPolicyConstraintsResponse < 3) {
477 checkUnnamed3426(o.constraints);
478 unittest.expect(o.nextPageToken, unittest.equals('foo'));
479 }
480 buildCounterListAvailableOrgPolicyConstraintsResponse--;
481 }
482
483 core.int buildCounterListConstraint = 0;
484 buildListConstraint() {
485 var o = new api.ListConstraint();
486 buildCounterListConstraint++;
487 if (buildCounterListConstraint < 3) {
488 o.suggestedValue = "foo";
489 }
490 buildCounterListConstraint--;
491 return o;
492 }
493
494 checkListConstraint(api.ListConstraint o) {
495 buildCounterListConstraint++;
496 if (buildCounterListConstraint < 3) {
497 unittest.expect(o.suggestedValue, unittest.equals('foo'));
498 }
499 buildCounterListConstraint--;
500 }
501
502 core.int buildCounterListOrgPoliciesRequest = 0;
503 buildListOrgPoliciesRequest() {
504 var o = new api.ListOrgPoliciesRequest();
505 buildCounterListOrgPoliciesRequest++;
506 if (buildCounterListOrgPoliciesRequest < 3) {
507 o.pageSize = 42;
508 o.pageToken = "foo";
509 }
510 buildCounterListOrgPoliciesRequest--;
511 return o;
512 }
513
514 checkListOrgPoliciesRequest(api.ListOrgPoliciesRequest o) {
515 buildCounterListOrgPoliciesRequest++;
516 if (buildCounterListOrgPoliciesRequest < 3) {
517 unittest.expect(o.pageSize, unittest.equals(42));
518 unittest.expect(o.pageToken, unittest.equals('foo'));
519 }
520 buildCounterListOrgPoliciesRequest--;
521 }
522
523 buildUnnamed3427() {
524 var o = new core.List<api.OrgPolicy>();
525 o.add(buildOrgPolicy());
526 o.add(buildOrgPolicy());
527 return o;
528 }
529
530 checkUnnamed3427(core.List<api.OrgPolicy> o) {
531 unittest.expect(o, unittest.hasLength(2));
532 checkOrgPolicy(o[0]);
533 checkOrgPolicy(o[1]);
534 }
535
536 core.int buildCounterListOrgPoliciesResponse = 0;
537 buildListOrgPoliciesResponse() {
538 var o = new api.ListOrgPoliciesResponse();
539 buildCounterListOrgPoliciesResponse++;
540 if (buildCounterListOrgPoliciesResponse < 3) {
541 o.nextPageToken = "foo";
542 o.policies = buildUnnamed3427();
543 }
544 buildCounterListOrgPoliciesResponse--;
545 return o;
546 }
547
548 checkListOrgPoliciesResponse(api.ListOrgPoliciesResponse o) {
549 buildCounterListOrgPoliciesResponse++;
550 if (buildCounterListOrgPoliciesResponse < 3) {
551 unittest.expect(o.nextPageToken, unittest.equals('foo'));
552 checkUnnamed3427(o.policies);
553 }
554 buildCounterListOrgPoliciesResponse--;
555 }
556
557 buildUnnamed3428() {
235 var o = new core.List<api.Organization>(); 558 var o = new core.List<api.Organization>();
236 o.add(buildOrganization()); 559 o.add(buildOrganization());
237 o.add(buildOrganization()); 560 o.add(buildOrganization());
238 return o; 561 return o;
239 } 562 }
240 563
241 checkUnnamed3314(core.List<api.Organization> o) { 564 checkUnnamed3428(core.List<api.Organization> o) {
242 unittest.expect(o, unittest.hasLength(2)); 565 unittest.expect(o, unittest.hasLength(2));
243 checkOrganization(o[0]); 566 checkOrganization(o[0]);
244 checkOrganization(o[1]); 567 checkOrganization(o[1]);
245 } 568 }
246 569
247 core.int buildCounterListOrganizationsResponse = 0; 570 core.int buildCounterListOrganizationsResponse = 0;
248 buildListOrganizationsResponse() { 571 buildListOrganizationsResponse() {
249 var o = new api.ListOrganizationsResponse(); 572 var o = new api.ListOrganizationsResponse();
250 buildCounterListOrganizationsResponse++; 573 buildCounterListOrganizationsResponse++;
251 if (buildCounterListOrganizationsResponse < 3) { 574 if (buildCounterListOrganizationsResponse < 3) {
252 o.nextPageToken = "foo"; 575 o.nextPageToken = "foo";
253 o.organizations = buildUnnamed3314(); 576 o.organizations = buildUnnamed3428();
254 } 577 }
255 buildCounterListOrganizationsResponse--; 578 buildCounterListOrganizationsResponse--;
256 return o; 579 return o;
257 } 580 }
258 581
259 checkListOrganizationsResponse(api.ListOrganizationsResponse o) { 582 checkListOrganizationsResponse(api.ListOrganizationsResponse o) {
260 buildCounterListOrganizationsResponse++; 583 buildCounterListOrganizationsResponse++;
261 if (buildCounterListOrganizationsResponse < 3) { 584 if (buildCounterListOrganizationsResponse < 3) {
262 unittest.expect(o.nextPageToken, unittest.equals('foo')); 585 unittest.expect(o.nextPageToken, unittest.equals('foo'));
263 checkUnnamed3314(o.organizations); 586 checkUnnamed3428(o.organizations);
264 } 587 }
265 buildCounterListOrganizationsResponse--; 588 buildCounterListOrganizationsResponse--;
266 } 589 }
267 590
268 buildUnnamed3315() { 591 buildUnnamed3429() {
592 var o = new core.List<core.String>();
593 o.add("foo");
594 o.add("foo");
595 return o;
596 }
597
598 checkUnnamed3429(core.List<core.String> o) {
599 unittest.expect(o, unittest.hasLength(2));
600 unittest.expect(o[0], unittest.equals('foo'));
601 unittest.expect(o[1], unittest.equals('foo'));
602 }
603
604 buildUnnamed3430() {
605 var o = new core.List<core.String>();
606 o.add("foo");
607 o.add("foo");
608 return o;
609 }
610
611 checkUnnamed3430(core.List<core.String> o) {
612 unittest.expect(o, unittest.hasLength(2));
613 unittest.expect(o[0], unittest.equals('foo'));
614 unittest.expect(o[1], unittest.equals('foo'));
615 }
616
617 core.int buildCounterListPolicy = 0;
618 buildListPolicy() {
619 var o = new api.ListPolicy();
620 buildCounterListPolicy++;
621 if (buildCounterListPolicy < 3) {
622 o.allValues = "foo";
623 o.allowedValues = buildUnnamed3429();
624 o.deniedValues = buildUnnamed3430();
625 o.inheritFromParent = true;
626 o.suggestedValue = "foo";
627 }
628 buildCounterListPolicy--;
629 return o;
630 }
631
632 checkListPolicy(api.ListPolicy o) {
633 buildCounterListPolicy++;
634 if (buildCounterListPolicy < 3) {
635 unittest.expect(o.allValues, unittest.equals('foo'));
636 checkUnnamed3429(o.allowedValues);
637 checkUnnamed3430(o.deniedValues);
638 unittest.expect(o.inheritFromParent, unittest.isTrue);
639 unittest.expect(o.suggestedValue, unittest.equals('foo'));
640 }
641 buildCounterListPolicy--;
642 }
643
644 buildUnnamed3431() {
269 var o = new core.List<api.Project>(); 645 var o = new core.List<api.Project>();
270 o.add(buildProject()); 646 o.add(buildProject());
271 o.add(buildProject()); 647 o.add(buildProject());
272 return o; 648 return o;
273 } 649 }
274 650
275 checkUnnamed3315(core.List<api.Project> o) { 651 checkUnnamed3431(core.List<api.Project> o) {
276 unittest.expect(o, unittest.hasLength(2)); 652 unittest.expect(o, unittest.hasLength(2));
277 checkProject(o[0]); 653 checkProject(o[0]);
278 checkProject(o[1]); 654 checkProject(o[1]);
279 } 655 }
280 656
281 core.int buildCounterListProjectsResponse = 0; 657 core.int buildCounterListProjectsResponse = 0;
282 buildListProjectsResponse() { 658 buildListProjectsResponse() {
283 var o = new api.ListProjectsResponse(); 659 var o = new api.ListProjectsResponse();
284 buildCounterListProjectsResponse++; 660 buildCounterListProjectsResponse++;
285 if (buildCounterListProjectsResponse < 3) { 661 if (buildCounterListProjectsResponse < 3) {
286 o.nextPageToken = "foo"; 662 o.nextPageToken = "foo";
287 o.projects = buildUnnamed3315(); 663 o.projects = buildUnnamed3431();
288 } 664 }
289 buildCounterListProjectsResponse--; 665 buildCounterListProjectsResponse--;
290 return o; 666 return o;
291 } 667 }
292 668
293 checkListProjectsResponse(api.ListProjectsResponse o) { 669 checkListProjectsResponse(api.ListProjectsResponse o) {
294 buildCounterListProjectsResponse++; 670 buildCounterListProjectsResponse++;
295 if (buildCounterListProjectsResponse < 3) { 671 if (buildCounterListProjectsResponse < 3) {
296 unittest.expect(o.nextPageToken, unittest.equals('foo')); 672 unittest.expect(o.nextPageToken, unittest.equals('foo'));
297 checkUnnamed3315(o.projects); 673 checkUnnamed3431(o.projects);
298 } 674 }
299 buildCounterListProjectsResponse--; 675 buildCounterListProjectsResponse--;
300 } 676 }
301 677
678 core.int buildCounterOrgPolicy = 0;
679 buildOrgPolicy() {
680 var o = new api.OrgPolicy();
681 buildCounterOrgPolicy++;
682 if (buildCounterOrgPolicy < 3) {
683 o.booleanPolicy = buildBooleanPolicy();
684 o.constraint = "foo";
685 o.etag = "foo";
686 o.listPolicy = buildListPolicy();
687 o.restoreDefault = buildRestoreDefault();
688 o.updateTime = "foo";
689 o.version = 42;
690 }
691 buildCounterOrgPolicy--;
692 return o;
693 }
694
695 checkOrgPolicy(api.OrgPolicy o) {
696 buildCounterOrgPolicy++;
697 if (buildCounterOrgPolicy < 3) {
698 checkBooleanPolicy(o.booleanPolicy);
699 unittest.expect(o.constraint, unittest.equals('foo'));
700 unittest.expect(o.etag, unittest.equals('foo'));
701 checkListPolicy(o.listPolicy);
702 checkRestoreDefault(o.restoreDefault);
703 unittest.expect(o.updateTime, unittest.equals('foo'));
704 unittest.expect(o.version, unittest.equals(42));
705 }
706 buildCounterOrgPolicy--;
707 }
708
302 core.int buildCounterOrganization = 0; 709 core.int buildCounterOrganization = 0;
303 buildOrganization() { 710 buildOrganization() {
304 var o = new api.Organization(); 711 var o = new api.Organization();
305 buildCounterOrganization++; 712 buildCounterOrganization++;
306 if (buildCounterOrganization < 3) { 713 if (buildCounterOrganization < 3) {
307 o.creationTime = "foo"; 714 o.creationTime = "foo";
308 o.displayName = "foo"; 715 o.displayName = "foo";
309 o.lifecycleState = "foo"; 716 o.lifecycleState = "foo";
310 o.name = "foo"; 717 o.name = "foo";
311 o.organizationId = "foo"; 718 o.organizationId = "foo";
(...skipping 28 matching lines...) Expand all
340 } 747 }
341 748
342 checkOrganizationOwner(api.OrganizationOwner o) { 749 checkOrganizationOwner(api.OrganizationOwner o) {
343 buildCounterOrganizationOwner++; 750 buildCounterOrganizationOwner++;
344 if (buildCounterOrganizationOwner < 3) { 751 if (buildCounterOrganizationOwner < 3) {
345 unittest.expect(o.directoryCustomerId, unittest.equals('foo')); 752 unittest.expect(o.directoryCustomerId, unittest.equals('foo'));
346 } 753 }
347 buildCounterOrganizationOwner--; 754 buildCounterOrganizationOwner--;
348 } 755 }
349 756
350 buildUnnamed3316() { 757 buildUnnamed3432() {
758 var o = new core.List<api.AuditConfig>();
759 o.add(buildAuditConfig());
760 o.add(buildAuditConfig());
761 return o;
762 }
763
764 checkUnnamed3432(core.List<api.AuditConfig> o) {
765 unittest.expect(o, unittest.hasLength(2));
766 checkAuditConfig(o[0]);
767 checkAuditConfig(o[1]);
768 }
769
770 buildUnnamed3433() {
351 var o = new core.List<api.Binding>(); 771 var o = new core.List<api.Binding>();
352 o.add(buildBinding()); 772 o.add(buildBinding());
353 o.add(buildBinding()); 773 o.add(buildBinding());
354 return o; 774 return o;
355 } 775 }
356 776
357 checkUnnamed3316(core.List<api.Binding> o) { 777 checkUnnamed3433(core.List<api.Binding> o) {
358 unittest.expect(o, unittest.hasLength(2)); 778 unittest.expect(o, unittest.hasLength(2));
359 checkBinding(o[0]); 779 checkBinding(o[0]);
360 checkBinding(o[1]); 780 checkBinding(o[1]);
361 } 781 }
362 782
363 core.int buildCounterPolicy = 0; 783 core.int buildCounterPolicy = 0;
364 buildPolicy() { 784 buildPolicy() {
365 var o = new api.Policy(); 785 var o = new api.Policy();
366 buildCounterPolicy++; 786 buildCounterPolicy++;
367 if (buildCounterPolicy < 3) { 787 if (buildCounterPolicy < 3) {
368 o.bindings = buildUnnamed3316(); 788 o.auditConfigs = buildUnnamed3432();
789 o.bindings = buildUnnamed3433();
369 o.etag = "foo"; 790 o.etag = "foo";
370 o.version = 42; 791 o.version = 42;
371 } 792 }
372 buildCounterPolicy--; 793 buildCounterPolicy--;
373 return o; 794 return o;
374 } 795 }
375 796
376 checkPolicy(api.Policy o) { 797 checkPolicy(api.Policy o) {
377 buildCounterPolicy++; 798 buildCounterPolicy++;
378 if (buildCounterPolicy < 3) { 799 if (buildCounterPolicy < 3) {
379 checkUnnamed3316(o.bindings); 800 checkUnnamed3432(o.auditConfigs);
801 checkUnnamed3433(o.bindings);
380 unittest.expect(o.etag, unittest.equals('foo')); 802 unittest.expect(o.etag, unittest.equals('foo'));
381 unittest.expect(o.version, unittest.equals(42)); 803 unittest.expect(o.version, unittest.equals(42));
382 } 804 }
383 buildCounterPolicy--; 805 buildCounterPolicy--;
384 } 806 }
385 807
386 buildUnnamed3317() { 808 buildUnnamed3434() {
387 var o = new core.Map<core.String, core.String>(); 809 var o = new core.Map<core.String, core.String>();
388 o["x"] = "foo"; 810 o["x"] = "foo";
389 o["y"] = "foo"; 811 o["y"] = "foo";
390 return o; 812 return o;
391 } 813 }
392 814
393 checkUnnamed3317(core.Map<core.String, core.String> o) { 815 checkUnnamed3434(core.Map<core.String, core.String> o) {
394 unittest.expect(o, unittest.hasLength(2)); 816 unittest.expect(o, unittest.hasLength(2));
395 unittest.expect(o["x"], unittest.equals('foo')); 817 unittest.expect(o["x"], unittest.equals('foo'));
396 unittest.expect(o["y"], unittest.equals('foo')); 818 unittest.expect(o["y"], unittest.equals('foo'));
397 } 819 }
398 820
399 core.int buildCounterProject = 0; 821 core.int buildCounterProject = 0;
400 buildProject() { 822 buildProject() {
401 var o = new api.Project(); 823 var o = new api.Project();
402 buildCounterProject++; 824 buildCounterProject++;
403 if (buildCounterProject < 3) { 825 if (buildCounterProject < 3) {
404 o.createTime = "foo"; 826 o.createTime = "foo";
405 o.labels = buildUnnamed3317(); 827 o.labels = buildUnnamed3434();
406 o.lifecycleState = "foo"; 828 o.lifecycleState = "foo";
407 o.name = "foo"; 829 o.name = "foo";
408 o.parent = buildResourceId(); 830 o.parent = buildResourceId();
409 o.projectId = "foo"; 831 o.projectId = "foo";
410 o.projectNumber = "foo"; 832 o.projectNumber = "foo";
411 } 833 }
412 buildCounterProject--; 834 buildCounterProject--;
413 return o; 835 return o;
414 } 836 }
415 837
416 checkProject(api.Project o) { 838 checkProject(api.Project o) {
417 buildCounterProject++; 839 buildCounterProject++;
418 if (buildCounterProject < 3) { 840 if (buildCounterProject < 3) {
419 unittest.expect(o.createTime, unittest.equals('foo')); 841 unittest.expect(o.createTime, unittest.equals('foo'));
420 checkUnnamed3317(o.labels); 842 checkUnnamed3434(o.labels);
421 unittest.expect(o.lifecycleState, unittest.equals('foo')); 843 unittest.expect(o.lifecycleState, unittest.equals('foo'));
422 unittest.expect(o.name, unittest.equals('foo')); 844 unittest.expect(o.name, unittest.equals('foo'));
423 checkResourceId(o.parent); 845 checkResourceId(o.parent);
424 unittest.expect(o.projectId, unittest.equals('foo')); 846 unittest.expect(o.projectId, unittest.equals('foo'));
425 unittest.expect(o.projectNumber, unittest.equals('foo')); 847 unittest.expect(o.projectNumber, unittest.equals('foo'));
426 } 848 }
427 buildCounterProject--; 849 buildCounterProject--;
428 } 850 }
429 851
430 core.int buildCounterProjectCreationStatus = 0; 852 core.int buildCounterProjectCreationStatus = 0;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 886
465 checkResourceId(api.ResourceId o) { 887 checkResourceId(api.ResourceId o) {
466 buildCounterResourceId++; 888 buildCounterResourceId++;
467 if (buildCounterResourceId < 3) { 889 if (buildCounterResourceId < 3) {
468 unittest.expect(o.id, unittest.equals('foo')); 890 unittest.expect(o.id, unittest.equals('foo'));
469 unittest.expect(o.type, unittest.equals('foo')); 891 unittest.expect(o.type, unittest.equals('foo'));
470 } 892 }
471 buildCounterResourceId--; 893 buildCounterResourceId--;
472 } 894 }
473 895
896 core.int buildCounterRestoreDefault = 0;
897 buildRestoreDefault() {
898 var o = new api.RestoreDefault();
899 buildCounterRestoreDefault++;
900 if (buildCounterRestoreDefault < 3) {
901 }
902 buildCounterRestoreDefault--;
903 return o;
904 }
905
906 checkRestoreDefault(api.RestoreDefault o) {
907 buildCounterRestoreDefault++;
908 if (buildCounterRestoreDefault < 3) {
909 }
910 buildCounterRestoreDefault--;
911 }
912
474 core.int buildCounterSetIamPolicyRequest = 0; 913 core.int buildCounterSetIamPolicyRequest = 0;
475 buildSetIamPolicyRequest() { 914 buildSetIamPolicyRequest() {
476 var o = new api.SetIamPolicyRequest(); 915 var o = new api.SetIamPolicyRequest();
477 buildCounterSetIamPolicyRequest++; 916 buildCounterSetIamPolicyRequest++;
478 if (buildCounterSetIamPolicyRequest < 3) { 917 if (buildCounterSetIamPolicyRequest < 3) {
479 o.policy = buildPolicy(); 918 o.policy = buildPolicy();
919 o.updateMask = "foo";
480 } 920 }
481 buildCounterSetIamPolicyRequest--; 921 buildCounterSetIamPolicyRequest--;
482 return o; 922 return o;
483 } 923 }
484 924
485 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { 925 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
486 buildCounterSetIamPolicyRequest++; 926 buildCounterSetIamPolicyRequest++;
487 if (buildCounterSetIamPolicyRequest < 3) { 927 if (buildCounterSetIamPolicyRequest < 3) {
488 checkPolicy(o.policy); 928 checkPolicy(o.policy);
929 unittest.expect(o.updateMask, unittest.equals('foo'));
489 } 930 }
490 buildCounterSetIamPolicyRequest--; 931 buildCounterSetIamPolicyRequest--;
491 } 932 }
492 933
493 buildUnnamed3318() { 934 core.int buildCounterSetOrgPolicyRequest = 0;
935 buildSetOrgPolicyRequest() {
936 var o = new api.SetOrgPolicyRequest();
937 buildCounterSetOrgPolicyRequest++;
938 if (buildCounterSetOrgPolicyRequest < 3) {
939 o.policy = buildOrgPolicy();
940 }
941 buildCounterSetOrgPolicyRequest--;
942 return o;
943 }
944
945 checkSetOrgPolicyRequest(api.SetOrgPolicyRequest o) {
946 buildCounterSetOrgPolicyRequest++;
947 if (buildCounterSetOrgPolicyRequest < 3) {
948 checkOrgPolicy(o.policy);
949 }
950 buildCounterSetOrgPolicyRequest--;
951 }
952
953 buildUnnamed3435() {
494 var o = new core.List<core.String>(); 954 var o = new core.List<core.String>();
495 o.add("foo"); 955 o.add("foo");
496 o.add("foo"); 956 o.add("foo");
497 return o; 957 return o;
498 } 958 }
499 959
500 checkUnnamed3318(core.List<core.String> o) { 960 checkUnnamed3435(core.List<core.String> o) {
501 unittest.expect(o, unittest.hasLength(2)); 961 unittest.expect(o, unittest.hasLength(2));
502 unittest.expect(o[0], unittest.equals('foo')); 962 unittest.expect(o[0], unittest.equals('foo'));
503 unittest.expect(o[1], unittest.equals('foo')); 963 unittest.expect(o[1], unittest.equals('foo'));
504 } 964 }
505 965
506 core.int buildCounterTestIamPermissionsRequest = 0; 966 core.int buildCounterTestIamPermissionsRequest = 0;
507 buildTestIamPermissionsRequest() { 967 buildTestIamPermissionsRequest() {
508 var o = new api.TestIamPermissionsRequest(); 968 var o = new api.TestIamPermissionsRequest();
509 buildCounterTestIamPermissionsRequest++; 969 buildCounterTestIamPermissionsRequest++;
510 if (buildCounterTestIamPermissionsRequest < 3) { 970 if (buildCounterTestIamPermissionsRequest < 3) {
511 o.permissions = buildUnnamed3318(); 971 o.permissions = buildUnnamed3435();
512 } 972 }
513 buildCounterTestIamPermissionsRequest--; 973 buildCounterTestIamPermissionsRequest--;
514 return o; 974 return o;
515 } 975 }
516 976
517 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { 977 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
518 buildCounterTestIamPermissionsRequest++; 978 buildCounterTestIamPermissionsRequest++;
519 if (buildCounterTestIamPermissionsRequest < 3) { 979 if (buildCounterTestIamPermissionsRequest < 3) {
520 checkUnnamed3318(o.permissions); 980 checkUnnamed3435(o.permissions);
521 } 981 }
522 buildCounterTestIamPermissionsRequest--; 982 buildCounterTestIamPermissionsRequest--;
523 } 983 }
524 984
525 buildUnnamed3319() { 985 buildUnnamed3436() {
526 var o = new core.List<core.String>(); 986 var o = new core.List<core.String>();
527 o.add("foo"); 987 o.add("foo");
528 o.add("foo"); 988 o.add("foo");
529 return o; 989 return o;
530 } 990 }
531 991
532 checkUnnamed3319(core.List<core.String> o) { 992 checkUnnamed3436(core.List<core.String> o) {
533 unittest.expect(o, unittest.hasLength(2)); 993 unittest.expect(o, unittest.hasLength(2));
534 unittest.expect(o[0], unittest.equals('foo')); 994 unittest.expect(o[0], unittest.equals('foo'));
535 unittest.expect(o[1], unittest.equals('foo')); 995 unittest.expect(o[1], unittest.equals('foo'));
536 } 996 }
537 997
538 core.int buildCounterTestIamPermissionsResponse = 0; 998 core.int buildCounterTestIamPermissionsResponse = 0;
539 buildTestIamPermissionsResponse() { 999 buildTestIamPermissionsResponse() {
540 var o = new api.TestIamPermissionsResponse(); 1000 var o = new api.TestIamPermissionsResponse();
541 buildCounterTestIamPermissionsResponse++; 1001 buildCounterTestIamPermissionsResponse++;
542 if (buildCounterTestIamPermissionsResponse < 3) { 1002 if (buildCounterTestIamPermissionsResponse < 3) {
543 o.permissions = buildUnnamed3319(); 1003 o.permissions = buildUnnamed3436();
544 } 1004 }
545 buildCounterTestIamPermissionsResponse--; 1005 buildCounterTestIamPermissionsResponse--;
546 return o; 1006 return o;
547 } 1007 }
548 1008
549 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { 1009 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
550 buildCounterTestIamPermissionsResponse++; 1010 buildCounterTestIamPermissionsResponse++;
551 if (buildCounterTestIamPermissionsResponse < 3) { 1011 if (buildCounterTestIamPermissionsResponse < 3) {
552 checkUnnamed3319(o.permissions); 1012 checkUnnamed3436(o.permissions);
553 } 1013 }
554 buildCounterTestIamPermissionsResponse--; 1014 buildCounterTestIamPermissionsResponse--;
555 } 1015 }
556 1016
557 core.int buildCounterUndeleteProjectRequest = 0; 1017 core.int buildCounterUndeleteProjectRequest = 0;
558 buildUndeleteProjectRequest() { 1018 buildUndeleteProjectRequest() {
559 var o = new api.UndeleteProjectRequest(); 1019 var o = new api.UndeleteProjectRequest();
560 buildCounterUndeleteProjectRequest++; 1020 buildCounterUndeleteProjectRequest++;
561 if (buildCounterUndeleteProjectRequest < 3) { 1021 if (buildCounterUndeleteProjectRequest < 3) {
562 } 1022 }
(...skipping 12 matching lines...) Expand all
575 main() { 1035 main() {
576 unittest.group("obj-schema-Ancestor", () { 1036 unittest.group("obj-schema-Ancestor", () {
577 unittest.test("to-json--from-json", () { 1037 unittest.test("to-json--from-json", () {
578 var o = buildAncestor(); 1038 var o = buildAncestor();
579 var od = new api.Ancestor.fromJson(o.toJson()); 1039 var od = new api.Ancestor.fromJson(o.toJson());
580 checkAncestor(od); 1040 checkAncestor(od);
581 }); 1041 });
582 }); 1042 });
583 1043
584 1044
1045 unittest.group("obj-schema-AuditConfig", () {
1046 unittest.test("to-json--from-json", () {
1047 var o = buildAuditConfig();
1048 var od = new api.AuditConfig.fromJson(o.toJson());
1049 checkAuditConfig(od);
1050 });
1051 });
1052
1053
1054 unittest.group("obj-schema-AuditLogConfig", () {
1055 unittest.test("to-json--from-json", () {
1056 var o = buildAuditLogConfig();
1057 var od = new api.AuditLogConfig.fromJson(o.toJson());
1058 checkAuditLogConfig(od);
1059 });
1060 });
1061
1062
585 unittest.group("obj-schema-Binding", () { 1063 unittest.group("obj-schema-Binding", () {
586 unittest.test("to-json--from-json", () { 1064 unittest.test("to-json--from-json", () {
587 var o = buildBinding(); 1065 var o = buildBinding();
588 var od = new api.Binding.fromJson(o.toJson()); 1066 var od = new api.Binding.fromJson(o.toJson());
589 checkBinding(od); 1067 checkBinding(od);
590 }); 1068 });
591 }); 1069 });
592 1070
593 1071
1072 unittest.group("obj-schema-BooleanConstraint", () {
1073 unittest.test("to-json--from-json", () {
1074 var o = buildBooleanConstraint();
1075 var od = new api.BooleanConstraint.fromJson(o.toJson());
1076 checkBooleanConstraint(od);
1077 });
1078 });
1079
1080
1081 unittest.group("obj-schema-BooleanPolicy", () {
1082 unittest.test("to-json--from-json", () {
1083 var o = buildBooleanPolicy();
1084 var od = new api.BooleanPolicy.fromJson(o.toJson());
1085 checkBooleanPolicy(od);
1086 });
1087 });
1088
1089
1090 unittest.group("obj-schema-ClearOrgPolicyRequest", () {
1091 unittest.test("to-json--from-json", () {
1092 var o = buildClearOrgPolicyRequest();
1093 var od = new api.ClearOrgPolicyRequest.fromJson(o.toJson());
1094 checkClearOrgPolicyRequest(od);
1095 });
1096 });
1097
1098
1099 unittest.group("obj-schema-Constraint", () {
1100 unittest.test("to-json--from-json", () {
1101 var o = buildConstraint();
1102 var od = new api.Constraint.fromJson(o.toJson());
1103 checkConstraint(od);
1104 });
1105 });
1106
1107
594 unittest.group("obj-schema-Empty", () { 1108 unittest.group("obj-schema-Empty", () {
595 unittest.test("to-json--from-json", () { 1109 unittest.test("to-json--from-json", () {
596 var o = buildEmpty(); 1110 var o = buildEmpty();
597 var od = new api.Empty.fromJson(o.toJson()); 1111 var od = new api.Empty.fromJson(o.toJson());
598 checkEmpty(od); 1112 checkEmpty(od);
599 }); 1113 });
600 }); 1114 });
601 1115
602 1116
603 unittest.group("obj-schema-FolderOperation", () { 1117 unittest.group("obj-schema-FolderOperation", () {
(...skipping 25 matching lines...) Expand all
629 1143
630 unittest.group("obj-schema-GetAncestryResponse", () { 1144 unittest.group("obj-schema-GetAncestryResponse", () {
631 unittest.test("to-json--from-json", () { 1145 unittest.test("to-json--from-json", () {
632 var o = buildGetAncestryResponse(); 1146 var o = buildGetAncestryResponse();
633 var od = new api.GetAncestryResponse.fromJson(o.toJson()); 1147 var od = new api.GetAncestryResponse.fromJson(o.toJson());
634 checkGetAncestryResponse(od); 1148 checkGetAncestryResponse(od);
635 }); 1149 });
636 }); 1150 });
637 1151
638 1152
1153 unittest.group("obj-schema-GetEffectiveOrgPolicyRequest", () {
1154 unittest.test("to-json--from-json", () {
1155 var o = buildGetEffectiveOrgPolicyRequest();
1156 var od = new api.GetEffectiveOrgPolicyRequest.fromJson(o.toJson());
1157 checkGetEffectiveOrgPolicyRequest(od);
1158 });
1159 });
1160
1161
639 unittest.group("obj-schema-GetIamPolicyRequest", () { 1162 unittest.group("obj-schema-GetIamPolicyRequest", () {
640 unittest.test("to-json--from-json", () { 1163 unittest.test("to-json--from-json", () {
641 var o = buildGetIamPolicyRequest(); 1164 var o = buildGetIamPolicyRequest();
642 var od = new api.GetIamPolicyRequest.fromJson(o.toJson()); 1165 var od = new api.GetIamPolicyRequest.fromJson(o.toJson());
643 checkGetIamPolicyRequest(od); 1166 checkGetIamPolicyRequest(od);
644 }); 1167 });
645 }); 1168 });
646 1169
647 1170
1171 unittest.group("obj-schema-GetOrgPolicyRequest", () {
1172 unittest.test("to-json--from-json", () {
1173 var o = buildGetOrgPolicyRequest();
1174 var od = new api.GetOrgPolicyRequest.fromJson(o.toJson());
1175 checkGetOrgPolicyRequest(od);
1176 });
1177 });
1178
1179
1180 unittest.group("obj-schema-ListAvailableOrgPolicyConstraintsRequest", () {
1181 unittest.test("to-json--from-json", () {
1182 var o = buildListAvailableOrgPolicyConstraintsRequest();
1183 var od = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(o.toJso n());
1184 checkListAvailableOrgPolicyConstraintsRequest(od);
1185 });
1186 });
1187
1188
1189 unittest.group("obj-schema-ListAvailableOrgPolicyConstraintsResponse", () {
1190 unittest.test("to-json--from-json", () {
1191 var o = buildListAvailableOrgPolicyConstraintsResponse();
1192 var od = new api.ListAvailableOrgPolicyConstraintsResponse.fromJson(o.toJs on());
1193 checkListAvailableOrgPolicyConstraintsResponse(od);
1194 });
1195 });
1196
1197
1198 unittest.group("obj-schema-ListConstraint", () {
1199 unittest.test("to-json--from-json", () {
1200 var o = buildListConstraint();
1201 var od = new api.ListConstraint.fromJson(o.toJson());
1202 checkListConstraint(od);
1203 });
1204 });
1205
1206
1207 unittest.group("obj-schema-ListOrgPoliciesRequest", () {
1208 unittest.test("to-json--from-json", () {
1209 var o = buildListOrgPoliciesRequest();
1210 var od = new api.ListOrgPoliciesRequest.fromJson(o.toJson());
1211 checkListOrgPoliciesRequest(od);
1212 });
1213 });
1214
1215
1216 unittest.group("obj-schema-ListOrgPoliciesResponse", () {
1217 unittest.test("to-json--from-json", () {
1218 var o = buildListOrgPoliciesResponse();
1219 var od = new api.ListOrgPoliciesResponse.fromJson(o.toJson());
1220 checkListOrgPoliciesResponse(od);
1221 });
1222 });
1223
1224
648 unittest.group("obj-schema-ListOrganizationsResponse", () { 1225 unittest.group("obj-schema-ListOrganizationsResponse", () {
649 unittest.test("to-json--from-json", () { 1226 unittest.test("to-json--from-json", () {
650 var o = buildListOrganizationsResponse(); 1227 var o = buildListOrganizationsResponse();
651 var od = new api.ListOrganizationsResponse.fromJson(o.toJson()); 1228 var od = new api.ListOrganizationsResponse.fromJson(o.toJson());
652 checkListOrganizationsResponse(od); 1229 checkListOrganizationsResponse(od);
653 }); 1230 });
654 }); 1231 });
655 1232
656 1233
1234 unittest.group("obj-schema-ListPolicy", () {
1235 unittest.test("to-json--from-json", () {
1236 var o = buildListPolicy();
1237 var od = new api.ListPolicy.fromJson(o.toJson());
1238 checkListPolicy(od);
1239 });
1240 });
1241
1242
657 unittest.group("obj-schema-ListProjectsResponse", () { 1243 unittest.group("obj-schema-ListProjectsResponse", () {
658 unittest.test("to-json--from-json", () { 1244 unittest.test("to-json--from-json", () {
659 var o = buildListProjectsResponse(); 1245 var o = buildListProjectsResponse();
660 var od = new api.ListProjectsResponse.fromJson(o.toJson()); 1246 var od = new api.ListProjectsResponse.fromJson(o.toJson());
661 checkListProjectsResponse(od); 1247 checkListProjectsResponse(od);
662 }); 1248 });
663 }); 1249 });
664 1250
665 1251
1252 unittest.group("obj-schema-OrgPolicy", () {
1253 unittest.test("to-json--from-json", () {
1254 var o = buildOrgPolicy();
1255 var od = new api.OrgPolicy.fromJson(o.toJson());
1256 checkOrgPolicy(od);
1257 });
1258 });
1259
1260
666 unittest.group("obj-schema-Organization", () { 1261 unittest.group("obj-schema-Organization", () {
667 unittest.test("to-json--from-json", () { 1262 unittest.test("to-json--from-json", () {
668 var o = buildOrganization(); 1263 var o = buildOrganization();
669 var od = new api.Organization.fromJson(o.toJson()); 1264 var od = new api.Organization.fromJson(o.toJson());
670 checkOrganization(od); 1265 checkOrganization(od);
671 }); 1266 });
672 }); 1267 });
673 1268
674 1269
675 unittest.group("obj-schema-OrganizationOwner", () { 1270 unittest.group("obj-schema-OrganizationOwner", () {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 1305
711 unittest.group("obj-schema-ResourceId", () { 1306 unittest.group("obj-schema-ResourceId", () {
712 unittest.test("to-json--from-json", () { 1307 unittest.test("to-json--from-json", () {
713 var o = buildResourceId(); 1308 var o = buildResourceId();
714 var od = new api.ResourceId.fromJson(o.toJson()); 1309 var od = new api.ResourceId.fromJson(o.toJson());
715 checkResourceId(od); 1310 checkResourceId(od);
716 }); 1311 });
717 }); 1312 });
718 1313
719 1314
1315 unittest.group("obj-schema-RestoreDefault", () {
1316 unittest.test("to-json--from-json", () {
1317 var o = buildRestoreDefault();
1318 var od = new api.RestoreDefault.fromJson(o.toJson());
1319 checkRestoreDefault(od);
1320 });
1321 });
1322
1323
720 unittest.group("obj-schema-SetIamPolicyRequest", () { 1324 unittest.group("obj-schema-SetIamPolicyRequest", () {
721 unittest.test("to-json--from-json", () { 1325 unittest.test("to-json--from-json", () {
722 var o = buildSetIamPolicyRequest(); 1326 var o = buildSetIamPolicyRequest();
723 var od = new api.SetIamPolicyRequest.fromJson(o.toJson()); 1327 var od = new api.SetIamPolicyRequest.fromJson(o.toJson());
724 checkSetIamPolicyRequest(od); 1328 checkSetIamPolicyRequest(od);
725 }); 1329 });
726 }); 1330 });
727 1331
728 1332
1333 unittest.group("obj-schema-SetOrgPolicyRequest", () {
1334 unittest.test("to-json--from-json", () {
1335 var o = buildSetOrgPolicyRequest();
1336 var od = new api.SetOrgPolicyRequest.fromJson(o.toJson());
1337 checkSetOrgPolicyRequest(od);
1338 });
1339 });
1340
1341
729 unittest.group("obj-schema-TestIamPermissionsRequest", () { 1342 unittest.group("obj-schema-TestIamPermissionsRequest", () {
730 unittest.test("to-json--from-json", () { 1343 unittest.test("to-json--from-json", () {
731 var o = buildTestIamPermissionsRequest(); 1344 var o = buildTestIamPermissionsRequest();
732 var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); 1345 var od = new api.TestIamPermissionsRequest.fromJson(o.toJson());
733 checkTestIamPermissionsRequest(od); 1346 checkTestIamPermissionsRequest(od);
734 }); 1347 });
735 }); 1348 });
736 1349
737 1350
738 unittest.group("obj-schema-TestIamPermissionsResponse", () { 1351 unittest.group("obj-schema-TestIamPermissionsResponse", () {
739 unittest.test("to-json--from-json", () { 1352 unittest.test("to-json--from-json", () {
740 var o = buildTestIamPermissionsResponse(); 1353 var o = buildTestIamPermissionsResponse();
741 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson()); 1354 var od = new api.TestIamPermissionsResponse.fromJson(o.toJson());
742 checkTestIamPermissionsResponse(od); 1355 checkTestIamPermissionsResponse(od);
743 }); 1356 });
744 }); 1357 });
745 1358
746 1359
747 unittest.group("obj-schema-UndeleteProjectRequest", () { 1360 unittest.group("obj-schema-UndeleteProjectRequest", () {
748 unittest.test("to-json--from-json", () { 1361 unittest.test("to-json--from-json", () {
749 var o = buildUndeleteProjectRequest(); 1362 var o = buildUndeleteProjectRequest();
750 var od = new api.UndeleteProjectRequest.fromJson(o.toJson()); 1363 var od = new api.UndeleteProjectRequest.fromJson(o.toJson());
751 checkUndeleteProjectRequest(od); 1364 checkUndeleteProjectRequest(od);
752 }); 1365 });
753 }); 1366 });
754 1367
755 1368
756 unittest.group("resource-OrganizationsResourceApi", () { 1369 unittest.group("resource-OrganizationsResourceApi", () {
1370 unittest.test("method--clearOrgPolicy", () {
1371
1372 var mock = new HttpServerMock();
1373 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1374 var arg_request = buildClearOrgPolicyRequest();
1375 var arg_resource = "foo";
1376 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1377 var obj = new api.ClearOrgPolicyRequest.fromJson(json);
1378 checkClearOrgPolicyRequest(obj);
1379
1380 var path = (req.url).path;
1381 var pathOffset = 0;
1382 var index;
1383 var subPart;
1384 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1385 pathOffset += 1;
1386 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1387 pathOffset += 8;
1388 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1389
1390 var query = (req.url).query;
1391 var queryOffset = 0;
1392 var queryMap = {};
1393 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1394 parseBool(n) {
1395 if (n == "true") return true;
1396 if (n == "false") return false;
1397 if (n == null) return null;
1398 throw new core.ArgumentError("Invalid boolean: $n");
1399 }
1400 if (query.length > 0) {
1401 for (var part in query.split("&")) {
1402 var keyvalue = part.split("=");
1403 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1404 }
1405 }
1406
1407
1408 var h = {
1409 "content-type" : "application/json; charset=utf-8",
1410 };
1411 var resp = convert.JSON.encode(buildEmpty());
1412 return new async.Future.value(stringResponse(200, h, resp));
1413 }), true);
1414 res.clearOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync((( api.Empty response) {
1415 checkEmpty(response);
1416 })));
1417 });
1418
1419 unittest.test("method--clearOrgPolicyV1", () {
1420
1421 var mock = new HttpServerMock();
1422 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1423 var arg_request = buildClearOrgPolicyRequest();
1424 var arg_resource = "foo";
1425 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1426 var obj = new api.ClearOrgPolicyRequest.fromJson(json);
1427 checkClearOrgPolicyRequest(obj);
1428
1429 var path = (req.url).path;
1430 var pathOffset = 0;
1431 var index;
1432 var subPart;
1433 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1434 pathOffset += 1;
1435 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1436 pathOffset += 8;
1437 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1438
1439 var query = (req.url).query;
1440 var queryOffset = 0;
1441 var queryMap = {};
1442 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1443 parseBool(n) {
1444 if (n == "true") return true;
1445 if (n == "false") return false;
1446 if (n == null) return null;
1447 throw new core.ArgumentError("Invalid boolean: $n");
1448 }
1449 if (query.length > 0) {
1450 for (var part in query.split("&")) {
1451 var keyvalue = part.split("=");
1452 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1453 }
1454 }
1455
1456
1457 var h = {
1458 "content-type" : "application/json; charset=utf-8",
1459 };
1460 var resp = convert.JSON.encode(buildEmpty());
1461 return new async.Future.value(stringResponse(200, h, resp));
1462 }), true);
1463 res.clearOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync( ((api.Empty response) {
1464 checkEmpty(response);
1465 })));
1466 });
1467
757 unittest.test("method--get", () { 1468 unittest.test("method--get", () {
758 1469
759 var mock = new HttpServerMock(); 1470 var mock = new HttpServerMock();
760 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 1471 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
761 var arg_name = "foo"; 1472 var arg_name = "foo";
762 var arg_organizationId = "foo"; 1473 var arg_organizationId = "foo";
763 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1474 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
764 var path = (req.url).path; 1475 var path = (req.url).path;
765 var pathOffset = 0; 1476 var pathOffset = 0;
766 var index; 1477 var index;
(...skipping 27 matching lines...) Expand all
794 "content-type" : "application/json; charset=utf-8", 1505 "content-type" : "application/json; charset=utf-8",
795 }; 1506 };
796 var resp = convert.JSON.encode(buildOrganization()); 1507 var resp = convert.JSON.encode(buildOrganization());
797 return new async.Future.value(stringResponse(200, h, resp)); 1508 return new async.Future.value(stringResponse(200, h, resp));
798 }), true); 1509 }), true);
799 res.get(arg_name, organizationId: arg_organizationId).then(unittest.expect Async(((api.Organization response) { 1510 res.get(arg_name, organizationId: arg_organizationId).then(unittest.expect Async(((api.Organization response) {
800 checkOrganization(response); 1511 checkOrganization(response);
801 }))); 1512 })));
802 }); 1513 });
803 1514
1515 unittest.test("method--getEffectiveOrgPolicy", () {
1516
1517 var mock = new HttpServerMock();
1518 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1519 var arg_request = buildGetEffectiveOrgPolicyRequest();
1520 var arg_resource = "foo";
1521 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1522 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json);
1523 checkGetEffectiveOrgPolicyRequest(obj);
1524
1525 var path = (req.url).path;
1526 var pathOffset = 0;
1527 var index;
1528 var subPart;
1529 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1530 pathOffset += 1;
1531 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1532 pathOffset += 8;
1533 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1534
1535 var query = (req.url).query;
1536 var queryOffset = 0;
1537 var queryMap = {};
1538 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1539 parseBool(n) {
1540 if (n == "true") return true;
1541 if (n == "false") return false;
1542 if (n == null) return null;
1543 throw new core.ArgumentError("Invalid boolean: $n");
1544 }
1545 if (query.length > 0) {
1546 for (var part in query.split("&")) {
1547 var keyvalue = part.split("=");
1548 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1549 }
1550 }
1551
1552
1553 var h = {
1554 "content-type" : "application/json; charset=utf-8",
1555 };
1556 var resp = convert.JSON.encode(buildOrgPolicy());
1557 return new async.Future.value(stringResponse(200, h, resp));
1558 }), true);
1559 res.getEffectiveOrgPolicy(arg_request, arg_resource).then(unittest.expectA sync(((api.OrgPolicy response) {
1560 checkOrgPolicy(response);
1561 })));
1562 });
1563
1564 unittest.test("method--getEffectiveOrgPolicyV1", () {
1565
1566 var mock = new HttpServerMock();
1567 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1568 var arg_request = buildGetEffectiveOrgPolicyRequest();
1569 var arg_resource = "foo";
1570 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1571 var obj = new api.GetEffectiveOrgPolicyRequest.fromJson(json);
1572 checkGetEffectiveOrgPolicyRequest(obj);
1573
1574 var path = (req.url).path;
1575 var pathOffset = 0;
1576 var index;
1577 var subPart;
1578 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1579 pathOffset += 1;
1580 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1581 pathOffset += 8;
1582 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1583
1584 var query = (req.url).query;
1585 var queryOffset = 0;
1586 var queryMap = {};
1587 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1588 parseBool(n) {
1589 if (n == "true") return true;
1590 if (n == "false") return false;
1591 if (n == null) return null;
1592 throw new core.ArgumentError("Invalid boolean: $n");
1593 }
1594 if (query.length > 0) {
1595 for (var part in query.split("&")) {
1596 var keyvalue = part.split("=");
1597 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1598 }
1599 }
1600
1601
1602 var h = {
1603 "content-type" : "application/json; charset=utf-8",
1604 };
1605 var resp = convert.JSON.encode(buildOrgPolicy());
1606 return new async.Future.value(stringResponse(200, h, resp));
1607 }), true);
1608 res.getEffectiveOrgPolicyV1(arg_request, arg_resource).then(unittest.expec tAsync(((api.OrgPolicy response) {
1609 checkOrgPolicy(response);
1610 })));
1611 });
1612
804 unittest.test("method--getIamPolicy", () { 1613 unittest.test("method--getIamPolicy", () {
805 1614
806 var mock = new HttpServerMock(); 1615 var mock = new HttpServerMock();
807 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 1616 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
808 var arg_request = buildGetIamPolicyRequest(); 1617 var arg_request = buildGetIamPolicyRequest();
809 var arg_resource = "foo"; 1618 var arg_resource = "foo";
810 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1619 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
811 var obj = new api.GetIamPolicyRequest.fromJson(json); 1620 var obj = new api.GetIamPolicyRequest.fromJson(json);
812 checkGetIamPolicyRequest(obj); 1621 checkGetIamPolicyRequest(obj);
813 1622
(...skipping 29 matching lines...) Expand all
843 "content-type" : "application/json; charset=utf-8", 1652 "content-type" : "application/json; charset=utf-8",
844 }; 1653 };
845 var resp = convert.JSON.encode(buildPolicy()); 1654 var resp = convert.JSON.encode(buildPolicy());
846 return new async.Future.value(stringResponse(200, h, resp)); 1655 return new async.Future.value(stringResponse(200, h, resp));
847 }), true); 1656 }), true);
848 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) { 1657 res.getIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) {
849 checkPolicy(response); 1658 checkPolicy(response);
850 }))); 1659 })));
851 }); 1660 });
852 1661
1662 unittest.test("method--getOrgPolicy", () {
1663
1664 var mock = new HttpServerMock();
1665 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1666 var arg_request = buildGetOrgPolicyRequest();
1667 var arg_resource = "foo";
1668 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1669 var obj = new api.GetOrgPolicyRequest.fromJson(json);
1670 checkGetOrgPolicyRequest(obj);
1671
1672 var path = (req.url).path;
1673 var pathOffset = 0;
1674 var index;
1675 var subPart;
1676 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1677 pathOffset += 1;
1678 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1679 pathOffset += 8;
1680 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1681
1682 var query = (req.url).query;
1683 var queryOffset = 0;
1684 var queryMap = {};
1685 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1686 parseBool(n) {
1687 if (n == "true") return true;
1688 if (n == "false") return false;
1689 if (n == null) return null;
1690 throw new core.ArgumentError("Invalid boolean: $n");
1691 }
1692 if (query.length > 0) {
1693 for (var part in query.split("&")) {
1694 var keyvalue = part.split("=");
1695 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1696 }
1697 }
1698
1699
1700 var h = {
1701 "content-type" : "application/json; charset=utf-8",
1702 };
1703 var resp = convert.JSON.encode(buildOrgPolicy());
1704 return new async.Future.value(stringResponse(200, h, resp));
1705 }), true);
1706 res.getOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.OrgPolicy response) {
1707 checkOrgPolicy(response);
1708 })));
1709 });
1710
1711 unittest.test("method--getOrgPolicyV1", () {
1712
1713 var mock = new HttpServerMock();
1714 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1715 var arg_request = buildGetOrgPolicyRequest();
1716 var arg_resource = "foo";
1717 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1718 var obj = new api.GetOrgPolicyRequest.fromJson(json);
1719 checkGetOrgPolicyRequest(obj);
1720
1721 var path = (req.url).path;
1722 var pathOffset = 0;
1723 var index;
1724 var subPart;
1725 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1726 pathOffset += 1;
1727 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1728 pathOffset += 8;
1729 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1730
1731 var query = (req.url).query;
1732 var queryOffset = 0;
1733 var queryMap = {};
1734 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1735 parseBool(n) {
1736 if (n == "true") return true;
1737 if (n == "false") return false;
1738 if (n == null) return null;
1739 throw new core.ArgumentError("Invalid boolean: $n");
1740 }
1741 if (query.length > 0) {
1742 for (var part in query.split("&")) {
1743 var keyvalue = part.split("=");
1744 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1745 }
1746 }
1747
1748
1749 var h = {
1750 "content-type" : "application/json; charset=utf-8",
1751 };
1752 var resp = convert.JSON.encode(buildOrgPolicy());
1753 return new async.Future.value(stringResponse(200, h, resp));
1754 }), true);
1755 res.getOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync((( api.OrgPolicy response) {
1756 checkOrgPolicy(response);
1757 })));
1758 });
1759
853 unittest.test("method--list", () { 1760 unittest.test("method--list", () {
854 1761
855 var mock = new HttpServerMock(); 1762 var mock = new HttpServerMock();
856 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 1763 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
857 var arg_pageSize = 42; 1764 var arg_pageSize = 42;
858 var arg_filter = "foo"; 1765 var arg_filter = "foo";
859 var arg_pageToken = "foo"; 1766 var arg_pageToken = "foo";
860 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1767 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
861 var path = (req.url).path; 1768 var path = (req.url).path;
862 var pathOffset = 0; 1769 var pathOffset = 0;
(...skipping 29 matching lines...) Expand all
892 "content-type" : "application/json; charset=utf-8", 1799 "content-type" : "application/json; charset=utf-8",
893 }; 1800 };
894 var resp = convert.JSON.encode(buildListOrganizationsResponse()); 1801 var resp = convert.JSON.encode(buildListOrganizationsResponse());
895 return new async.Future.value(stringResponse(200, h, resp)); 1802 return new async.Future.value(stringResponse(200, h, resp));
896 }), true); 1803 }), true);
897 res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageTo ken).then(unittest.expectAsync(((api.ListOrganizationsResponse response) { 1804 res.list(pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageTo ken).then(unittest.expectAsync(((api.ListOrganizationsResponse response) {
898 checkListOrganizationsResponse(response); 1805 checkListOrganizationsResponse(response);
899 }))); 1806 })));
900 }); 1807 });
901 1808
1809 unittest.test("method--listAvailableOrgPolicyConstraints", () {
1810
1811 var mock = new HttpServerMock();
1812 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1813 var arg_request = buildListAvailableOrgPolicyConstraintsRequest();
1814 var arg_resource = "foo";
1815 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1816 var obj = new api.ListAvailableOrgPolicyConstraintsRequest.fromJson(json );
1817 checkListAvailableOrgPolicyConstraintsRequest(obj);
1818
1819 var path = (req.url).path;
1820 var pathOffset = 0;
1821 var index;
1822 var subPart;
1823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1824 pathOffset += 1;
1825 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1826 pathOffset += 8;
1827 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1828
1829 var query = (req.url).query;
1830 var queryOffset = 0;
1831 var queryMap = {};
1832 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1833 parseBool(n) {
1834 if (n == "true") return true;
1835 if (n == "false") return false;
1836 if (n == null) return null;
1837 throw new core.ArgumentError("Invalid boolean: $n");
1838 }
1839 if (query.length > 0) {
1840 for (var part in query.split("&")) {
1841 var keyvalue = part.split("=");
1842 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1843 }
1844 }
1845
1846
1847 var h = {
1848 "content-type" : "application/json; charset=utf-8",
1849 };
1850 var resp = convert.JSON.encode(buildListAvailableOrgPolicyConstraintsRes ponse());
1851 return new async.Future.value(stringResponse(200, h, resp));
1852 }), true);
1853 res.listAvailableOrgPolicyConstraints(arg_request, arg_resource).then(unit test.expectAsync(((api.ListAvailableOrgPolicyConstraintsResponse response) {
1854 checkListAvailableOrgPolicyConstraintsResponse(response);
1855 })));
1856 });
1857
1858 unittest.test("method--listOrgPolicies", () {
1859
1860 var mock = new HttpServerMock();
1861 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1862 var arg_request = buildListOrgPoliciesRequest();
1863 var arg_resource = "foo";
1864 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1865 var obj = new api.ListOrgPoliciesRequest.fromJson(json);
1866 checkListOrgPoliciesRequest(obj);
1867
1868 var path = (req.url).path;
1869 var pathOffset = 0;
1870 var index;
1871 var subPart;
1872 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1873 pathOffset += 1;
1874 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1875 pathOffset += 8;
1876 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1877
1878 var query = (req.url).query;
1879 var queryOffset = 0;
1880 var queryMap = {};
1881 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1882 parseBool(n) {
1883 if (n == "true") return true;
1884 if (n == "false") return false;
1885 if (n == null) return null;
1886 throw new core.ArgumentError("Invalid boolean: $n");
1887 }
1888 if (query.length > 0) {
1889 for (var part in query.split("&")) {
1890 var keyvalue = part.split("=");
1891 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1892 }
1893 }
1894
1895
1896 var h = {
1897 "content-type" : "application/json; charset=utf-8",
1898 };
1899 var resp = convert.JSON.encode(buildListOrgPoliciesResponse());
1900 return new async.Future.value(stringResponse(200, h, resp));
1901 }), true);
1902 res.listOrgPolicies(arg_request, arg_resource).then(unittest.expectAsync(( (api.ListOrgPoliciesResponse response) {
1903 checkListOrgPoliciesResponse(response);
1904 })));
1905 });
1906
902 unittest.test("method--setIamPolicy", () { 1907 unittest.test("method--setIamPolicy", () {
903 1908
904 var mock = new HttpServerMock(); 1909 var mock = new HttpServerMock();
905 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 1910 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
906 var arg_request = buildSetIamPolicyRequest(); 1911 var arg_request = buildSetIamPolicyRequest();
907 var arg_resource = "foo"; 1912 var arg_resource = "foo";
908 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1913 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
909 var obj = new api.SetIamPolicyRequest.fromJson(json); 1914 var obj = new api.SetIamPolicyRequest.fromJson(json);
910 checkSetIamPolicyRequest(obj); 1915 checkSetIamPolicyRequest(obj);
911 1916
(...skipping 29 matching lines...) Expand all
941 "content-type" : "application/json; charset=utf-8", 1946 "content-type" : "application/json; charset=utf-8",
942 }; 1947 };
943 var resp = convert.JSON.encode(buildPolicy()); 1948 var resp = convert.JSON.encode(buildPolicy());
944 return new async.Future.value(stringResponse(200, h, resp)); 1949 return new async.Future.value(stringResponse(200, h, resp));
945 }), true); 1950 }), true);
946 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) { 1951 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) {
947 checkPolicy(response); 1952 checkPolicy(response);
948 }))); 1953 })));
949 }); 1954 });
950 1955
1956 unittest.test("method--setOrgPolicy", () {
1957
1958 var mock = new HttpServerMock();
1959 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
1960 var arg_request = buildSetOrgPolicyRequest();
1961 var arg_resource = "foo";
1962 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1963 var obj = new api.SetOrgPolicyRequest.fromJson(json);
1964 checkSetOrgPolicyRequest(obj);
1965
1966 var path = (req.url).path;
1967 var pathOffset = 0;
1968 var index;
1969 var subPart;
1970 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1971 pathOffset += 1;
1972 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
1973 pathOffset += 8;
1974 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1975
1976 var query = (req.url).query;
1977 var queryOffset = 0;
1978 var queryMap = {};
1979 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1980 parseBool(n) {
1981 if (n == "true") return true;
1982 if (n == "false") return false;
1983 if (n == null) return null;
1984 throw new core.ArgumentError("Invalid boolean: $n");
1985 }
1986 if (query.length > 0) {
1987 for (var part in query.split("&")) {
1988 var keyvalue = part.split("=");
1989 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1990 }
1991 }
1992
1993
1994 var h = {
1995 "content-type" : "application/json; charset=utf-8",
1996 };
1997 var resp = convert.JSON.encode(buildOrgPolicy());
1998 return new async.Future.value(stringResponse(200, h, resp));
1999 }), true);
2000 res.setOrgPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.OrgPolicy response) {
2001 checkOrgPolicy(response);
2002 })));
2003 });
2004
2005 unittest.test("method--setOrgPolicyV1", () {
2006
2007 var mock = new HttpServerMock();
2008 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
2009 var arg_request = buildSetOrgPolicyRequest();
2010 var arg_resource = "foo";
2011 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2012 var obj = new api.SetOrgPolicyRequest.fromJson(json);
2013 checkSetOrgPolicyRequest(obj);
2014
2015 var path = (req.url).path;
2016 var pathOffset = 0;
2017 var index;
2018 var subPart;
2019 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2020 pathOffset += 1;
2021 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("v1beta1/"));
2022 pathOffset += 8;
2023 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2024
2025 var query = (req.url).query;
2026 var queryOffset = 0;
2027 var queryMap = {};
2028 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2029 parseBool(n) {
2030 if (n == "true") return true;
2031 if (n == "false") return false;
2032 if (n == null) return null;
2033 throw new core.ArgumentError("Invalid boolean: $n");
2034 }
2035 if (query.length > 0) {
2036 for (var part in query.split("&")) {
2037 var keyvalue = part.split("=");
2038 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2039 }
2040 }
2041
2042
2043 var h = {
2044 "content-type" : "application/json; charset=utf-8",
2045 };
2046 var resp = convert.JSON.encode(buildOrgPolicy());
2047 return new async.Future.value(stringResponse(200, h, resp));
2048 }), true);
2049 res.setOrgPolicyV1(arg_request, arg_resource).then(unittest.expectAsync((( api.OrgPolicy response) {
2050 checkOrgPolicy(response);
2051 })));
2052 });
2053
951 unittest.test("method--testIamPermissions", () { 2054 unittest.test("method--testIamPermissions", () {
952 2055
953 var mock = new HttpServerMock(); 2056 var mock = new HttpServerMock();
954 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations; 2057 api.OrganizationsResourceApi res = new api.CloudresourcemanagerApi(mock).o rganizations;
955 var arg_request = buildTestIamPermissionsRequest(); 2058 var arg_request = buildTestIamPermissionsRequest();
956 var arg_resource = "foo"; 2059 var arg_resource = "foo";
957 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2060 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
958 var obj = new api.TestIamPermissionsRequest.fromJson(json); 2061 var obj = new api.TestIamPermissionsRequest.fromJson(json);
959 checkTestIamPermissionsRequest(obj); 2062 checkTestIamPermissionsRequest(obj);
960 2063
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after
1566 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro ject response) { 2669 res.update(arg_request, arg_projectId).then(unittest.expectAsync(((api.Pro ject response) {
1567 checkProject(response); 2670 checkProject(response);
1568 }))); 2671 })));
1569 }); 2672 });
1570 2673
1571 }); 2674 });
1572 2675
1573 2676
1574 } 2677 }
1575 2678
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698