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

Side by Side Diff: generated/googleapis/test/cloudkms/v1_test.dart

Issue 2987103002: Api-Roll 52: 2017-07-31 (Closed)
Patch Set: Created 3 years, 4 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.cloudkms.v1.test; 1 library googleapis.cloudkms.v1.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:test/test.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 buildUnnamed1392() { 54 buildUnnamed1370() {
55 var o = new core.List<api.AuditLogConfig>(); 55 var o = new core.List<api.AuditLogConfig>();
56 o.add(buildAuditLogConfig()); 56 o.add(buildAuditLogConfig());
57 o.add(buildAuditLogConfig()); 57 o.add(buildAuditLogConfig());
58 return o; 58 return o;
59 } 59 }
60 60
61 checkUnnamed1392(core.List<api.AuditLogConfig> o) { 61 checkUnnamed1370(core.List<api.AuditLogConfig> o) {
62 unittest.expect(o, unittest.hasLength(2)); 62 unittest.expect(o, unittest.hasLength(2));
63 checkAuditLogConfig(o[0]); 63 checkAuditLogConfig(o[0]);
64 checkAuditLogConfig(o[1]); 64 checkAuditLogConfig(o[1]);
65 } 65 }
66 66
67 buildUnnamed1393() { 67 buildUnnamed1371() {
68 var o = new core.List<core.String>(); 68 var o = new core.List<core.String>();
69 o.add("foo"); 69 o.add("foo");
70 o.add("foo"); 70 o.add("foo");
71 return o; 71 return o;
72 } 72 }
73 73
74 checkUnnamed1393(core.List<core.String> o) { 74 checkUnnamed1371(core.List<core.String> o) {
75 unittest.expect(o, unittest.hasLength(2)); 75 unittest.expect(o, unittest.hasLength(2));
76 unittest.expect(o[0], unittest.equals('foo')); 76 unittest.expect(o[0], unittest.equals('foo'));
77 unittest.expect(o[1], unittest.equals('foo')); 77 unittest.expect(o[1], unittest.equals('foo'));
78 } 78 }
79 79
80 core.int buildCounterAuditConfig = 0; 80 core.int buildCounterAuditConfig = 0;
81 buildAuditConfig() { 81 buildAuditConfig() {
82 var o = new api.AuditConfig(); 82 var o = new api.AuditConfig();
83 buildCounterAuditConfig++; 83 buildCounterAuditConfig++;
84 if (buildCounterAuditConfig < 3) { 84 if (buildCounterAuditConfig < 3) {
85 o.auditLogConfigs = buildUnnamed1392(); 85 o.auditLogConfigs = buildUnnamed1370();
86 o.exemptedMembers = buildUnnamed1393(); 86 o.exemptedMembers = buildUnnamed1371();
87 o.service = "foo"; 87 o.service = "foo";
88 } 88 }
89 buildCounterAuditConfig--; 89 buildCounterAuditConfig--;
90 return o; 90 return o;
91 } 91 }
92 92
93 checkAuditConfig(api.AuditConfig o) { 93 checkAuditConfig(api.AuditConfig o) {
94 buildCounterAuditConfig++; 94 buildCounterAuditConfig++;
95 if (buildCounterAuditConfig < 3) { 95 if (buildCounterAuditConfig < 3) {
96 checkUnnamed1392(o.auditLogConfigs); 96 checkUnnamed1370(o.auditLogConfigs);
97 checkUnnamed1393(o.exemptedMembers); 97 checkUnnamed1371(o.exemptedMembers);
98 unittest.expect(o.service, unittest.equals('foo')); 98 unittest.expect(o.service, unittest.equals('foo'));
99 } 99 }
100 buildCounterAuditConfig--; 100 buildCounterAuditConfig--;
101 } 101 }
102 102
103 buildUnnamed1394() { 103 buildUnnamed1372() {
104 var o = new core.List<core.String>(); 104 var o = new core.List<core.String>();
105 o.add("foo"); 105 o.add("foo");
106 o.add("foo"); 106 o.add("foo");
107 return o; 107 return o;
108 } 108 }
109 109
110 checkUnnamed1394(core.List<core.String> o) { 110 checkUnnamed1372(core.List<core.String> o) {
111 unittest.expect(o, unittest.hasLength(2)); 111 unittest.expect(o, unittest.hasLength(2));
112 unittest.expect(o[0], unittest.equals('foo')); 112 unittest.expect(o[0], unittest.equals('foo'));
113 unittest.expect(o[1], unittest.equals('foo')); 113 unittest.expect(o[1], unittest.equals('foo'));
114 } 114 }
115 115
116 core.int buildCounterAuditLogConfig = 0; 116 core.int buildCounterAuditLogConfig = 0;
117 buildAuditLogConfig() { 117 buildAuditLogConfig() {
118 var o = new api.AuditLogConfig(); 118 var o = new api.AuditLogConfig();
119 buildCounterAuditLogConfig++; 119 buildCounterAuditLogConfig++;
120 if (buildCounterAuditLogConfig < 3) { 120 if (buildCounterAuditLogConfig < 3) {
121 o.exemptedMembers = buildUnnamed1394(); 121 o.exemptedMembers = buildUnnamed1372();
122 o.logType = "foo"; 122 o.logType = "foo";
123 } 123 }
124 buildCounterAuditLogConfig--; 124 buildCounterAuditLogConfig--;
125 return o; 125 return o;
126 } 126 }
127 127
128 checkAuditLogConfig(api.AuditLogConfig o) { 128 checkAuditLogConfig(api.AuditLogConfig o) {
129 buildCounterAuditLogConfig++; 129 buildCounterAuditLogConfig++;
130 if (buildCounterAuditLogConfig < 3) { 130 if (buildCounterAuditLogConfig < 3) {
131 checkUnnamed1394(o.exemptedMembers); 131 checkUnnamed1372(o.exemptedMembers);
132 unittest.expect(o.logType, unittest.equals('foo')); 132 unittest.expect(o.logType, unittest.equals('foo'));
133 } 133 }
134 buildCounterAuditLogConfig--; 134 buildCounterAuditLogConfig--;
135 } 135 }
136 136
137 buildUnnamed1395() { 137 buildUnnamed1373() {
138 var o = new core.List<core.String>(); 138 var o = new core.List<core.String>();
139 o.add("foo"); 139 o.add("foo");
140 o.add("foo"); 140 o.add("foo");
141 return o; 141 return o;
142 } 142 }
143 143
144 checkUnnamed1395(core.List<core.String> o) { 144 checkUnnamed1373(core.List<core.String> o) {
145 unittest.expect(o, unittest.hasLength(2)); 145 unittest.expect(o, unittest.hasLength(2));
146 unittest.expect(o[0], unittest.equals('foo')); 146 unittest.expect(o[0], unittest.equals('foo'));
147 unittest.expect(o[1], unittest.equals('foo')); 147 unittest.expect(o[1], unittest.equals('foo'));
148 } 148 }
149 149
150 core.int buildCounterBinding = 0; 150 core.int buildCounterBinding = 0;
151 buildBinding() { 151 buildBinding() {
152 var o = new api.Binding(); 152 var o = new api.Binding();
153 buildCounterBinding++; 153 buildCounterBinding++;
154 if (buildCounterBinding < 3) { 154 if (buildCounterBinding < 3) {
155 o.condition = buildExpr(); 155 o.condition = buildExpr();
156 o.members = buildUnnamed1395(); 156 o.members = buildUnnamed1373();
157 o.role = "foo"; 157 o.role = "foo";
158 } 158 }
159 buildCounterBinding--; 159 buildCounterBinding--;
160 return o; 160 return o;
161 } 161 }
162 162
163 checkBinding(api.Binding o) { 163 checkBinding(api.Binding o) {
164 buildCounterBinding++; 164 buildCounterBinding++;
165 if (buildCounterBinding < 3) { 165 if (buildCounterBinding < 3) {
166 checkExpr(o.condition); 166 checkExpr(o.condition);
167 checkUnnamed1395(o.members); 167 checkUnnamed1373(o.members);
168 unittest.expect(o.role, unittest.equals('foo')); 168 unittest.expect(o.role, unittest.equals('foo'));
169 } 169 }
170 buildCounterBinding--; 170 buildCounterBinding--;
171 } 171 }
172 172
173 core.int buildCounterCloudAuditOptions = 0; 173 core.int buildCounterCloudAuditOptions = 0;
174 buildCloudAuditOptions() { 174 buildCloudAuditOptions() {
175 var o = new api.CloudAuditOptions(); 175 var o = new api.CloudAuditOptions();
176 buildCounterCloudAuditOptions++; 176 buildCounterCloudAuditOptions++;
177 if (buildCounterCloudAuditOptions < 3) { 177 if (buildCounterCloudAuditOptions < 3) {
178 o.logName = "foo"; 178 o.logName = "foo";
179 } 179 }
180 buildCounterCloudAuditOptions--; 180 buildCounterCloudAuditOptions--;
181 return o; 181 return o;
182 } 182 }
183 183
184 checkCloudAuditOptions(api.CloudAuditOptions o) { 184 checkCloudAuditOptions(api.CloudAuditOptions o) {
185 buildCounterCloudAuditOptions++; 185 buildCounterCloudAuditOptions++;
186 if (buildCounterCloudAuditOptions < 3) { 186 if (buildCounterCloudAuditOptions < 3) {
187 unittest.expect(o.logName, unittest.equals('foo')); 187 unittest.expect(o.logName, unittest.equals('foo'));
188 } 188 }
189 buildCounterCloudAuditOptions--; 189 buildCounterCloudAuditOptions--;
190 } 190 }
191 191
192 buildUnnamed1396() { 192 buildUnnamed1374() {
193 var o = new core.List<core.String>(); 193 var o = new core.List<core.String>();
194 o.add("foo"); 194 o.add("foo");
195 o.add("foo"); 195 o.add("foo");
196 return o; 196 return o;
197 } 197 }
198 198
199 checkUnnamed1396(core.List<core.String> o) { 199 checkUnnamed1374(core.List<core.String> o) {
200 unittest.expect(o, unittest.hasLength(2)); 200 unittest.expect(o, unittest.hasLength(2));
201 unittest.expect(o[0], unittest.equals('foo')); 201 unittest.expect(o[0], unittest.equals('foo'));
202 unittest.expect(o[1], unittest.equals('foo')); 202 unittest.expect(o[1], unittest.equals('foo'));
203 } 203 }
204 204
205 core.int buildCounterCondition = 0; 205 core.int buildCounterCondition = 0;
206 buildCondition() { 206 buildCondition() {
207 var o = new api.Condition(); 207 var o = new api.Condition();
208 buildCounterCondition++; 208 buildCounterCondition++;
209 if (buildCounterCondition < 3) { 209 if (buildCounterCondition < 3) {
210 o.iam = "foo"; 210 o.iam = "foo";
211 o.op = "foo"; 211 o.op = "foo";
212 o.svc = "foo"; 212 o.svc = "foo";
213 o.sys = "foo"; 213 o.sys = "foo";
214 o.value = "foo"; 214 o.value = "foo";
215 o.values = buildUnnamed1396(); 215 o.values = buildUnnamed1374();
216 } 216 }
217 buildCounterCondition--; 217 buildCounterCondition--;
218 return o; 218 return o;
219 } 219 }
220 220
221 checkCondition(api.Condition o) { 221 checkCondition(api.Condition o) {
222 buildCounterCondition++; 222 buildCounterCondition++;
223 if (buildCounterCondition < 3) { 223 if (buildCounterCondition < 3) {
224 unittest.expect(o.iam, unittest.equals('foo')); 224 unittest.expect(o.iam, unittest.equals('foo'));
225 unittest.expect(o.op, unittest.equals('foo')); 225 unittest.expect(o.op, unittest.equals('foo'));
226 unittest.expect(o.svc, unittest.equals('foo')); 226 unittest.expect(o.svc, unittest.equals('foo'));
227 unittest.expect(o.sys, unittest.equals('foo')); 227 unittest.expect(o.sys, unittest.equals('foo'));
228 unittest.expect(o.value, unittest.equals('foo')); 228 unittest.expect(o.value, unittest.equals('foo'));
229 checkUnnamed1396(o.values); 229 checkUnnamed1374(o.values);
230 } 230 }
231 buildCounterCondition--; 231 buildCounterCondition--;
232 } 232 }
233 233
234 core.int buildCounterCounterOptions = 0; 234 core.int buildCounterCounterOptions = 0;
235 buildCounterOptions() { 235 buildCounterOptions() {
236 var o = new api.CounterOptions(); 236 var o = new api.CounterOptions();
237 buildCounterCounterOptions++; 237 buildCounterCounterOptions++;
238 if (buildCounterCounterOptions < 3) { 238 if (buildCounterCounterOptions < 3) {
239 o.field = "foo"; 239 o.field = "foo";
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 463
464 checkKeyRing(api.KeyRing o) { 464 checkKeyRing(api.KeyRing o) {
465 buildCounterKeyRing++; 465 buildCounterKeyRing++;
466 if (buildCounterKeyRing < 3) { 466 if (buildCounterKeyRing < 3) {
467 unittest.expect(o.createTime, unittest.equals('foo')); 467 unittest.expect(o.createTime, unittest.equals('foo'));
468 unittest.expect(o.name, unittest.equals('foo')); 468 unittest.expect(o.name, unittest.equals('foo'));
469 } 469 }
470 buildCounterKeyRing--; 470 buildCounterKeyRing--;
471 } 471 }
472 472
473 buildUnnamed1397() { 473 buildUnnamed1375() {
474 var o = new core.List<api.CryptoKeyVersion>(); 474 var o = new core.List<api.CryptoKeyVersion>();
475 o.add(buildCryptoKeyVersion()); 475 o.add(buildCryptoKeyVersion());
476 o.add(buildCryptoKeyVersion()); 476 o.add(buildCryptoKeyVersion());
477 return o; 477 return o;
478 } 478 }
479 479
480 checkUnnamed1397(core.List<api.CryptoKeyVersion> o) { 480 checkUnnamed1375(core.List<api.CryptoKeyVersion> o) {
481 unittest.expect(o, unittest.hasLength(2)); 481 unittest.expect(o, unittest.hasLength(2));
482 checkCryptoKeyVersion(o[0]); 482 checkCryptoKeyVersion(o[0]);
483 checkCryptoKeyVersion(o[1]); 483 checkCryptoKeyVersion(o[1]);
484 } 484 }
485 485
486 core.int buildCounterListCryptoKeyVersionsResponse = 0; 486 core.int buildCounterListCryptoKeyVersionsResponse = 0;
487 buildListCryptoKeyVersionsResponse() { 487 buildListCryptoKeyVersionsResponse() {
488 var o = new api.ListCryptoKeyVersionsResponse(); 488 var o = new api.ListCryptoKeyVersionsResponse();
489 buildCounterListCryptoKeyVersionsResponse++; 489 buildCounterListCryptoKeyVersionsResponse++;
490 if (buildCounterListCryptoKeyVersionsResponse < 3) { 490 if (buildCounterListCryptoKeyVersionsResponse < 3) {
491 o.cryptoKeyVersions = buildUnnamed1397(); 491 o.cryptoKeyVersions = buildUnnamed1375();
492 o.nextPageToken = "foo"; 492 o.nextPageToken = "foo";
493 o.totalSize = 42; 493 o.totalSize = 42;
494 } 494 }
495 buildCounterListCryptoKeyVersionsResponse--; 495 buildCounterListCryptoKeyVersionsResponse--;
496 return o; 496 return o;
497 } 497 }
498 498
499 checkListCryptoKeyVersionsResponse(api.ListCryptoKeyVersionsResponse o) { 499 checkListCryptoKeyVersionsResponse(api.ListCryptoKeyVersionsResponse o) {
500 buildCounterListCryptoKeyVersionsResponse++; 500 buildCounterListCryptoKeyVersionsResponse++;
501 if (buildCounterListCryptoKeyVersionsResponse < 3) { 501 if (buildCounterListCryptoKeyVersionsResponse < 3) {
502 checkUnnamed1397(o.cryptoKeyVersions); 502 checkUnnamed1375(o.cryptoKeyVersions);
503 unittest.expect(o.nextPageToken, unittest.equals('foo')); 503 unittest.expect(o.nextPageToken, unittest.equals('foo'));
504 unittest.expect(o.totalSize, unittest.equals(42)); 504 unittest.expect(o.totalSize, unittest.equals(42));
505 } 505 }
506 buildCounterListCryptoKeyVersionsResponse--; 506 buildCounterListCryptoKeyVersionsResponse--;
507 } 507 }
508 508
509 buildUnnamed1398() { 509 buildUnnamed1376() {
510 var o = new core.List<api.CryptoKey>(); 510 var o = new core.List<api.CryptoKey>();
511 o.add(buildCryptoKey()); 511 o.add(buildCryptoKey());
512 o.add(buildCryptoKey()); 512 o.add(buildCryptoKey());
513 return o; 513 return o;
514 } 514 }
515 515
516 checkUnnamed1398(core.List<api.CryptoKey> o) { 516 checkUnnamed1376(core.List<api.CryptoKey> o) {
517 unittest.expect(o, unittest.hasLength(2)); 517 unittest.expect(o, unittest.hasLength(2));
518 checkCryptoKey(o[0]); 518 checkCryptoKey(o[0]);
519 checkCryptoKey(o[1]); 519 checkCryptoKey(o[1]);
520 } 520 }
521 521
522 core.int buildCounterListCryptoKeysResponse = 0; 522 core.int buildCounterListCryptoKeysResponse = 0;
523 buildListCryptoKeysResponse() { 523 buildListCryptoKeysResponse() {
524 var o = new api.ListCryptoKeysResponse(); 524 var o = new api.ListCryptoKeysResponse();
525 buildCounterListCryptoKeysResponse++; 525 buildCounterListCryptoKeysResponse++;
526 if (buildCounterListCryptoKeysResponse < 3) { 526 if (buildCounterListCryptoKeysResponse < 3) {
527 o.cryptoKeys = buildUnnamed1398(); 527 o.cryptoKeys = buildUnnamed1376();
528 o.nextPageToken = "foo"; 528 o.nextPageToken = "foo";
529 o.totalSize = 42; 529 o.totalSize = 42;
530 } 530 }
531 buildCounterListCryptoKeysResponse--; 531 buildCounterListCryptoKeysResponse--;
532 return o; 532 return o;
533 } 533 }
534 534
535 checkListCryptoKeysResponse(api.ListCryptoKeysResponse o) { 535 checkListCryptoKeysResponse(api.ListCryptoKeysResponse o) {
536 buildCounterListCryptoKeysResponse++; 536 buildCounterListCryptoKeysResponse++;
537 if (buildCounterListCryptoKeysResponse < 3) { 537 if (buildCounterListCryptoKeysResponse < 3) {
538 checkUnnamed1398(o.cryptoKeys); 538 checkUnnamed1376(o.cryptoKeys);
539 unittest.expect(o.nextPageToken, unittest.equals('foo')); 539 unittest.expect(o.nextPageToken, unittest.equals('foo'));
540 unittest.expect(o.totalSize, unittest.equals(42)); 540 unittest.expect(o.totalSize, unittest.equals(42));
541 } 541 }
542 buildCounterListCryptoKeysResponse--; 542 buildCounterListCryptoKeysResponse--;
543 } 543 }
544 544
545 buildUnnamed1399() { 545 buildUnnamed1377() {
546 var o = new core.List<api.KeyRing>(); 546 var o = new core.List<api.KeyRing>();
547 o.add(buildKeyRing()); 547 o.add(buildKeyRing());
548 o.add(buildKeyRing()); 548 o.add(buildKeyRing());
549 return o; 549 return o;
550 } 550 }
551 551
552 checkUnnamed1399(core.List<api.KeyRing> o) { 552 checkUnnamed1377(core.List<api.KeyRing> o) {
553 unittest.expect(o, unittest.hasLength(2)); 553 unittest.expect(o, unittest.hasLength(2));
554 checkKeyRing(o[0]); 554 checkKeyRing(o[0]);
555 checkKeyRing(o[1]); 555 checkKeyRing(o[1]);
556 } 556 }
557 557
558 core.int buildCounterListKeyRingsResponse = 0; 558 core.int buildCounterListKeyRingsResponse = 0;
559 buildListKeyRingsResponse() { 559 buildListKeyRingsResponse() {
560 var o = new api.ListKeyRingsResponse(); 560 var o = new api.ListKeyRingsResponse();
561 buildCounterListKeyRingsResponse++; 561 buildCounterListKeyRingsResponse++;
562 if (buildCounterListKeyRingsResponse < 3) { 562 if (buildCounterListKeyRingsResponse < 3) {
563 o.keyRings = buildUnnamed1399(); 563 o.keyRings = buildUnnamed1377();
564 o.nextPageToken = "foo"; 564 o.nextPageToken = "foo";
565 o.totalSize = 42; 565 o.totalSize = 42;
566 } 566 }
567 buildCounterListKeyRingsResponse--; 567 buildCounterListKeyRingsResponse--;
568 return o; 568 return o;
569 } 569 }
570 570
571 checkListKeyRingsResponse(api.ListKeyRingsResponse o) { 571 checkListKeyRingsResponse(api.ListKeyRingsResponse o) {
572 buildCounterListKeyRingsResponse++; 572 buildCounterListKeyRingsResponse++;
573 if (buildCounterListKeyRingsResponse < 3) { 573 if (buildCounterListKeyRingsResponse < 3) {
574 checkUnnamed1399(o.keyRings); 574 checkUnnamed1377(o.keyRings);
575 unittest.expect(o.nextPageToken, unittest.equals('foo')); 575 unittest.expect(o.nextPageToken, unittest.equals('foo'));
576 unittest.expect(o.totalSize, unittest.equals(42)); 576 unittest.expect(o.totalSize, unittest.equals(42));
577 } 577 }
578 buildCounterListKeyRingsResponse--; 578 buildCounterListKeyRingsResponse--;
579 } 579 }
580 580
581 buildUnnamed1400() { 581 buildUnnamed1378() {
582 var o = new core.List<api.Location>(); 582 var o = new core.List<api.Location>();
583 o.add(buildLocation()); 583 o.add(buildLocation());
584 o.add(buildLocation()); 584 o.add(buildLocation());
585 return o; 585 return o;
586 } 586 }
587 587
588 checkUnnamed1400(core.List<api.Location> o) { 588 checkUnnamed1378(core.List<api.Location> o) {
589 unittest.expect(o, unittest.hasLength(2)); 589 unittest.expect(o, unittest.hasLength(2));
590 checkLocation(o[0]); 590 checkLocation(o[0]);
591 checkLocation(o[1]); 591 checkLocation(o[1]);
592 } 592 }
593 593
594 core.int buildCounterListLocationsResponse = 0; 594 core.int buildCounterListLocationsResponse = 0;
595 buildListLocationsResponse() { 595 buildListLocationsResponse() {
596 var o = new api.ListLocationsResponse(); 596 var o = new api.ListLocationsResponse();
597 buildCounterListLocationsResponse++; 597 buildCounterListLocationsResponse++;
598 if (buildCounterListLocationsResponse < 3) { 598 if (buildCounterListLocationsResponse < 3) {
599 o.locations = buildUnnamed1400(); 599 o.locations = buildUnnamed1378();
600 o.nextPageToken = "foo"; 600 o.nextPageToken = "foo";
601 } 601 }
602 buildCounterListLocationsResponse--; 602 buildCounterListLocationsResponse--;
603 return o; 603 return o;
604 } 604 }
605 605
606 checkListLocationsResponse(api.ListLocationsResponse o) { 606 checkListLocationsResponse(api.ListLocationsResponse o) {
607 buildCounterListLocationsResponse++; 607 buildCounterListLocationsResponse++;
608 if (buildCounterListLocationsResponse < 3) { 608 if (buildCounterListLocationsResponse < 3) {
609 checkUnnamed1400(o.locations); 609 checkUnnamed1378(o.locations);
610 unittest.expect(o.nextPageToken, unittest.equals('foo')); 610 unittest.expect(o.nextPageToken, unittest.equals('foo'));
611 } 611 }
612 buildCounterListLocationsResponse--; 612 buildCounterListLocationsResponse--;
613 } 613 }
614 614
615 buildUnnamed1401() { 615 buildUnnamed1379() {
616 var o = new core.Map<core.String, core.String>(); 616 var o = new core.Map<core.String, core.String>();
617 o["x"] = "foo"; 617 o["x"] = "foo";
618 o["y"] = "foo"; 618 o["y"] = "foo";
619 return o; 619 return o;
620 } 620 }
621 621
622 checkUnnamed1401(core.Map<core.String, core.String> o) { 622 checkUnnamed1379(core.Map<core.String, core.String> o) {
623 unittest.expect(o, unittest.hasLength(2)); 623 unittest.expect(o, unittest.hasLength(2));
624 unittest.expect(o["x"], unittest.equals('foo')); 624 unittest.expect(o["x"], unittest.equals('foo'));
625 unittest.expect(o["y"], unittest.equals('foo')); 625 unittest.expect(o["y"], unittest.equals('foo'));
626 } 626 }
627 627
628 buildUnnamed1402() { 628 buildUnnamed1380() {
629 var o = new core.Map<core.String, core.Object>(); 629 var o = new core.Map<core.String, core.Object>();
630 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 630 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
631 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 631 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
632 return o; 632 return o;
633 } 633 }
634 634
635 checkUnnamed1402(core.Map<core.String, core.Object> o) { 635 checkUnnamed1380(core.Map<core.String, core.Object> o) {
636 unittest.expect(o, unittest.hasLength(2)); 636 unittest.expect(o, unittest.hasLength(2));
637 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo')); 637 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo'));
638 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo')); 638 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo'));
639 } 639 }
640 640
641 core.int buildCounterLocation = 0; 641 core.int buildCounterLocation = 0;
642 buildLocation() { 642 buildLocation() {
643 var o = new api.Location(); 643 var o = new api.Location();
644 buildCounterLocation++; 644 buildCounterLocation++;
645 if (buildCounterLocation < 3) { 645 if (buildCounterLocation < 3) {
646 o.labels = buildUnnamed1401(); 646 o.labels = buildUnnamed1379();
647 o.locationId = "foo"; 647 o.locationId = "foo";
648 o.metadata = buildUnnamed1402(); 648 o.metadata = buildUnnamed1380();
649 o.name = "foo"; 649 o.name = "foo";
650 } 650 }
651 buildCounterLocation--; 651 buildCounterLocation--;
652 return o; 652 return o;
653 } 653 }
654 654
655 checkLocation(api.Location o) { 655 checkLocation(api.Location o) {
656 buildCounterLocation++; 656 buildCounterLocation++;
657 if (buildCounterLocation < 3) { 657 if (buildCounterLocation < 3) {
658 checkUnnamed1401(o.labels); 658 checkUnnamed1379(o.labels);
659 unittest.expect(o.locationId, unittest.equals('foo')); 659 unittest.expect(o.locationId, unittest.equals('foo'));
660 checkUnnamed1402(o.metadata); 660 checkUnnamed1380(o.metadata);
661 unittest.expect(o.name, unittest.equals('foo')); 661 unittest.expect(o.name, unittest.equals('foo'));
662 } 662 }
663 buildCounterLocation--; 663 buildCounterLocation--;
664 } 664 }
665 665
666 core.int buildCounterLogConfig = 0; 666 core.int buildCounterLogConfig = 0;
667 buildLogConfig() { 667 buildLogConfig() {
668 var o = new api.LogConfig(); 668 var o = new api.LogConfig();
669 buildCounterLogConfig++; 669 buildCounterLogConfig++;
670 if (buildCounterLogConfig < 3) { 670 if (buildCounterLogConfig < 3) {
671 o.cloudAudit = buildCloudAuditOptions(); 671 o.cloudAudit = buildCloudAuditOptions();
672 o.counter = buildCounterOptions(); 672 o.counter = buildCounterOptions();
673 o.dataAccess = buildDataAccessOptions(); 673 o.dataAccess = buildDataAccessOptions();
674 } 674 }
675 buildCounterLogConfig--; 675 buildCounterLogConfig--;
676 return o; 676 return o;
677 } 677 }
678 678
679 checkLogConfig(api.LogConfig o) { 679 checkLogConfig(api.LogConfig o) {
680 buildCounterLogConfig++; 680 buildCounterLogConfig++;
681 if (buildCounterLogConfig < 3) { 681 if (buildCounterLogConfig < 3) {
682 checkCloudAuditOptions(o.cloudAudit); 682 checkCloudAuditOptions(o.cloudAudit);
683 checkCounterOptions(o.counter); 683 checkCounterOptions(o.counter);
684 checkDataAccessOptions(o.dataAccess); 684 checkDataAccessOptions(o.dataAccess);
685 } 685 }
686 buildCounterLogConfig--; 686 buildCounterLogConfig--;
687 } 687 }
688 688
689 buildUnnamed1403() { 689 buildUnnamed1381() {
690 var o = new core.List<api.AuditConfig>(); 690 var o = new core.List<api.AuditConfig>();
691 o.add(buildAuditConfig()); 691 o.add(buildAuditConfig());
692 o.add(buildAuditConfig()); 692 o.add(buildAuditConfig());
693 return o; 693 return o;
694 } 694 }
695 695
696 checkUnnamed1403(core.List<api.AuditConfig> o) { 696 checkUnnamed1381(core.List<api.AuditConfig> o) {
697 unittest.expect(o, unittest.hasLength(2)); 697 unittest.expect(o, unittest.hasLength(2));
698 checkAuditConfig(o[0]); 698 checkAuditConfig(o[0]);
699 checkAuditConfig(o[1]); 699 checkAuditConfig(o[1]);
700 } 700 }
701 701
702 buildUnnamed1404() { 702 buildUnnamed1382() {
703 var o = new core.List<api.Binding>(); 703 var o = new core.List<api.Binding>();
704 o.add(buildBinding()); 704 o.add(buildBinding());
705 o.add(buildBinding()); 705 o.add(buildBinding());
706 return o; 706 return o;
707 } 707 }
708 708
709 checkUnnamed1404(core.List<api.Binding> o) { 709 checkUnnamed1382(core.List<api.Binding> o) {
710 unittest.expect(o, unittest.hasLength(2)); 710 unittest.expect(o, unittest.hasLength(2));
711 checkBinding(o[0]); 711 checkBinding(o[0]);
712 checkBinding(o[1]); 712 checkBinding(o[1]);
713 } 713 }
714 714
715 buildUnnamed1405() { 715 buildUnnamed1383() {
716 var o = new core.List<api.Rule>(); 716 var o = new core.List<api.Rule>();
717 o.add(buildRule()); 717 o.add(buildRule());
718 o.add(buildRule()); 718 o.add(buildRule());
719 return o; 719 return o;
720 } 720 }
721 721
722 checkUnnamed1405(core.List<api.Rule> o) { 722 checkUnnamed1383(core.List<api.Rule> o) {
723 unittest.expect(o, unittest.hasLength(2)); 723 unittest.expect(o, unittest.hasLength(2));
724 checkRule(o[0]); 724 checkRule(o[0]);
725 checkRule(o[1]); 725 checkRule(o[1]);
726 } 726 }
727 727
728 core.int buildCounterPolicy = 0; 728 core.int buildCounterPolicy = 0;
729 buildPolicy() { 729 buildPolicy() {
730 var o = new api.Policy(); 730 var o = new api.Policy();
731 buildCounterPolicy++; 731 buildCounterPolicy++;
732 if (buildCounterPolicy < 3) { 732 if (buildCounterPolicy < 3) {
733 o.auditConfigs = buildUnnamed1403(); 733 o.auditConfigs = buildUnnamed1381();
734 o.bindings = buildUnnamed1404(); 734 o.bindings = buildUnnamed1382();
735 o.etag = "foo"; 735 o.etag = "foo";
736 o.iamOwned = true; 736 o.iamOwned = true;
737 o.rules = buildUnnamed1405(); 737 o.rules = buildUnnamed1383();
738 o.version = 42; 738 o.version = 42;
739 } 739 }
740 buildCounterPolicy--; 740 buildCounterPolicy--;
741 return o; 741 return o;
742 } 742 }
743 743
744 checkPolicy(api.Policy o) { 744 checkPolicy(api.Policy o) {
745 buildCounterPolicy++; 745 buildCounterPolicy++;
746 if (buildCounterPolicy < 3) { 746 if (buildCounterPolicy < 3) {
747 checkUnnamed1403(o.auditConfigs); 747 checkUnnamed1381(o.auditConfigs);
748 checkUnnamed1404(o.bindings); 748 checkUnnamed1382(o.bindings);
749 unittest.expect(o.etag, unittest.equals('foo')); 749 unittest.expect(o.etag, unittest.equals('foo'));
750 unittest.expect(o.iamOwned, unittest.isTrue); 750 unittest.expect(o.iamOwned, unittest.isTrue);
751 checkUnnamed1405(o.rules); 751 checkUnnamed1383(o.rules);
752 unittest.expect(o.version, unittest.equals(42)); 752 unittest.expect(o.version, unittest.equals(42));
753 } 753 }
754 buildCounterPolicy--; 754 buildCounterPolicy--;
755 } 755 }
756 756
757 core.int buildCounterRestoreCryptoKeyVersionRequest = 0; 757 core.int buildCounterRestoreCryptoKeyVersionRequest = 0;
758 buildRestoreCryptoKeyVersionRequest() { 758 buildRestoreCryptoKeyVersionRequest() {
759 var o = new api.RestoreCryptoKeyVersionRequest(); 759 var o = new api.RestoreCryptoKeyVersionRequest();
760 buildCounterRestoreCryptoKeyVersionRequest++; 760 buildCounterRestoreCryptoKeyVersionRequest++;
761 if (buildCounterRestoreCryptoKeyVersionRequest < 3) { 761 if (buildCounterRestoreCryptoKeyVersionRequest < 3) {
762 } 762 }
763 buildCounterRestoreCryptoKeyVersionRequest--; 763 buildCounterRestoreCryptoKeyVersionRequest--;
764 return o; 764 return o;
765 } 765 }
766 766
767 checkRestoreCryptoKeyVersionRequest(api.RestoreCryptoKeyVersionRequest o) { 767 checkRestoreCryptoKeyVersionRequest(api.RestoreCryptoKeyVersionRequest o) {
768 buildCounterRestoreCryptoKeyVersionRequest++; 768 buildCounterRestoreCryptoKeyVersionRequest++;
769 if (buildCounterRestoreCryptoKeyVersionRequest < 3) { 769 if (buildCounterRestoreCryptoKeyVersionRequest < 3) {
770 } 770 }
771 buildCounterRestoreCryptoKeyVersionRequest--; 771 buildCounterRestoreCryptoKeyVersionRequest--;
772 } 772 }
773 773
774 buildUnnamed1406() { 774 buildUnnamed1384() {
775 var o = new core.List<api.Condition>(); 775 var o = new core.List<api.Condition>();
776 o.add(buildCondition()); 776 o.add(buildCondition());
777 o.add(buildCondition()); 777 o.add(buildCondition());
778 return o; 778 return o;
779 } 779 }
780 780
781 checkUnnamed1406(core.List<api.Condition> o) { 781 checkUnnamed1384(core.List<api.Condition> o) {
782 unittest.expect(o, unittest.hasLength(2)); 782 unittest.expect(o, unittest.hasLength(2));
783 checkCondition(o[0]); 783 checkCondition(o[0]);
784 checkCondition(o[1]); 784 checkCondition(o[1]);
785 } 785 }
786 786
787 buildUnnamed1407() { 787 buildUnnamed1385() {
788 var o = new core.List<core.String>(); 788 var o = new core.List<core.String>();
789 o.add("foo"); 789 o.add("foo");
790 o.add("foo"); 790 o.add("foo");
791 return o; 791 return o;
792 } 792 }
793 793
794 checkUnnamed1407(core.List<core.String> o) { 794 checkUnnamed1385(core.List<core.String> o) {
795 unittest.expect(o, unittest.hasLength(2)); 795 unittest.expect(o, unittest.hasLength(2));
796 unittest.expect(o[0], unittest.equals('foo')); 796 unittest.expect(o[0], unittest.equals('foo'));
797 unittest.expect(o[1], unittest.equals('foo')); 797 unittest.expect(o[1], unittest.equals('foo'));
798 } 798 }
799 799
800 buildUnnamed1408() { 800 buildUnnamed1386() {
801 var o = new core.List<api.LogConfig>(); 801 var o = new core.List<api.LogConfig>();
802 o.add(buildLogConfig()); 802 o.add(buildLogConfig());
803 o.add(buildLogConfig()); 803 o.add(buildLogConfig());
804 return o; 804 return o;
805 } 805 }
806 806
807 checkUnnamed1408(core.List<api.LogConfig> o) { 807 checkUnnamed1386(core.List<api.LogConfig> o) {
808 unittest.expect(o, unittest.hasLength(2)); 808 unittest.expect(o, unittest.hasLength(2));
809 checkLogConfig(o[0]); 809 checkLogConfig(o[0]);
810 checkLogConfig(o[1]); 810 checkLogConfig(o[1]);
811 } 811 }
812 812
813 buildUnnamed1409() { 813 buildUnnamed1387() {
814 var o = new core.List<core.String>(); 814 var o = new core.List<core.String>();
815 o.add("foo"); 815 o.add("foo");
816 o.add("foo"); 816 o.add("foo");
817 return o; 817 return o;
818 } 818 }
819 819
820 checkUnnamed1409(core.List<core.String> o) { 820 checkUnnamed1387(core.List<core.String> o) {
821 unittest.expect(o, unittest.hasLength(2)); 821 unittest.expect(o, unittest.hasLength(2));
822 unittest.expect(o[0], unittest.equals('foo')); 822 unittest.expect(o[0], unittest.equals('foo'));
823 unittest.expect(o[1], unittest.equals('foo')); 823 unittest.expect(o[1], unittest.equals('foo'));
824 } 824 }
825 825
826 buildUnnamed1410() { 826 buildUnnamed1388() {
827 var o = new core.List<core.String>(); 827 var o = new core.List<core.String>();
828 o.add("foo"); 828 o.add("foo");
829 o.add("foo"); 829 o.add("foo");
830 return o; 830 return o;
831 } 831 }
832 832
833 checkUnnamed1410(core.List<core.String> o) { 833 checkUnnamed1388(core.List<core.String> o) {
834 unittest.expect(o, unittest.hasLength(2)); 834 unittest.expect(o, unittest.hasLength(2));
835 unittest.expect(o[0], unittest.equals('foo')); 835 unittest.expect(o[0], unittest.equals('foo'));
836 unittest.expect(o[1], unittest.equals('foo')); 836 unittest.expect(o[1], unittest.equals('foo'));
837 } 837 }
838 838
839 core.int buildCounterRule = 0; 839 core.int buildCounterRule = 0;
840 buildRule() { 840 buildRule() {
841 var o = new api.Rule(); 841 var o = new api.Rule();
842 buildCounterRule++; 842 buildCounterRule++;
843 if (buildCounterRule < 3) { 843 if (buildCounterRule < 3) {
844 o.action = "foo"; 844 o.action = "foo";
845 o.conditions = buildUnnamed1406(); 845 o.conditions = buildUnnamed1384();
846 o.description = "foo"; 846 o.description = "foo";
847 o.in_ = buildUnnamed1407(); 847 o.in_ = buildUnnamed1385();
848 o.logConfig = buildUnnamed1408(); 848 o.logConfig = buildUnnamed1386();
849 o.notIn = buildUnnamed1409(); 849 o.notIn = buildUnnamed1387();
850 o.permissions = buildUnnamed1410(); 850 o.permissions = buildUnnamed1388();
851 } 851 }
852 buildCounterRule--; 852 buildCounterRule--;
853 return o; 853 return o;
854 } 854 }
855 855
856 checkRule(api.Rule o) { 856 checkRule(api.Rule o) {
857 buildCounterRule++; 857 buildCounterRule++;
858 if (buildCounterRule < 3) { 858 if (buildCounterRule < 3) {
859 unittest.expect(o.action, unittest.equals('foo')); 859 unittest.expect(o.action, unittest.equals('foo'));
860 checkUnnamed1406(o.conditions); 860 checkUnnamed1384(o.conditions);
861 unittest.expect(o.description, unittest.equals('foo')); 861 unittest.expect(o.description, unittest.equals('foo'));
862 checkUnnamed1407(o.in_); 862 checkUnnamed1385(o.in_);
863 checkUnnamed1408(o.logConfig); 863 checkUnnamed1386(o.logConfig);
864 checkUnnamed1409(o.notIn); 864 checkUnnamed1387(o.notIn);
865 checkUnnamed1410(o.permissions); 865 checkUnnamed1388(o.permissions);
866 } 866 }
867 buildCounterRule--; 867 buildCounterRule--;
868 } 868 }
869 869
870 core.int buildCounterSetIamPolicyRequest = 0; 870 core.int buildCounterSetIamPolicyRequest = 0;
871 buildSetIamPolicyRequest() { 871 buildSetIamPolicyRequest() {
872 var o = new api.SetIamPolicyRequest(); 872 var o = new api.SetIamPolicyRequest();
873 buildCounterSetIamPolicyRequest++; 873 buildCounterSetIamPolicyRequest++;
874 if (buildCounterSetIamPolicyRequest < 3) { 874 if (buildCounterSetIamPolicyRequest < 3) {
875 o.policy = buildPolicy(); 875 o.policy = buildPolicy();
876 o.updateMask = "foo"; 876 o.updateMask = "foo";
877 } 877 }
878 buildCounterSetIamPolicyRequest--; 878 buildCounterSetIamPolicyRequest--;
879 return o; 879 return o;
880 } 880 }
881 881
882 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { 882 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
883 buildCounterSetIamPolicyRequest++; 883 buildCounterSetIamPolicyRequest++;
884 if (buildCounterSetIamPolicyRequest < 3) { 884 if (buildCounterSetIamPolicyRequest < 3) {
885 checkPolicy(o.policy); 885 checkPolicy(o.policy);
886 unittest.expect(o.updateMask, unittest.equals('foo')); 886 unittest.expect(o.updateMask, unittest.equals('foo'));
887 } 887 }
888 buildCounterSetIamPolicyRequest--; 888 buildCounterSetIamPolicyRequest--;
889 } 889 }
890 890
891 buildUnnamed1411() { 891 buildUnnamed1389() {
892 var o = new core.List<core.String>(); 892 var o = new core.List<core.String>();
893 o.add("foo"); 893 o.add("foo");
894 o.add("foo"); 894 o.add("foo");
895 return o; 895 return o;
896 } 896 }
897 897
898 checkUnnamed1411(core.List<core.String> o) { 898 checkUnnamed1389(core.List<core.String> o) {
899 unittest.expect(o, unittest.hasLength(2)); 899 unittest.expect(o, unittest.hasLength(2));
900 unittest.expect(o[0], unittest.equals('foo')); 900 unittest.expect(o[0], unittest.equals('foo'));
901 unittest.expect(o[1], unittest.equals('foo')); 901 unittest.expect(o[1], unittest.equals('foo'));
902 } 902 }
903 903
904 core.int buildCounterTestIamPermissionsRequest = 0; 904 core.int buildCounterTestIamPermissionsRequest = 0;
905 buildTestIamPermissionsRequest() { 905 buildTestIamPermissionsRequest() {
906 var o = new api.TestIamPermissionsRequest(); 906 var o = new api.TestIamPermissionsRequest();
907 buildCounterTestIamPermissionsRequest++; 907 buildCounterTestIamPermissionsRequest++;
908 if (buildCounterTestIamPermissionsRequest < 3) { 908 if (buildCounterTestIamPermissionsRequest < 3) {
909 o.permissions = buildUnnamed1411(); 909 o.permissions = buildUnnamed1389();
910 } 910 }
911 buildCounterTestIamPermissionsRequest--; 911 buildCounterTestIamPermissionsRequest--;
912 return o; 912 return o;
913 } 913 }
914 914
915 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { 915 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
916 buildCounterTestIamPermissionsRequest++; 916 buildCounterTestIamPermissionsRequest++;
917 if (buildCounterTestIamPermissionsRequest < 3) { 917 if (buildCounterTestIamPermissionsRequest < 3) {
918 checkUnnamed1411(o.permissions); 918 checkUnnamed1389(o.permissions);
919 } 919 }
920 buildCounterTestIamPermissionsRequest--; 920 buildCounterTestIamPermissionsRequest--;
921 } 921 }
922 922
923 buildUnnamed1412() { 923 buildUnnamed1390() {
924 var o = new core.List<core.String>(); 924 var o = new core.List<core.String>();
925 o.add("foo"); 925 o.add("foo");
926 o.add("foo"); 926 o.add("foo");
927 return o; 927 return o;
928 } 928 }
929 929
930 checkUnnamed1412(core.List<core.String> o) { 930 checkUnnamed1390(core.List<core.String> o) {
931 unittest.expect(o, unittest.hasLength(2)); 931 unittest.expect(o, unittest.hasLength(2));
932 unittest.expect(o[0], unittest.equals('foo')); 932 unittest.expect(o[0], unittest.equals('foo'));
933 unittest.expect(o[1], unittest.equals('foo')); 933 unittest.expect(o[1], unittest.equals('foo'));
934 } 934 }
935 935
936 core.int buildCounterTestIamPermissionsResponse = 0; 936 core.int buildCounterTestIamPermissionsResponse = 0;
937 buildTestIamPermissionsResponse() { 937 buildTestIamPermissionsResponse() {
938 var o = new api.TestIamPermissionsResponse(); 938 var o = new api.TestIamPermissionsResponse();
939 buildCounterTestIamPermissionsResponse++; 939 buildCounterTestIamPermissionsResponse++;
940 if (buildCounterTestIamPermissionsResponse < 3) { 940 if (buildCounterTestIamPermissionsResponse < 3) {
941 o.permissions = buildUnnamed1412(); 941 o.permissions = buildUnnamed1390();
942 } 942 }
943 buildCounterTestIamPermissionsResponse--; 943 buildCounterTestIamPermissionsResponse--;
944 return o; 944 return o;
945 } 945 }
946 946
947 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { 947 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
948 buildCounterTestIamPermissionsResponse++; 948 buildCounterTestIamPermissionsResponse++;
949 if (buildCounterTestIamPermissionsResponse < 3) { 949 if (buildCounterTestIamPermissionsResponse < 3) {
950 checkUnnamed1412(o.permissions); 950 checkUnnamed1390(o.permissions);
951 } 951 }
952 buildCounterTestIamPermissionsResponse--; 952 buildCounterTestIamPermissionsResponse--;
953 } 953 }
954 954
955 core.int buildCounterUpdateCryptoKeyPrimaryVersionRequest = 0; 955 core.int buildCounterUpdateCryptoKeyPrimaryVersionRequest = 0;
956 buildUpdateCryptoKeyPrimaryVersionRequest() { 956 buildUpdateCryptoKeyPrimaryVersionRequest() {
957 var o = new api.UpdateCryptoKeyPrimaryVersionRequest(); 957 var o = new api.UpdateCryptoKeyPrimaryVersionRequest();
958 buildCounterUpdateCryptoKeyPrimaryVersionRequest++; 958 buildCounterUpdateCryptoKeyPrimaryVersionRequest++;
959 if (buildCounterUpdateCryptoKeyPrimaryVersionRequest < 3) { 959 if (buildCounterUpdateCryptoKeyPrimaryVersionRequest < 3) {
960 o.cryptoKeyVersionId = "foo"; 960 o.cryptoKeyVersionId = "foo";
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after
2258 res.get(arg_name).then(unittest.expectAsync1(((api.CryptoKeyVersion respon se) { 2258 res.get(arg_name).then(unittest.expectAsync1(((api.CryptoKeyVersion respon se) {
2259 checkCryptoKeyVersion(response); 2259 checkCryptoKeyVersion(response);
2260 }))); 2260 })));
2261 }); 2261 });
2262 2262
2263 unittest.test("method--list", () { 2263 unittest.test("method--list", () {
2264 2264
2265 var mock = new HttpServerMock(); 2265 var mock = new HttpServerMock();
2266 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns; 2266 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns;
2267 var arg_parent = "foo"; 2267 var arg_parent = "foo";
2268 var arg_pageSize = 42;
2268 var arg_pageToken = "foo"; 2269 var arg_pageToken = "foo";
2269 var arg_pageSize = 42;
2270 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2270 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2271 var path = (req.url).path; 2271 var path = (req.url).path;
2272 var pathOffset = 0; 2272 var pathOffset = 0;
2273 var index; 2273 var index;
2274 var subPart; 2274 var subPart;
2275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2276 pathOffset += 1; 2276 pathOffset += 1;
2277 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2277 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
2278 pathOffset += 3; 2278 pathOffset += 3;
2279 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2279 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2280 2280
2281 var query = (req.url).query; 2281 var query = (req.url).query;
2282 var queryOffset = 0; 2282 var queryOffset = 0;
2283 var queryMap = {}; 2283 var queryMap = {};
2284 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2284 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2285 parseBool(n) { 2285 parseBool(n) {
2286 if (n == "true") return true; 2286 if (n == "true") return true;
2287 if (n == "false") return false; 2287 if (n == "false") return false;
2288 if (n == null) return null; 2288 if (n == null) return null;
2289 throw new core.ArgumentError("Invalid boolean: $n"); 2289 throw new core.ArgumentError("Invalid boolean: $n");
2290 } 2290 }
2291 if (query.length > 0) { 2291 if (query.length > 0) {
2292 for (var part in query.split("&")) { 2292 for (var part in query.split("&")) {
2293 var keyvalue = part.split("="); 2293 var keyvalue = part.split("=");
2294 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2294 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2295 } 2295 }
2296 } 2296 }
2297 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2297 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2298 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2298 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2299 2299
2300 2300
2301 var h = { 2301 var h = {
2302 "content-type" : "application/json; charset=utf-8", 2302 "content-type" : "application/json; charset=utf-8",
2303 }; 2303 };
2304 var resp = convert.JSON.encode(buildListCryptoKeyVersionsResponse()); 2304 var resp = convert.JSON.encode(buildListCryptoKeyVersionsResponse());
2305 return new async.Future.value(stringResponse(200, h, resp)); 2305 return new async.Future.value(stringResponse(200, h, resp));
2306 }), true); 2306 }), true);
2307 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListCryptoKeyVersionsResponse response) { 2307 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the n(unittest.expectAsync1(((api.ListCryptoKeyVersionsResponse response) {
2308 checkListCryptoKeyVersionsResponse(response); 2308 checkListCryptoKeyVersionsResponse(response);
2309 }))); 2309 })));
2310 }); 2310 });
2311 2311
2312 unittest.test("method--patch", () { 2312 unittest.test("method--patch", () {
2313 2313
2314 var mock = new HttpServerMock(); 2314 var mock = new HttpServerMock();
2315 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns; 2315 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns;
2316 var arg_request = buildCryptoKeyVersion(); 2316 var arg_request = buildCryptoKeyVersion();
2317 var arg_name = "foo"; 2317 var arg_name = "foo";
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
2407 res.restore(arg_request, arg_name).then(unittest.expectAsync1(((api.Crypto KeyVersion response) { 2407 res.restore(arg_request, arg_name).then(unittest.expectAsync1(((api.Crypto KeyVersion response) {
2408 checkCryptoKeyVersion(response); 2408 checkCryptoKeyVersion(response);
2409 }))); 2409 })));
2410 }); 2410 });
2411 2411
2412 }); 2412 });
2413 2413
2414 2414
2415 } 2415 }
2416 2416
OLDNEW
« no previous file with comments | « generated/googleapis/test/cloudfunctions/v1_test.dart ('k') | generated/googleapis/test/cloudresourcemanager/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698