Chromium Code Reviews

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

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff |
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:unittest/unittest.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
11 11
12 import 'package:googleapis/cloudkms/v1.dart' as api; 12 import 'package:googleapis/cloudkms/v1.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...)
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 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 buildUnnamed1301() { 54 buildUnnamed1308() {
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 checkUnnamed1301(core.List<api.AuditLogConfig> o) { 61 checkUnnamed1308(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 buildUnnamed1302() { 67 buildUnnamed1309() {
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 checkUnnamed1302(core.List<core.String> o) { 74 checkUnnamed1309(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 = buildUnnamed1301(); 85 o.auditLogConfigs = buildUnnamed1308();
86 o.exemptedMembers = buildUnnamed1302(); 86 o.exemptedMembers = buildUnnamed1309();
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 checkUnnamed1301(o.auditLogConfigs); 96 checkUnnamed1308(o.auditLogConfigs);
97 checkUnnamed1302(o.exemptedMembers); 97 checkUnnamed1309(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 buildUnnamed1303() { 103 buildUnnamed1310() {
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 checkUnnamed1303(core.List<core.String> o) { 110 checkUnnamed1310(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 = buildUnnamed1303(); 121 o.exemptedMembers = buildUnnamed1310();
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 checkUnnamed1303(o.exemptedMembers); 131 checkUnnamed1310(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 buildUnnamed1304() { 137 buildUnnamed1311() {
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 checkUnnamed1304(core.List<core.String> o) { 144 checkUnnamed1311(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.members = buildUnnamed1304(); 155 o.condition = buildExpr();
156 o.members = buildUnnamed1311();
156 o.role = "foo"; 157 o.role = "foo";
157 } 158 }
158 buildCounterBinding--; 159 buildCounterBinding--;
159 return o; 160 return o;
160 } 161 }
161 162
162 checkBinding(api.Binding o) { 163 checkBinding(api.Binding o) {
163 buildCounterBinding++; 164 buildCounterBinding++;
164 if (buildCounterBinding < 3) { 165 if (buildCounterBinding < 3) {
165 checkUnnamed1304(o.members); 166 checkExpr(o.condition);
167 checkUnnamed1311(o.members);
166 unittest.expect(o.role, unittest.equals('foo')); 168 unittest.expect(o.role, unittest.equals('foo'));
167 } 169 }
168 buildCounterBinding--; 170 buildCounterBinding--;
169 } 171 }
170 172
171 core.int buildCounterCloudAuditOptions = 0; 173 core.int buildCounterCloudAuditOptions = 0;
172 buildCloudAuditOptions() { 174 buildCloudAuditOptions() {
173 var o = new api.CloudAuditOptions(); 175 var o = new api.CloudAuditOptions();
174 buildCounterCloudAuditOptions++; 176 buildCounterCloudAuditOptions++;
175 if (buildCounterCloudAuditOptions < 3) { 177 if (buildCounterCloudAuditOptions < 3) {
176 o.logName = "foo"; 178 o.logName = "foo";
177 } 179 }
178 buildCounterCloudAuditOptions--; 180 buildCounterCloudAuditOptions--;
179 return o; 181 return o;
180 } 182 }
181 183
182 checkCloudAuditOptions(api.CloudAuditOptions o) { 184 checkCloudAuditOptions(api.CloudAuditOptions o) {
183 buildCounterCloudAuditOptions++; 185 buildCounterCloudAuditOptions++;
184 if (buildCounterCloudAuditOptions < 3) { 186 if (buildCounterCloudAuditOptions < 3) {
185 unittest.expect(o.logName, unittest.equals('foo')); 187 unittest.expect(o.logName, unittest.equals('foo'));
186 } 188 }
187 buildCounterCloudAuditOptions--; 189 buildCounterCloudAuditOptions--;
188 } 190 }
189 191
190 buildUnnamed1305() { 192 buildUnnamed1312() {
191 var o = new core.List<core.String>(); 193 var o = new core.List<core.String>();
192 o.add("foo"); 194 o.add("foo");
193 o.add("foo"); 195 o.add("foo");
194 return o; 196 return o;
195 } 197 }
196 198
197 checkUnnamed1305(core.List<core.String> o) { 199 checkUnnamed1312(core.List<core.String> o) {
198 unittest.expect(o, unittest.hasLength(2)); 200 unittest.expect(o, unittest.hasLength(2));
199 unittest.expect(o[0], unittest.equals('foo')); 201 unittest.expect(o[0], unittest.equals('foo'));
200 unittest.expect(o[1], unittest.equals('foo')); 202 unittest.expect(o[1], unittest.equals('foo'));
201 } 203 }
202 204
203 core.int buildCounterCondition = 0; 205 core.int buildCounterCondition = 0;
204 buildCondition() { 206 buildCondition() {
205 var o = new api.Condition(); 207 var o = new api.Condition();
206 buildCounterCondition++; 208 buildCounterCondition++;
207 if (buildCounterCondition < 3) { 209 if (buildCounterCondition < 3) {
208 o.iam = "foo"; 210 o.iam = "foo";
209 o.op = "foo"; 211 o.op = "foo";
210 o.svc = "foo"; 212 o.svc = "foo";
211 o.sys = "foo"; 213 o.sys = "foo";
212 o.value = "foo"; 214 o.value = "foo";
213 o.values = buildUnnamed1305(); 215 o.values = buildUnnamed1312();
214 } 216 }
215 buildCounterCondition--; 217 buildCounterCondition--;
216 return o; 218 return o;
217 } 219 }
218 220
219 checkCondition(api.Condition o) { 221 checkCondition(api.Condition o) {
220 buildCounterCondition++; 222 buildCounterCondition++;
221 if (buildCounterCondition < 3) { 223 if (buildCounterCondition < 3) {
222 unittest.expect(o.iam, unittest.equals('foo')); 224 unittest.expect(o.iam, unittest.equals('foo'));
223 unittest.expect(o.op, unittest.equals('foo')); 225 unittest.expect(o.op, unittest.equals('foo'));
224 unittest.expect(o.svc, unittest.equals('foo')); 226 unittest.expect(o.svc, unittest.equals('foo'));
225 unittest.expect(o.sys, unittest.equals('foo')); 227 unittest.expect(o.sys, unittest.equals('foo'));
226 unittest.expect(o.value, unittest.equals('foo')); 228 unittest.expect(o.value, unittest.equals('foo'));
227 checkUnnamed1305(o.values); 229 checkUnnamed1312(o.values);
228 } 230 }
229 buildCounterCondition--; 231 buildCounterCondition--;
230 } 232 }
231 233
232 core.int buildCounterCounterOptions = 0; 234 core.int buildCounterCounterOptions = 0;
233 buildCounterOptions() { 235 buildCounterOptions() {
234 var o = new api.CounterOptions(); 236 var o = new api.CounterOptions();
235 buildCounterCounterOptions++; 237 buildCounterCounterOptions++;
236 if (buildCounterCounterOptions < 3) { 238 if (buildCounterCounterOptions < 3) {
237 o.field = "foo"; 239 o.field = "foo";
(...skipping 177 matching lines...)
415 417
416 checkEncryptResponse(api.EncryptResponse o) { 418 checkEncryptResponse(api.EncryptResponse o) {
417 buildCounterEncryptResponse++; 419 buildCounterEncryptResponse++;
418 if (buildCounterEncryptResponse < 3) { 420 if (buildCounterEncryptResponse < 3) {
419 unittest.expect(o.ciphertext, unittest.equals('foo')); 421 unittest.expect(o.ciphertext, unittest.equals('foo'));
420 unittest.expect(o.name, unittest.equals('foo')); 422 unittest.expect(o.name, unittest.equals('foo'));
421 } 423 }
422 buildCounterEncryptResponse--; 424 buildCounterEncryptResponse--;
423 } 425 }
424 426
427 core.int buildCounterExpr = 0;
428 buildExpr() {
429 var o = new api.Expr();
430 buildCounterExpr++;
431 if (buildCounterExpr < 3) {
432 o.description = "foo";
433 o.expression = "foo";
434 o.location = "foo";
435 o.title = "foo";
436 }
437 buildCounterExpr--;
438 return o;
439 }
440
441 checkExpr(api.Expr o) {
442 buildCounterExpr++;
443 if (buildCounterExpr < 3) {
444 unittest.expect(o.description, unittest.equals('foo'));
445 unittest.expect(o.expression, unittest.equals('foo'));
446 unittest.expect(o.location, unittest.equals('foo'));
447 unittest.expect(o.title, unittest.equals('foo'));
448 }
449 buildCounterExpr--;
450 }
451
425 core.int buildCounterKeyRing = 0; 452 core.int buildCounterKeyRing = 0;
426 buildKeyRing() { 453 buildKeyRing() {
427 var o = new api.KeyRing(); 454 var o = new api.KeyRing();
428 buildCounterKeyRing++; 455 buildCounterKeyRing++;
429 if (buildCounterKeyRing < 3) { 456 if (buildCounterKeyRing < 3) {
430 o.createTime = "foo"; 457 o.createTime = "foo";
431 o.name = "foo"; 458 o.name = "foo";
432 } 459 }
433 buildCounterKeyRing--; 460 buildCounterKeyRing--;
434 return o; 461 return o;
435 } 462 }
436 463
437 checkKeyRing(api.KeyRing o) { 464 checkKeyRing(api.KeyRing o) {
438 buildCounterKeyRing++; 465 buildCounterKeyRing++;
439 if (buildCounterKeyRing < 3) { 466 if (buildCounterKeyRing < 3) {
440 unittest.expect(o.createTime, unittest.equals('foo')); 467 unittest.expect(o.createTime, unittest.equals('foo'));
441 unittest.expect(o.name, unittest.equals('foo')); 468 unittest.expect(o.name, unittest.equals('foo'));
442 } 469 }
443 buildCounterKeyRing--; 470 buildCounterKeyRing--;
444 } 471 }
445 472
446 buildUnnamed1306() { 473 buildUnnamed1313() {
447 var o = new core.List<api.CryptoKeyVersion>(); 474 var o = new core.List<api.CryptoKeyVersion>();
448 o.add(buildCryptoKeyVersion()); 475 o.add(buildCryptoKeyVersion());
449 o.add(buildCryptoKeyVersion()); 476 o.add(buildCryptoKeyVersion());
450 return o; 477 return o;
451 } 478 }
452 479
453 checkUnnamed1306(core.List<api.CryptoKeyVersion> o) { 480 checkUnnamed1313(core.List<api.CryptoKeyVersion> o) {
454 unittest.expect(o, unittest.hasLength(2)); 481 unittest.expect(o, unittest.hasLength(2));
455 checkCryptoKeyVersion(o[0]); 482 checkCryptoKeyVersion(o[0]);
456 checkCryptoKeyVersion(o[1]); 483 checkCryptoKeyVersion(o[1]);
457 } 484 }
458 485
459 core.int buildCounterListCryptoKeyVersionsResponse = 0; 486 core.int buildCounterListCryptoKeyVersionsResponse = 0;
460 buildListCryptoKeyVersionsResponse() { 487 buildListCryptoKeyVersionsResponse() {
461 var o = new api.ListCryptoKeyVersionsResponse(); 488 var o = new api.ListCryptoKeyVersionsResponse();
462 buildCounterListCryptoKeyVersionsResponse++; 489 buildCounterListCryptoKeyVersionsResponse++;
463 if (buildCounterListCryptoKeyVersionsResponse < 3) { 490 if (buildCounterListCryptoKeyVersionsResponse < 3) {
464 o.cryptoKeyVersions = buildUnnamed1306(); 491 o.cryptoKeyVersions = buildUnnamed1313();
465 o.nextPageToken = "foo"; 492 o.nextPageToken = "foo";
466 o.totalSize = 42; 493 o.totalSize = 42;
467 } 494 }
468 buildCounterListCryptoKeyVersionsResponse--; 495 buildCounterListCryptoKeyVersionsResponse--;
469 return o; 496 return o;
470 } 497 }
471 498
472 checkListCryptoKeyVersionsResponse(api.ListCryptoKeyVersionsResponse o) { 499 checkListCryptoKeyVersionsResponse(api.ListCryptoKeyVersionsResponse o) {
473 buildCounterListCryptoKeyVersionsResponse++; 500 buildCounterListCryptoKeyVersionsResponse++;
474 if (buildCounterListCryptoKeyVersionsResponse < 3) { 501 if (buildCounterListCryptoKeyVersionsResponse < 3) {
475 checkUnnamed1306(o.cryptoKeyVersions); 502 checkUnnamed1313(o.cryptoKeyVersions);
476 unittest.expect(o.nextPageToken, unittest.equals('foo')); 503 unittest.expect(o.nextPageToken, unittest.equals('foo'));
477 unittest.expect(o.totalSize, unittest.equals(42)); 504 unittest.expect(o.totalSize, unittest.equals(42));
478 } 505 }
479 buildCounterListCryptoKeyVersionsResponse--; 506 buildCounterListCryptoKeyVersionsResponse--;
480 } 507 }
481 508
482 buildUnnamed1307() { 509 buildUnnamed1314() {
483 var o = new core.List<api.CryptoKey>(); 510 var o = new core.List<api.CryptoKey>();
484 o.add(buildCryptoKey()); 511 o.add(buildCryptoKey());
485 o.add(buildCryptoKey()); 512 o.add(buildCryptoKey());
486 return o; 513 return o;
487 } 514 }
488 515
489 checkUnnamed1307(core.List<api.CryptoKey> o) { 516 checkUnnamed1314(core.List<api.CryptoKey> o) {
490 unittest.expect(o, unittest.hasLength(2)); 517 unittest.expect(o, unittest.hasLength(2));
491 checkCryptoKey(o[0]); 518 checkCryptoKey(o[0]);
492 checkCryptoKey(o[1]); 519 checkCryptoKey(o[1]);
493 } 520 }
494 521
495 core.int buildCounterListCryptoKeysResponse = 0; 522 core.int buildCounterListCryptoKeysResponse = 0;
496 buildListCryptoKeysResponse() { 523 buildListCryptoKeysResponse() {
497 var o = new api.ListCryptoKeysResponse(); 524 var o = new api.ListCryptoKeysResponse();
498 buildCounterListCryptoKeysResponse++; 525 buildCounterListCryptoKeysResponse++;
499 if (buildCounterListCryptoKeysResponse < 3) { 526 if (buildCounterListCryptoKeysResponse < 3) {
500 o.cryptoKeys = buildUnnamed1307(); 527 o.cryptoKeys = buildUnnamed1314();
501 o.nextPageToken = "foo"; 528 o.nextPageToken = "foo";
502 o.totalSize = 42; 529 o.totalSize = 42;
503 } 530 }
504 buildCounterListCryptoKeysResponse--; 531 buildCounterListCryptoKeysResponse--;
505 return o; 532 return o;
506 } 533 }
507 534
508 checkListCryptoKeysResponse(api.ListCryptoKeysResponse o) { 535 checkListCryptoKeysResponse(api.ListCryptoKeysResponse o) {
509 buildCounterListCryptoKeysResponse++; 536 buildCounterListCryptoKeysResponse++;
510 if (buildCounterListCryptoKeysResponse < 3) { 537 if (buildCounterListCryptoKeysResponse < 3) {
511 checkUnnamed1307(o.cryptoKeys); 538 checkUnnamed1314(o.cryptoKeys);
512 unittest.expect(o.nextPageToken, unittest.equals('foo')); 539 unittest.expect(o.nextPageToken, unittest.equals('foo'));
513 unittest.expect(o.totalSize, unittest.equals(42)); 540 unittest.expect(o.totalSize, unittest.equals(42));
514 } 541 }
515 buildCounterListCryptoKeysResponse--; 542 buildCounterListCryptoKeysResponse--;
516 } 543 }
517 544
518 buildUnnamed1308() { 545 buildUnnamed1315() {
519 var o = new core.List<api.KeyRing>(); 546 var o = new core.List<api.KeyRing>();
520 o.add(buildKeyRing()); 547 o.add(buildKeyRing());
521 o.add(buildKeyRing()); 548 o.add(buildKeyRing());
522 return o; 549 return o;
523 } 550 }
524 551
525 checkUnnamed1308(core.List<api.KeyRing> o) { 552 checkUnnamed1315(core.List<api.KeyRing> o) {
526 unittest.expect(o, unittest.hasLength(2)); 553 unittest.expect(o, unittest.hasLength(2));
527 checkKeyRing(o[0]); 554 checkKeyRing(o[0]);
528 checkKeyRing(o[1]); 555 checkKeyRing(o[1]);
529 } 556 }
530 557
531 core.int buildCounterListKeyRingsResponse = 0; 558 core.int buildCounterListKeyRingsResponse = 0;
532 buildListKeyRingsResponse() { 559 buildListKeyRingsResponse() {
533 var o = new api.ListKeyRingsResponse(); 560 var o = new api.ListKeyRingsResponse();
534 buildCounterListKeyRingsResponse++; 561 buildCounterListKeyRingsResponse++;
535 if (buildCounterListKeyRingsResponse < 3) { 562 if (buildCounterListKeyRingsResponse < 3) {
536 o.keyRings = buildUnnamed1308(); 563 o.keyRings = buildUnnamed1315();
537 o.nextPageToken = "foo"; 564 o.nextPageToken = "foo";
538 o.totalSize = 42; 565 o.totalSize = 42;
539 } 566 }
540 buildCounterListKeyRingsResponse--; 567 buildCounterListKeyRingsResponse--;
541 return o; 568 return o;
542 } 569 }
543 570
544 checkListKeyRingsResponse(api.ListKeyRingsResponse o) { 571 checkListKeyRingsResponse(api.ListKeyRingsResponse o) {
545 buildCounterListKeyRingsResponse++; 572 buildCounterListKeyRingsResponse++;
546 if (buildCounterListKeyRingsResponse < 3) { 573 if (buildCounterListKeyRingsResponse < 3) {
547 checkUnnamed1308(o.keyRings); 574 checkUnnamed1315(o.keyRings);
548 unittest.expect(o.nextPageToken, unittest.equals('foo')); 575 unittest.expect(o.nextPageToken, unittest.equals('foo'));
549 unittest.expect(o.totalSize, unittest.equals(42)); 576 unittest.expect(o.totalSize, unittest.equals(42));
550 } 577 }
551 buildCounterListKeyRingsResponse--; 578 buildCounterListKeyRingsResponse--;
552 } 579 }
553 580
554 buildUnnamed1309() { 581 buildUnnamed1316() {
555 var o = new core.List<api.Location>(); 582 var o = new core.List<api.Location>();
556 o.add(buildLocation()); 583 o.add(buildLocation());
557 o.add(buildLocation()); 584 o.add(buildLocation());
558 return o; 585 return o;
559 } 586 }
560 587
561 checkUnnamed1309(core.List<api.Location> o) { 588 checkUnnamed1316(core.List<api.Location> o) {
562 unittest.expect(o, unittest.hasLength(2)); 589 unittest.expect(o, unittest.hasLength(2));
563 checkLocation(o[0]); 590 checkLocation(o[0]);
564 checkLocation(o[1]); 591 checkLocation(o[1]);
565 } 592 }
566 593
567 core.int buildCounterListLocationsResponse = 0; 594 core.int buildCounterListLocationsResponse = 0;
568 buildListLocationsResponse() { 595 buildListLocationsResponse() {
569 var o = new api.ListLocationsResponse(); 596 var o = new api.ListLocationsResponse();
570 buildCounterListLocationsResponse++; 597 buildCounterListLocationsResponse++;
571 if (buildCounterListLocationsResponse < 3) { 598 if (buildCounterListLocationsResponse < 3) {
572 o.locations = buildUnnamed1309(); 599 o.locations = buildUnnamed1316();
573 o.nextPageToken = "foo"; 600 o.nextPageToken = "foo";
574 } 601 }
575 buildCounterListLocationsResponse--; 602 buildCounterListLocationsResponse--;
576 return o; 603 return o;
577 } 604 }
578 605
579 checkListLocationsResponse(api.ListLocationsResponse o) { 606 checkListLocationsResponse(api.ListLocationsResponse o) {
580 buildCounterListLocationsResponse++; 607 buildCounterListLocationsResponse++;
581 if (buildCounterListLocationsResponse < 3) { 608 if (buildCounterListLocationsResponse < 3) {
582 checkUnnamed1309(o.locations); 609 checkUnnamed1316(o.locations);
583 unittest.expect(o.nextPageToken, unittest.equals('foo')); 610 unittest.expect(o.nextPageToken, unittest.equals('foo'));
584 } 611 }
585 buildCounterListLocationsResponse--; 612 buildCounterListLocationsResponse--;
586 } 613 }
587 614
588 buildUnnamed1310() { 615 buildUnnamed1317() {
589 var o = new core.Map<core.String, core.String>(); 616 var o = new core.Map<core.String, core.String>();
590 o["x"] = "foo"; 617 o["x"] = "foo";
591 o["y"] = "foo"; 618 o["y"] = "foo";
592 return o; 619 return o;
593 } 620 }
594 621
595 checkUnnamed1310(core.Map<core.String, core.String> o) { 622 checkUnnamed1317(core.Map<core.String, core.String> o) {
596 unittest.expect(o, unittest.hasLength(2)); 623 unittest.expect(o, unittest.hasLength(2));
597 unittest.expect(o["x"], unittest.equals('foo')); 624 unittest.expect(o["x"], unittest.equals('foo'));
598 unittest.expect(o["y"], unittest.equals('foo')); 625 unittest.expect(o["y"], unittest.equals('foo'));
599 } 626 }
600 627
601 buildUnnamed1311() { 628 buildUnnamed1318() {
602 var o = new core.Map<core.String, core.Object>(); 629 var o = new core.Map<core.String, core.Object>();
603 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 630 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
604 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 631 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
605 return o; 632 return o;
606 } 633 }
607 634
608 checkUnnamed1311(core.Map<core.String, core.Object> o) { 635 checkUnnamed1318(core.Map<core.String, core.Object> o) {
609 unittest.expect(o, unittest.hasLength(2)); 636 unittest.expect(o, unittest.hasLength(2));
610 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'));
611 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'));
612 } 639 }
613 640
614 core.int buildCounterLocation = 0; 641 core.int buildCounterLocation = 0;
615 buildLocation() { 642 buildLocation() {
616 var o = new api.Location(); 643 var o = new api.Location();
617 buildCounterLocation++; 644 buildCounterLocation++;
618 if (buildCounterLocation < 3) { 645 if (buildCounterLocation < 3) {
619 o.labels = buildUnnamed1310(); 646 o.labels = buildUnnamed1317();
620 o.locationId = "foo"; 647 o.locationId = "foo";
621 o.metadata = buildUnnamed1311(); 648 o.metadata = buildUnnamed1318();
622 o.name = "foo"; 649 o.name = "foo";
623 } 650 }
624 buildCounterLocation--; 651 buildCounterLocation--;
625 return o; 652 return o;
626 } 653 }
627 654
628 checkLocation(api.Location o) { 655 checkLocation(api.Location o) {
629 buildCounterLocation++; 656 buildCounterLocation++;
630 if (buildCounterLocation < 3) { 657 if (buildCounterLocation < 3) {
631 checkUnnamed1310(o.labels); 658 checkUnnamed1317(o.labels);
632 unittest.expect(o.locationId, unittest.equals('foo')); 659 unittest.expect(o.locationId, unittest.equals('foo'));
633 checkUnnamed1311(o.metadata); 660 checkUnnamed1318(o.metadata);
634 unittest.expect(o.name, unittest.equals('foo')); 661 unittest.expect(o.name, unittest.equals('foo'));
635 } 662 }
636 buildCounterLocation--; 663 buildCounterLocation--;
637 } 664 }
638 665
639 core.int buildCounterLogConfig = 0; 666 core.int buildCounterLogConfig = 0;
640 buildLogConfig() { 667 buildLogConfig() {
641 var o = new api.LogConfig(); 668 var o = new api.LogConfig();
642 buildCounterLogConfig++; 669 buildCounterLogConfig++;
643 if (buildCounterLogConfig < 3) { 670 if (buildCounterLogConfig < 3) {
644 o.cloudAudit = buildCloudAuditOptions(); 671 o.cloudAudit = buildCloudAuditOptions();
645 o.counter = buildCounterOptions(); 672 o.counter = buildCounterOptions();
646 o.dataAccess = buildDataAccessOptions(); 673 o.dataAccess = buildDataAccessOptions();
647 } 674 }
648 buildCounterLogConfig--; 675 buildCounterLogConfig--;
649 return o; 676 return o;
650 } 677 }
651 678
652 checkLogConfig(api.LogConfig o) { 679 checkLogConfig(api.LogConfig o) {
653 buildCounterLogConfig++; 680 buildCounterLogConfig++;
654 if (buildCounterLogConfig < 3) { 681 if (buildCounterLogConfig < 3) {
655 checkCloudAuditOptions(o.cloudAudit); 682 checkCloudAuditOptions(o.cloudAudit);
656 checkCounterOptions(o.counter); 683 checkCounterOptions(o.counter);
657 checkDataAccessOptions(o.dataAccess); 684 checkDataAccessOptions(o.dataAccess);
658 } 685 }
659 buildCounterLogConfig--; 686 buildCounterLogConfig--;
660 } 687 }
661 688
662 buildUnnamed1312() { 689 buildUnnamed1319() {
663 var o = new core.List<api.AuditConfig>(); 690 var o = new core.List<api.AuditConfig>();
664 o.add(buildAuditConfig()); 691 o.add(buildAuditConfig());
665 o.add(buildAuditConfig()); 692 o.add(buildAuditConfig());
666 return o; 693 return o;
667 } 694 }
668 695
669 checkUnnamed1312(core.List<api.AuditConfig> o) { 696 checkUnnamed1319(core.List<api.AuditConfig> o) {
670 unittest.expect(o, unittest.hasLength(2)); 697 unittest.expect(o, unittest.hasLength(2));
671 checkAuditConfig(o[0]); 698 checkAuditConfig(o[0]);
672 checkAuditConfig(o[1]); 699 checkAuditConfig(o[1]);
673 } 700 }
674 701
675 buildUnnamed1313() { 702 buildUnnamed1320() {
676 var o = new core.List<api.Binding>(); 703 var o = new core.List<api.Binding>();
677 o.add(buildBinding()); 704 o.add(buildBinding());
678 o.add(buildBinding()); 705 o.add(buildBinding());
679 return o; 706 return o;
680 } 707 }
681 708
682 checkUnnamed1313(core.List<api.Binding> o) { 709 checkUnnamed1320(core.List<api.Binding> o) {
683 unittest.expect(o, unittest.hasLength(2)); 710 unittest.expect(o, unittest.hasLength(2));
684 checkBinding(o[0]); 711 checkBinding(o[0]);
685 checkBinding(o[1]); 712 checkBinding(o[1]);
686 } 713 }
687 714
688 buildUnnamed1314() { 715 buildUnnamed1321() {
689 var o = new core.List<api.Rule>(); 716 var o = new core.List<api.Rule>();
690 o.add(buildRule()); 717 o.add(buildRule());
691 o.add(buildRule()); 718 o.add(buildRule());
692 return o; 719 return o;
693 } 720 }
694 721
695 checkUnnamed1314(core.List<api.Rule> o) { 722 checkUnnamed1321(core.List<api.Rule> o) {
696 unittest.expect(o, unittest.hasLength(2)); 723 unittest.expect(o, unittest.hasLength(2));
697 checkRule(o[0]); 724 checkRule(o[0]);
698 checkRule(o[1]); 725 checkRule(o[1]);
699 } 726 }
700 727
701 core.int buildCounterPolicy = 0; 728 core.int buildCounterPolicy = 0;
702 buildPolicy() { 729 buildPolicy() {
703 var o = new api.Policy(); 730 var o = new api.Policy();
704 buildCounterPolicy++; 731 buildCounterPolicy++;
705 if (buildCounterPolicy < 3) { 732 if (buildCounterPolicy < 3) {
706 o.auditConfigs = buildUnnamed1312(); 733 o.auditConfigs = buildUnnamed1319();
707 o.bindings = buildUnnamed1313(); 734 o.bindings = buildUnnamed1320();
708 o.etag = "foo"; 735 o.etag = "foo";
709 o.iamOwned = true; 736 o.iamOwned = true;
710 o.rules = buildUnnamed1314(); 737 o.rules = buildUnnamed1321();
711 o.version = 42; 738 o.version = 42;
712 } 739 }
713 buildCounterPolicy--; 740 buildCounterPolicy--;
714 return o; 741 return o;
715 } 742 }
716 743
717 checkPolicy(api.Policy o) { 744 checkPolicy(api.Policy o) {
718 buildCounterPolicy++; 745 buildCounterPolicy++;
719 if (buildCounterPolicy < 3) { 746 if (buildCounterPolicy < 3) {
720 checkUnnamed1312(o.auditConfigs); 747 checkUnnamed1319(o.auditConfigs);
721 checkUnnamed1313(o.bindings); 748 checkUnnamed1320(o.bindings);
722 unittest.expect(o.etag, unittest.equals('foo')); 749 unittest.expect(o.etag, unittest.equals('foo'));
723 unittest.expect(o.iamOwned, unittest.isTrue); 750 unittest.expect(o.iamOwned, unittest.isTrue);
724 checkUnnamed1314(o.rules); 751 checkUnnamed1321(o.rules);
725 unittest.expect(o.version, unittest.equals(42)); 752 unittest.expect(o.version, unittest.equals(42));
726 } 753 }
727 buildCounterPolicy--; 754 buildCounterPolicy--;
728 } 755 }
729 756
730 core.int buildCounterRestoreCryptoKeyVersionRequest = 0; 757 core.int buildCounterRestoreCryptoKeyVersionRequest = 0;
731 buildRestoreCryptoKeyVersionRequest() { 758 buildRestoreCryptoKeyVersionRequest() {
732 var o = new api.RestoreCryptoKeyVersionRequest(); 759 var o = new api.RestoreCryptoKeyVersionRequest();
733 buildCounterRestoreCryptoKeyVersionRequest++; 760 buildCounterRestoreCryptoKeyVersionRequest++;
734 if (buildCounterRestoreCryptoKeyVersionRequest < 3) { 761 if (buildCounterRestoreCryptoKeyVersionRequest < 3) {
735 } 762 }
736 buildCounterRestoreCryptoKeyVersionRequest--; 763 buildCounterRestoreCryptoKeyVersionRequest--;
737 return o; 764 return o;
738 } 765 }
739 766
740 checkRestoreCryptoKeyVersionRequest(api.RestoreCryptoKeyVersionRequest o) { 767 checkRestoreCryptoKeyVersionRequest(api.RestoreCryptoKeyVersionRequest o) {
741 buildCounterRestoreCryptoKeyVersionRequest++; 768 buildCounterRestoreCryptoKeyVersionRequest++;
742 if (buildCounterRestoreCryptoKeyVersionRequest < 3) { 769 if (buildCounterRestoreCryptoKeyVersionRequest < 3) {
743 } 770 }
744 buildCounterRestoreCryptoKeyVersionRequest--; 771 buildCounterRestoreCryptoKeyVersionRequest--;
745 } 772 }
746 773
747 buildUnnamed1315() { 774 buildUnnamed1322() {
748 var o = new core.List<api.Condition>(); 775 var o = new core.List<api.Condition>();
749 o.add(buildCondition()); 776 o.add(buildCondition());
750 o.add(buildCondition()); 777 o.add(buildCondition());
751 return o; 778 return o;
752 } 779 }
753 780
754 checkUnnamed1315(core.List<api.Condition> o) { 781 checkUnnamed1322(core.List<api.Condition> o) {
755 unittest.expect(o, unittest.hasLength(2)); 782 unittest.expect(o, unittest.hasLength(2));
756 checkCondition(o[0]); 783 checkCondition(o[0]);
757 checkCondition(o[1]); 784 checkCondition(o[1]);
758 } 785 }
759 786
760 buildUnnamed1316() { 787 buildUnnamed1323() {
761 var o = new core.List<core.String>(); 788 var o = new core.List<core.String>();
762 o.add("foo"); 789 o.add("foo");
763 o.add("foo"); 790 o.add("foo");
764 return o; 791 return o;
765 } 792 }
766 793
767 checkUnnamed1316(core.List<core.String> o) { 794 checkUnnamed1323(core.List<core.String> o) {
768 unittest.expect(o, unittest.hasLength(2)); 795 unittest.expect(o, unittest.hasLength(2));
769 unittest.expect(o[0], unittest.equals('foo')); 796 unittest.expect(o[0], unittest.equals('foo'));
770 unittest.expect(o[1], unittest.equals('foo')); 797 unittest.expect(o[1], unittest.equals('foo'));
771 } 798 }
772 799
773 buildUnnamed1317() { 800 buildUnnamed1324() {
774 var o = new core.List<api.LogConfig>(); 801 var o = new core.List<api.LogConfig>();
775 o.add(buildLogConfig()); 802 o.add(buildLogConfig());
776 o.add(buildLogConfig()); 803 o.add(buildLogConfig());
777 return o; 804 return o;
778 } 805 }
779 806
780 checkUnnamed1317(core.List<api.LogConfig> o) { 807 checkUnnamed1324(core.List<api.LogConfig> o) {
781 unittest.expect(o, unittest.hasLength(2)); 808 unittest.expect(o, unittest.hasLength(2));
782 checkLogConfig(o[0]); 809 checkLogConfig(o[0]);
783 checkLogConfig(o[1]); 810 checkLogConfig(o[1]);
784 } 811 }
785 812
786 buildUnnamed1318() { 813 buildUnnamed1325() {
787 var o = new core.List<core.String>(); 814 var o = new core.List<core.String>();
788 o.add("foo"); 815 o.add("foo");
789 o.add("foo"); 816 o.add("foo");
790 return o; 817 return o;
791 } 818 }
792 819
793 checkUnnamed1318(core.List<core.String> o) { 820 checkUnnamed1325(core.List<core.String> o) {
794 unittest.expect(o, unittest.hasLength(2)); 821 unittest.expect(o, unittest.hasLength(2));
795 unittest.expect(o[0], unittest.equals('foo')); 822 unittest.expect(o[0], unittest.equals('foo'));
796 unittest.expect(o[1], unittest.equals('foo')); 823 unittest.expect(o[1], unittest.equals('foo'));
797 } 824 }
798 825
799 buildUnnamed1319() { 826 buildUnnamed1326() {
800 var o = new core.List<core.String>(); 827 var o = new core.List<core.String>();
801 o.add("foo"); 828 o.add("foo");
802 o.add("foo"); 829 o.add("foo");
803 return o; 830 return o;
804 } 831 }
805 832
806 checkUnnamed1319(core.List<core.String> o) { 833 checkUnnamed1326(core.List<core.String> o) {
807 unittest.expect(o, unittest.hasLength(2)); 834 unittest.expect(o, unittest.hasLength(2));
808 unittest.expect(o[0], unittest.equals('foo')); 835 unittest.expect(o[0], unittest.equals('foo'));
809 unittest.expect(o[1], unittest.equals('foo')); 836 unittest.expect(o[1], unittest.equals('foo'));
810 } 837 }
811 838
812 core.int buildCounterRule = 0; 839 core.int buildCounterRule = 0;
813 buildRule() { 840 buildRule() {
814 var o = new api.Rule(); 841 var o = new api.Rule();
815 buildCounterRule++; 842 buildCounterRule++;
816 if (buildCounterRule < 3) { 843 if (buildCounterRule < 3) {
817 o.action = "foo"; 844 o.action = "foo";
818 o.conditions = buildUnnamed1315(); 845 o.conditions = buildUnnamed1322();
819 o.description = "foo"; 846 o.description = "foo";
820 o.in_ = buildUnnamed1316(); 847 o.in_ = buildUnnamed1323();
821 o.logConfig = buildUnnamed1317(); 848 o.logConfig = buildUnnamed1324();
822 o.notIn = buildUnnamed1318(); 849 o.notIn = buildUnnamed1325();
823 o.permissions = buildUnnamed1319(); 850 o.permissions = buildUnnamed1326();
824 } 851 }
825 buildCounterRule--; 852 buildCounterRule--;
826 return o; 853 return o;
827 } 854 }
828 855
829 checkRule(api.Rule o) { 856 checkRule(api.Rule o) {
830 buildCounterRule++; 857 buildCounterRule++;
831 if (buildCounterRule < 3) { 858 if (buildCounterRule < 3) {
832 unittest.expect(o.action, unittest.equals('foo')); 859 unittest.expect(o.action, unittest.equals('foo'));
833 checkUnnamed1315(o.conditions); 860 checkUnnamed1322(o.conditions);
834 unittest.expect(o.description, unittest.equals('foo')); 861 unittest.expect(o.description, unittest.equals('foo'));
835 checkUnnamed1316(o.in_); 862 checkUnnamed1323(o.in_);
836 checkUnnamed1317(o.logConfig); 863 checkUnnamed1324(o.logConfig);
837 checkUnnamed1318(o.notIn); 864 checkUnnamed1325(o.notIn);
838 checkUnnamed1319(o.permissions); 865 checkUnnamed1326(o.permissions);
839 } 866 }
840 buildCounterRule--; 867 buildCounterRule--;
841 } 868 }
842 869
843 core.int buildCounterSetIamPolicyRequest = 0; 870 core.int buildCounterSetIamPolicyRequest = 0;
844 buildSetIamPolicyRequest() { 871 buildSetIamPolicyRequest() {
845 var o = new api.SetIamPolicyRequest(); 872 var o = new api.SetIamPolicyRequest();
846 buildCounterSetIamPolicyRequest++; 873 buildCounterSetIamPolicyRequest++;
847 if (buildCounterSetIamPolicyRequest < 3) { 874 if (buildCounterSetIamPolicyRequest < 3) {
848 o.policy = buildPolicy(); 875 o.policy = buildPolicy();
849 o.updateMask = "foo"; 876 o.updateMask = "foo";
850 } 877 }
851 buildCounterSetIamPolicyRequest--; 878 buildCounterSetIamPolicyRequest--;
852 return o; 879 return o;
853 } 880 }
854 881
855 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) { 882 checkSetIamPolicyRequest(api.SetIamPolicyRequest o) {
856 buildCounterSetIamPolicyRequest++; 883 buildCounterSetIamPolicyRequest++;
857 if (buildCounterSetIamPolicyRequest < 3) { 884 if (buildCounterSetIamPolicyRequest < 3) {
858 checkPolicy(o.policy); 885 checkPolicy(o.policy);
859 unittest.expect(o.updateMask, unittest.equals('foo')); 886 unittest.expect(o.updateMask, unittest.equals('foo'));
860 } 887 }
861 buildCounterSetIamPolicyRequest--; 888 buildCounterSetIamPolicyRequest--;
862 } 889 }
863 890
864 buildUnnamed1320() { 891 buildUnnamed1327() {
865 var o = new core.List<core.String>(); 892 var o = new core.List<core.String>();
866 o.add("foo"); 893 o.add("foo");
867 o.add("foo"); 894 o.add("foo");
868 return o; 895 return o;
869 } 896 }
870 897
871 checkUnnamed1320(core.List<core.String> o) { 898 checkUnnamed1327(core.List<core.String> o) {
872 unittest.expect(o, unittest.hasLength(2)); 899 unittest.expect(o, unittest.hasLength(2));
873 unittest.expect(o[0], unittest.equals('foo')); 900 unittest.expect(o[0], unittest.equals('foo'));
874 unittest.expect(o[1], unittest.equals('foo')); 901 unittest.expect(o[1], unittest.equals('foo'));
875 } 902 }
876 903
877 core.int buildCounterTestIamPermissionsRequest = 0; 904 core.int buildCounterTestIamPermissionsRequest = 0;
878 buildTestIamPermissionsRequest() { 905 buildTestIamPermissionsRequest() {
879 var o = new api.TestIamPermissionsRequest(); 906 var o = new api.TestIamPermissionsRequest();
880 buildCounterTestIamPermissionsRequest++; 907 buildCounterTestIamPermissionsRequest++;
881 if (buildCounterTestIamPermissionsRequest < 3) { 908 if (buildCounterTestIamPermissionsRequest < 3) {
882 o.permissions = buildUnnamed1320(); 909 o.permissions = buildUnnamed1327();
883 } 910 }
884 buildCounterTestIamPermissionsRequest--; 911 buildCounterTestIamPermissionsRequest--;
885 return o; 912 return o;
886 } 913 }
887 914
888 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { 915 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) {
889 buildCounterTestIamPermissionsRequest++; 916 buildCounterTestIamPermissionsRequest++;
890 if (buildCounterTestIamPermissionsRequest < 3) { 917 if (buildCounterTestIamPermissionsRequest < 3) {
891 checkUnnamed1320(o.permissions); 918 checkUnnamed1327(o.permissions);
892 } 919 }
893 buildCounterTestIamPermissionsRequest--; 920 buildCounterTestIamPermissionsRequest--;
894 } 921 }
895 922
896 buildUnnamed1321() { 923 buildUnnamed1328() {
897 var o = new core.List<core.String>(); 924 var o = new core.List<core.String>();
898 o.add("foo"); 925 o.add("foo");
899 o.add("foo"); 926 o.add("foo");
900 return o; 927 return o;
901 } 928 }
902 929
903 checkUnnamed1321(core.List<core.String> o) { 930 checkUnnamed1328(core.List<core.String> o) {
904 unittest.expect(o, unittest.hasLength(2)); 931 unittest.expect(o, unittest.hasLength(2));
905 unittest.expect(o[0], unittest.equals('foo')); 932 unittest.expect(o[0], unittest.equals('foo'));
906 unittest.expect(o[1], unittest.equals('foo')); 933 unittest.expect(o[1], unittest.equals('foo'));
907 } 934 }
908 935
909 core.int buildCounterTestIamPermissionsResponse = 0; 936 core.int buildCounterTestIamPermissionsResponse = 0;
910 buildTestIamPermissionsResponse() { 937 buildTestIamPermissionsResponse() {
911 var o = new api.TestIamPermissionsResponse(); 938 var o = new api.TestIamPermissionsResponse();
912 buildCounterTestIamPermissionsResponse++; 939 buildCounterTestIamPermissionsResponse++;
913 if (buildCounterTestIamPermissionsResponse < 3) { 940 if (buildCounterTestIamPermissionsResponse < 3) {
914 o.permissions = buildUnnamed1321(); 941 o.permissions = buildUnnamed1328();
915 } 942 }
916 buildCounterTestIamPermissionsResponse--; 943 buildCounterTestIamPermissionsResponse--;
917 return o; 944 return o;
918 } 945 }
919 946
920 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { 947 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) {
921 buildCounterTestIamPermissionsResponse++; 948 buildCounterTestIamPermissionsResponse++;
922 if (buildCounterTestIamPermissionsResponse < 3) { 949 if (buildCounterTestIamPermissionsResponse < 3) {
923 checkUnnamed1321(o.permissions); 950 checkUnnamed1328(o.permissions);
924 } 951 }
925 buildCounterTestIamPermissionsResponse--; 952 buildCounterTestIamPermissionsResponse--;
926 } 953 }
927 954
928 core.int buildCounterUpdateCryptoKeyPrimaryVersionRequest = 0; 955 core.int buildCounterUpdateCryptoKeyPrimaryVersionRequest = 0;
929 buildUpdateCryptoKeyPrimaryVersionRequest() { 956 buildUpdateCryptoKeyPrimaryVersionRequest() {
930 var o = new api.UpdateCryptoKeyPrimaryVersionRequest(); 957 var o = new api.UpdateCryptoKeyPrimaryVersionRequest();
931 buildCounterUpdateCryptoKeyPrimaryVersionRequest++; 958 buildCounterUpdateCryptoKeyPrimaryVersionRequest++;
932 if (buildCounterUpdateCryptoKeyPrimaryVersionRequest < 3) { 959 if (buildCounterUpdateCryptoKeyPrimaryVersionRequest < 3) {
933 o.cryptoKeyVersionId = "foo"; 960 o.cryptoKeyVersionId = "foo";
(...skipping 131 matching lines...)
1065 1092
1066 unittest.group("obj-schema-EncryptResponse", () { 1093 unittest.group("obj-schema-EncryptResponse", () {
1067 unittest.test("to-json--from-json", () { 1094 unittest.test("to-json--from-json", () {
1068 var o = buildEncryptResponse(); 1095 var o = buildEncryptResponse();
1069 var od = new api.EncryptResponse.fromJson(o.toJson()); 1096 var od = new api.EncryptResponse.fromJson(o.toJson());
1070 checkEncryptResponse(od); 1097 checkEncryptResponse(od);
1071 }); 1098 });
1072 }); 1099 });
1073 1100
1074 1101
1102 unittest.group("obj-schema-Expr", () {
1103 unittest.test("to-json--from-json", () {
1104 var o = buildExpr();
1105 var od = new api.Expr.fromJson(o.toJson());
1106 checkExpr(od);
1107 });
1108 });
1109
1110
1075 unittest.group("obj-schema-KeyRing", () { 1111 unittest.group("obj-schema-KeyRing", () {
1076 unittest.test("to-json--from-json", () { 1112 unittest.test("to-json--from-json", () {
1077 var o = buildKeyRing(); 1113 var o = buildKeyRing();
1078 var od = new api.KeyRing.fromJson(o.toJson()); 1114 var od = new api.KeyRing.fromJson(o.toJson());
1079 checkKeyRing(od); 1115 checkKeyRing(od);
1080 }); 1116 });
1081 }); 1117 });
1082 1118
1083 1119
1084 unittest.group("obj-schema-ListCryptoKeyVersionsResponse", () { 1120 unittest.group("obj-schema-ListCryptoKeyVersionsResponse", () {
(...skipping 112 matching lines...)
1197 }); 1233 });
1198 }); 1234 });
1199 1235
1200 1236
1201 unittest.group("resource-ProjectsLocationsResourceApi", () { 1237 unittest.group("resource-ProjectsLocationsResourceApi", () {
1202 unittest.test("method--get", () { 1238 unittest.test("method--get", () {
1203 1239
1204 var mock = new HttpServerMock(); 1240 var mock = new HttpServerMock();
1205 api.ProjectsLocationsResourceApi res = new api.CloudkmsApi(mock).projects. locations; 1241 api.ProjectsLocationsResourceApi res = new api.CloudkmsApi(mock).projects. locations;
1206 var arg_name = "foo"; 1242 var arg_name = "foo";
1207 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1243 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1208 var path = (req.url).path; 1244 var path = (req.url).path;
1209 var pathOffset = 0; 1245 var pathOffset = 0;
1210 var index; 1246 var index;
1211 var subPart; 1247 var subPart;
1212 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1248 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1213 pathOffset += 1; 1249 pathOffset += 1;
1214 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1250 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1215 pathOffset += 3; 1251 pathOffset += 3;
1216 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1252 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1217 1253
(...skipping 14 matching lines...)
1232 } 1268 }
1233 } 1269 }
1234 1270
1235 1271
1236 var h = { 1272 var h = {
1237 "content-type" : "application/json; charset=utf-8", 1273 "content-type" : "application/json; charset=utf-8",
1238 }; 1274 };
1239 var resp = convert.JSON.encode(buildLocation()); 1275 var resp = convert.JSON.encode(buildLocation());
1240 return new async.Future.value(stringResponse(200, h, resp)); 1276 return new async.Future.value(stringResponse(200, h, resp));
1241 }), true); 1277 }), true);
1242 res.get(arg_name).then(unittest.expectAsync(((api.Location response) { 1278 res.get(arg_name).then(unittest.expectAsync1(((api.Location response) {
1243 checkLocation(response); 1279 checkLocation(response);
1244 }))); 1280 })));
1245 }); 1281 });
1246 1282
1247 unittest.test("method--list", () { 1283 unittest.test("method--list", () {
1248 1284
1249 var mock = new HttpServerMock(); 1285 var mock = new HttpServerMock();
1250 api.ProjectsLocationsResourceApi res = new api.CloudkmsApi(mock).projects. locations; 1286 api.ProjectsLocationsResourceApi res = new api.CloudkmsApi(mock).projects. locations;
1251 var arg_name = "foo"; 1287 var arg_name = "foo";
1252 var arg_pageToken = "foo";
1253 var arg_pageSize = 42; 1288 var arg_pageSize = 42;
1254 var arg_filter = "foo"; 1289 var arg_filter = "foo";
1255 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1290 var arg_pageToken = "foo";
1291 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1256 var path = (req.url).path; 1292 var path = (req.url).path;
1257 var pathOffset = 0; 1293 var pathOffset = 0;
1258 var index; 1294 var index;
1259 var subPart; 1295 var subPart;
1260 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1296 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1261 pathOffset += 1; 1297 pathOffset += 1;
1262 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1298 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1263 pathOffset += 3; 1299 pathOffset += 3;
1264 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1300 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1265 1301
1266 var query = (req.url).query; 1302 var query = (req.url).query;
1267 var queryOffset = 0; 1303 var queryOffset = 0;
1268 var queryMap = {}; 1304 var queryMap = {};
1269 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1305 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1270 parseBool(n) { 1306 parseBool(n) {
1271 if (n == "true") return true; 1307 if (n == "true") return true;
1272 if (n == "false") return false; 1308 if (n == "false") return false;
1273 if (n == null) return null; 1309 if (n == null) return null;
1274 throw new core.ArgumentError("Invalid boolean: $n"); 1310 throw new core.ArgumentError("Invalid boolean: $n");
1275 } 1311 }
1276 if (query.length > 0) { 1312 if (query.length > 0) {
1277 for (var part in query.split("&")) { 1313 for (var part in query.split("&")) {
1278 var keyvalue = part.split("="); 1314 var keyvalue = part.split("=");
1279 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1315 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1280 } 1316 }
1281 } 1317 }
1282 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1283 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1318 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1284 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); 1319 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
1320 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1285 1321
1286 1322
1287 var h = { 1323 var h = {
1288 "content-type" : "application/json; charset=utf-8", 1324 "content-type" : "application/json; charset=utf-8",
1289 }; 1325 };
1290 var resp = convert.JSON.encode(buildListLocationsResponse()); 1326 var resp = convert.JSON.encode(buildListLocationsResponse());
1291 return new async.Future.value(stringResponse(200, h, resp)); 1327 return new async.Future.value(stringResponse(200, h, resp));
1292 }), true); 1328 }), true);
1293 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize, filte r: arg_filter).then(unittest.expectAsync(((api.ListLocationsResponse response) { 1329 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.ListLocationsResponse response) {
1294 checkListLocationsResponse(response); 1330 checkListLocationsResponse(response);
1295 }))); 1331 })));
1296 }); 1332 });
1297 1333
1298 }); 1334 });
1299 1335
1300 1336
1301 unittest.group("resource-ProjectsLocationsKeyRingsResourceApi", () { 1337 unittest.group("resource-ProjectsLocationsKeyRingsResourceApi", () {
1302 unittest.test("method--create", () { 1338 unittest.test("method--create", () {
1303 1339
1304 var mock = new HttpServerMock(); 1340 var mock = new HttpServerMock();
1305 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings; 1341 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings;
1306 var arg_request = buildKeyRing(); 1342 var arg_request = buildKeyRing();
1307 var arg_parent = "foo"; 1343 var arg_parent = "foo";
1308 var arg_keyRingId = "foo"; 1344 var arg_keyRingId = "foo";
1309 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1345 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1310 var obj = new api.KeyRing.fromJson(json); 1346 var obj = new api.KeyRing.fromJson(json);
1311 checkKeyRing(obj); 1347 checkKeyRing(obj);
1312 1348
1313 var path = (req.url).path; 1349 var path = (req.url).path;
1314 var pathOffset = 0; 1350 var pathOffset = 0;
1315 var index; 1351 var index;
1316 var subPart; 1352 var subPart;
1317 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1353 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1318 pathOffset += 1; 1354 pathOffset += 1;
1319 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1355 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 18 matching lines...)
1338 } 1374 }
1339 unittest.expect(queryMap["keyRingId"].first, unittest.equals(arg_keyRing Id)); 1375 unittest.expect(queryMap["keyRingId"].first, unittest.equals(arg_keyRing Id));
1340 1376
1341 1377
1342 var h = { 1378 var h = {
1343 "content-type" : "application/json; charset=utf-8", 1379 "content-type" : "application/json; charset=utf-8",
1344 }; 1380 };
1345 var resp = convert.JSON.encode(buildKeyRing()); 1381 var resp = convert.JSON.encode(buildKeyRing());
1346 return new async.Future.value(stringResponse(200, h, resp)); 1382 return new async.Future.value(stringResponse(200, h, resp));
1347 }), true); 1383 }), true);
1348 res.create(arg_request, arg_parent, keyRingId: arg_keyRingId).then(unittes t.expectAsync(((api.KeyRing response) { 1384 res.create(arg_request, arg_parent, keyRingId: arg_keyRingId).then(unittes t.expectAsync1(((api.KeyRing response) {
1349 checkKeyRing(response); 1385 checkKeyRing(response);
1350 }))); 1386 })));
1351 }); 1387 });
1352 1388
1353 unittest.test("method--get", () { 1389 unittest.test("method--get", () {
1354 1390
1355 var mock = new HttpServerMock(); 1391 var mock = new HttpServerMock();
1356 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings; 1392 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings;
1357 var arg_name = "foo"; 1393 var arg_name = "foo";
1358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1394 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1359 var path = (req.url).path; 1395 var path = (req.url).path;
1360 var pathOffset = 0; 1396 var pathOffset = 0;
1361 var index; 1397 var index;
1362 var subPart; 1398 var subPart;
1363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1399 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1364 pathOffset += 1; 1400 pathOffset += 1;
1365 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1401 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1366 pathOffset += 3; 1402 pathOffset += 3;
1367 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1403 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1368 1404
(...skipping 14 matching lines...)
1383 } 1419 }
1384 } 1420 }
1385 1421
1386 1422
1387 var h = { 1423 var h = {
1388 "content-type" : "application/json; charset=utf-8", 1424 "content-type" : "application/json; charset=utf-8",
1389 }; 1425 };
1390 var resp = convert.JSON.encode(buildKeyRing()); 1426 var resp = convert.JSON.encode(buildKeyRing());
1391 return new async.Future.value(stringResponse(200, h, resp)); 1427 return new async.Future.value(stringResponse(200, h, resp));
1392 }), true); 1428 }), true);
1393 res.get(arg_name).then(unittest.expectAsync(((api.KeyRing response) { 1429 res.get(arg_name).then(unittest.expectAsync1(((api.KeyRing response) {
1394 checkKeyRing(response); 1430 checkKeyRing(response);
1395 }))); 1431 })));
1396 }); 1432 });
1397 1433
1398 unittest.test("method--getIamPolicy", () { 1434 unittest.test("method--getIamPolicy", () {
1399 1435
1400 var mock = new HttpServerMock(); 1436 var mock = new HttpServerMock();
1401 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings; 1437 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings;
1402 var arg_resource = "foo"; 1438 var arg_resource = "foo";
1403 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1439 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1404 var path = (req.url).path; 1440 var path = (req.url).path;
1405 var pathOffset = 0; 1441 var pathOffset = 0;
1406 var index; 1442 var index;
1407 var subPart; 1443 var subPart;
1408 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1444 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1409 pathOffset += 1; 1445 pathOffset += 1;
1410 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1446 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1411 pathOffset += 3; 1447 pathOffset += 3;
1412 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1448 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1413 1449
(...skipping 14 matching lines...)
1428 } 1464 }
1429 } 1465 }
1430 1466
1431 1467
1432 var h = { 1468 var h = {
1433 "content-type" : "application/json; charset=utf-8", 1469 "content-type" : "application/json; charset=utf-8",
1434 }; 1470 };
1435 var resp = convert.JSON.encode(buildPolicy()); 1471 var resp = convert.JSON.encode(buildPolicy());
1436 return new async.Future.value(stringResponse(200, h, resp)); 1472 return new async.Future.value(stringResponse(200, h, resp));
1437 }), true); 1473 }), true);
1438 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp onse) { 1474 res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy res ponse) {
1439 checkPolicy(response); 1475 checkPolicy(response);
1440 }))); 1476 })));
1441 }); 1477 });
1442 1478
1443 unittest.test("method--list", () { 1479 unittest.test("method--list", () {
1444 1480
1445 var mock = new HttpServerMock(); 1481 var mock = new HttpServerMock();
1446 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings; 1482 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings;
1447 var arg_parent = "foo"; 1483 var arg_parent = "foo";
1448 var arg_pageToken = "foo"; 1484 var arg_pageToken = "foo";
1449 var arg_pageSize = 42; 1485 var arg_pageSize = 42;
1450 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1486 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1451 var path = (req.url).path; 1487 var path = (req.url).path;
1452 var pathOffset = 0; 1488 var pathOffset = 0;
1453 var index; 1489 var index;
1454 var subPart; 1490 var subPart;
1455 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1491 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1456 pathOffset += 1; 1492 pathOffset += 1;
1457 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1493 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1458 pathOffset += 3; 1494 pathOffset += 3;
1459 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1495 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1460 1496
(...skipping 16 matching lines...)
1477 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1513 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1478 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 1514 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1479 1515
1480 1516
1481 var h = { 1517 var h = {
1482 "content-type" : "application/json; charset=utf-8", 1518 "content-type" : "application/json; charset=utf-8",
1483 }; 1519 };
1484 var resp = convert.JSON.encode(buildListKeyRingsResponse()); 1520 var resp = convert.JSON.encode(buildListKeyRingsResponse());
1485 return new async.Future.value(stringResponse(200, h, resp)); 1521 return new async.Future.value(stringResponse(200, h, resp));
1486 }), true); 1522 }), true);
1487 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync(((api.ListKeyRingsResponse response) { 1523 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListKeyRingsResponse response) {
1488 checkListKeyRingsResponse(response); 1524 checkListKeyRingsResponse(response);
1489 }))); 1525 })));
1490 }); 1526 });
1491 1527
1492 unittest.test("method--setIamPolicy", () { 1528 unittest.test("method--setIamPolicy", () {
1493 1529
1494 var mock = new HttpServerMock(); 1530 var mock = new HttpServerMock();
1495 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings; 1531 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings;
1496 var arg_request = buildSetIamPolicyRequest(); 1532 var arg_request = buildSetIamPolicyRequest();
1497 var arg_resource = "foo"; 1533 var arg_resource = "foo";
1498 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1534 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1499 var obj = new api.SetIamPolicyRequest.fromJson(json); 1535 var obj = new api.SetIamPolicyRequest.fromJson(json);
1500 checkSetIamPolicyRequest(obj); 1536 checkSetIamPolicyRequest(obj);
1501 1537
1502 var path = (req.url).path; 1538 var path = (req.url).path;
1503 var pathOffset = 0; 1539 var pathOffset = 0;
1504 var index; 1540 var index;
1505 var subPart; 1541 var subPart;
1506 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1542 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1507 pathOffset += 1; 1543 pathOffset += 1;
1508 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1544 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
1526 } 1562 }
1527 } 1563 }
1528 1564
1529 1565
1530 var h = { 1566 var h = {
1531 "content-type" : "application/json; charset=utf-8", 1567 "content-type" : "application/json; charset=utf-8",
1532 }; 1568 };
1533 var resp = convert.JSON.encode(buildPolicy()); 1569 var resp = convert.JSON.encode(buildPolicy());
1534 return new async.Future.value(stringResponse(200, h, resp)); 1570 return new async.Future.value(stringResponse(200, h, resp));
1535 }), true); 1571 }), true);
1536 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) { 1572 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a pi.Policy response) {
1537 checkPolicy(response); 1573 checkPolicy(response);
1538 }))); 1574 })));
1539 }); 1575 });
1540 1576
1541 unittest.test("method--testIamPermissions", () { 1577 unittest.test("method--testIamPermissions", () {
1542 1578
1543 var mock = new HttpServerMock(); 1579 var mock = new HttpServerMock();
1544 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings; 1580 api.ProjectsLocationsKeyRingsResourceApi res = new api.CloudkmsApi(mock).p rojects.locations.keyRings;
1545 var arg_request = buildTestIamPermissionsRequest(); 1581 var arg_request = buildTestIamPermissionsRequest();
1546 var arg_resource = "foo"; 1582 var arg_resource = "foo";
1547 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1583 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1548 var obj = new api.TestIamPermissionsRequest.fromJson(json); 1584 var obj = new api.TestIamPermissionsRequest.fromJson(json);
1549 checkTestIamPermissionsRequest(obj); 1585 checkTestIamPermissionsRequest(obj);
1550 1586
1551 var path = (req.url).path; 1587 var path = (req.url).path;
1552 var pathOffset = 0; 1588 var pathOffset = 0;
1553 var index; 1589 var index;
1554 var subPart; 1590 var subPart;
1555 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1591 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1556 pathOffset += 1; 1592 pathOffset += 1;
1557 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1593 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
1575 } 1611 }
1576 } 1612 }
1577 1613
1578 1614
1579 var h = { 1615 var h = {
1580 "content-type" : "application/json; charset=utf-8", 1616 "content-type" : "application/json; charset=utf-8",
1581 }; 1617 };
1582 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); 1618 var resp = convert.JSON.encode(buildTestIamPermissionsResponse());
1583 return new async.Future.value(stringResponse(200, h, resp)); 1619 return new async.Future.value(stringResponse(200, h, resp));
1584 }), true); 1620 }), true);
1585 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn c(((api.TestIamPermissionsResponse response) { 1621 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn c1(((api.TestIamPermissionsResponse response) {
1586 checkTestIamPermissionsResponse(response); 1622 checkTestIamPermissionsResponse(response);
1587 }))); 1623 })));
1588 }); 1624 });
1589 1625
1590 }); 1626 });
1591 1627
1592 1628
1593 unittest.group("resource-ProjectsLocationsKeyRingsCryptoKeysResourceApi", () { 1629 unittest.group("resource-ProjectsLocationsKeyRingsCryptoKeysResourceApi", () {
1594 unittest.test("method--create", () { 1630 unittest.test("method--create", () {
1595 1631
1596 var mock = new HttpServerMock(); 1632 var mock = new HttpServerMock();
1597 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1633 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1598 var arg_request = buildCryptoKey(); 1634 var arg_request = buildCryptoKey();
1599 var arg_parent = "foo"; 1635 var arg_parent = "foo";
1600 var arg_cryptoKeyId = "foo"; 1636 var arg_cryptoKeyId = "foo";
1601 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1637 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1602 var obj = new api.CryptoKey.fromJson(json); 1638 var obj = new api.CryptoKey.fromJson(json);
1603 checkCryptoKey(obj); 1639 checkCryptoKey(obj);
1604 1640
1605 var path = (req.url).path; 1641 var path = (req.url).path;
1606 var pathOffset = 0; 1642 var pathOffset = 0;
1607 var index; 1643 var index;
1608 var subPart; 1644 var subPart;
1609 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1645 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1610 pathOffset += 1; 1646 pathOffset += 1;
1611 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1647 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 18 matching lines...)
1630 } 1666 }
1631 unittest.expect(queryMap["cryptoKeyId"].first, unittest.equals(arg_crypt oKeyId)); 1667 unittest.expect(queryMap["cryptoKeyId"].first, unittest.equals(arg_crypt oKeyId));
1632 1668
1633 1669
1634 var h = { 1670 var h = {
1635 "content-type" : "application/json; charset=utf-8", 1671 "content-type" : "application/json; charset=utf-8",
1636 }; 1672 };
1637 var resp = convert.JSON.encode(buildCryptoKey()); 1673 var resp = convert.JSON.encode(buildCryptoKey());
1638 return new async.Future.value(stringResponse(200, h, resp)); 1674 return new async.Future.value(stringResponse(200, h, resp));
1639 }), true); 1675 }), true);
1640 res.create(arg_request, arg_parent, cryptoKeyId: arg_cryptoKeyId).then(uni ttest.expectAsync(((api.CryptoKey response) { 1676 res.create(arg_request, arg_parent, cryptoKeyId: arg_cryptoKeyId).then(uni ttest.expectAsync1(((api.CryptoKey response) {
1641 checkCryptoKey(response); 1677 checkCryptoKey(response);
1642 }))); 1678 })));
1643 }); 1679 });
1644 1680
1645 unittest.test("method--decrypt", () { 1681 unittest.test("method--decrypt", () {
1646 1682
1647 var mock = new HttpServerMock(); 1683 var mock = new HttpServerMock();
1648 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1684 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1649 var arg_request = buildDecryptRequest(); 1685 var arg_request = buildDecryptRequest();
1650 var arg_name = "foo"; 1686 var arg_name = "foo";
1651 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1687 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1652 var obj = new api.DecryptRequest.fromJson(json); 1688 var obj = new api.DecryptRequest.fromJson(json);
1653 checkDecryptRequest(obj); 1689 checkDecryptRequest(obj);
1654 1690
1655 var path = (req.url).path; 1691 var path = (req.url).path;
1656 var pathOffset = 0; 1692 var pathOffset = 0;
1657 var index; 1693 var index;
1658 var subPart; 1694 var subPart;
1659 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1695 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1660 pathOffset += 1; 1696 pathOffset += 1;
1661 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1697 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
1679 } 1715 }
1680 } 1716 }
1681 1717
1682 1718
1683 var h = { 1719 var h = {
1684 "content-type" : "application/json; charset=utf-8", 1720 "content-type" : "application/json; charset=utf-8",
1685 }; 1721 };
1686 var resp = convert.JSON.encode(buildDecryptResponse()); 1722 var resp = convert.JSON.encode(buildDecryptResponse());
1687 return new async.Future.value(stringResponse(200, h, resp)); 1723 return new async.Future.value(stringResponse(200, h, resp));
1688 }), true); 1724 }), true);
1689 res.decrypt(arg_request, arg_name).then(unittest.expectAsync(((api.Decrypt Response response) { 1725 res.decrypt(arg_request, arg_name).then(unittest.expectAsync1(((api.Decryp tResponse response) {
1690 checkDecryptResponse(response); 1726 checkDecryptResponse(response);
1691 }))); 1727 })));
1692 }); 1728 });
1693 1729
1694 unittest.test("method--encrypt", () { 1730 unittest.test("method--encrypt", () {
1695 1731
1696 var mock = new HttpServerMock(); 1732 var mock = new HttpServerMock();
1697 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1733 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1698 var arg_request = buildEncryptRequest(); 1734 var arg_request = buildEncryptRequest();
1699 var arg_name = "foo"; 1735 var arg_name = "foo";
1700 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1736 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1701 var obj = new api.EncryptRequest.fromJson(json); 1737 var obj = new api.EncryptRequest.fromJson(json);
1702 checkEncryptRequest(obj); 1738 checkEncryptRequest(obj);
1703 1739
1704 var path = (req.url).path; 1740 var path = (req.url).path;
1705 var pathOffset = 0; 1741 var pathOffset = 0;
1706 var index; 1742 var index;
1707 var subPart; 1743 var subPart;
1708 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1744 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1709 pathOffset += 1; 1745 pathOffset += 1;
1710 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1746 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
1728 } 1764 }
1729 } 1765 }
1730 1766
1731 1767
1732 var h = { 1768 var h = {
1733 "content-type" : "application/json; charset=utf-8", 1769 "content-type" : "application/json; charset=utf-8",
1734 }; 1770 };
1735 var resp = convert.JSON.encode(buildEncryptResponse()); 1771 var resp = convert.JSON.encode(buildEncryptResponse());
1736 return new async.Future.value(stringResponse(200, h, resp)); 1772 return new async.Future.value(stringResponse(200, h, resp));
1737 }), true); 1773 }), true);
1738 res.encrypt(arg_request, arg_name).then(unittest.expectAsync(((api.Encrypt Response response) { 1774 res.encrypt(arg_request, arg_name).then(unittest.expectAsync1(((api.Encryp tResponse response) {
1739 checkEncryptResponse(response); 1775 checkEncryptResponse(response);
1740 }))); 1776 })));
1741 }); 1777 });
1742 1778
1743 unittest.test("method--get", () { 1779 unittest.test("method--get", () {
1744 1780
1745 var mock = new HttpServerMock(); 1781 var mock = new HttpServerMock();
1746 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1782 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1747 var arg_name = "foo"; 1783 var arg_name = "foo";
1748 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1784 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1749 var path = (req.url).path; 1785 var path = (req.url).path;
1750 var pathOffset = 0; 1786 var pathOffset = 0;
1751 var index; 1787 var index;
1752 var subPart; 1788 var subPart;
1753 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1789 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1754 pathOffset += 1; 1790 pathOffset += 1;
1755 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1791 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1756 pathOffset += 3; 1792 pathOffset += 3;
1757 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1793 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1758 1794
(...skipping 14 matching lines...)
1773 } 1809 }
1774 } 1810 }
1775 1811
1776 1812
1777 var h = { 1813 var h = {
1778 "content-type" : "application/json; charset=utf-8", 1814 "content-type" : "application/json; charset=utf-8",
1779 }; 1815 };
1780 var resp = convert.JSON.encode(buildCryptoKey()); 1816 var resp = convert.JSON.encode(buildCryptoKey());
1781 return new async.Future.value(stringResponse(200, h, resp)); 1817 return new async.Future.value(stringResponse(200, h, resp));
1782 }), true); 1818 }), true);
1783 res.get(arg_name).then(unittest.expectAsync(((api.CryptoKey response) { 1819 res.get(arg_name).then(unittest.expectAsync1(((api.CryptoKey response) {
1784 checkCryptoKey(response); 1820 checkCryptoKey(response);
1785 }))); 1821 })));
1786 }); 1822 });
1787 1823
1788 unittest.test("method--getIamPolicy", () { 1824 unittest.test("method--getIamPolicy", () {
1789 1825
1790 var mock = new HttpServerMock(); 1826 var mock = new HttpServerMock();
1791 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1827 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1792 var arg_resource = "foo"; 1828 var arg_resource = "foo";
1793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1829 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1794 var path = (req.url).path; 1830 var path = (req.url).path;
1795 var pathOffset = 0; 1831 var pathOffset = 0;
1796 var index; 1832 var index;
1797 var subPart; 1833 var subPart;
1798 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1834 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1799 pathOffset += 1; 1835 pathOffset += 1;
1800 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1836 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1801 pathOffset += 3; 1837 pathOffset += 3;
1802 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1838 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1803 1839
(...skipping 14 matching lines...)
1818 } 1854 }
1819 } 1855 }
1820 1856
1821 1857
1822 var h = { 1858 var h = {
1823 "content-type" : "application/json; charset=utf-8", 1859 "content-type" : "application/json; charset=utf-8",
1824 }; 1860 };
1825 var resp = convert.JSON.encode(buildPolicy()); 1861 var resp = convert.JSON.encode(buildPolicy());
1826 return new async.Future.value(stringResponse(200, h, resp)); 1862 return new async.Future.value(stringResponse(200, h, resp));
1827 }), true); 1863 }), true);
1828 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp onse) { 1864 res.getIamPolicy(arg_resource).then(unittest.expectAsync1(((api.Policy res ponse) {
1829 checkPolicy(response); 1865 checkPolicy(response);
1830 }))); 1866 })));
1831 }); 1867 });
1832 1868
1833 unittest.test("method--list", () { 1869 unittest.test("method--list", () {
1834 1870
1835 var mock = new HttpServerMock(); 1871 var mock = new HttpServerMock();
1836 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1872 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1837 var arg_parent = "foo"; 1873 var arg_parent = "foo";
1874 var arg_pageSize = 42;
1838 var arg_pageToken = "foo"; 1875 var arg_pageToken = "foo";
1839 var arg_pageSize = 42; 1876 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1840 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1841 var path = (req.url).path; 1877 var path = (req.url).path;
1842 var pathOffset = 0; 1878 var pathOffset = 0;
1843 var index; 1879 var index;
1844 var subPart; 1880 var subPart;
1845 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1881 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1846 pathOffset += 1; 1882 pathOffset += 1;
1847 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1883 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
1848 pathOffset += 3; 1884 pathOffset += 3;
1849 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1885 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1850 1886
1851 var query = (req.url).query; 1887 var query = (req.url).query;
1852 var queryOffset = 0; 1888 var queryOffset = 0;
1853 var queryMap = {}; 1889 var queryMap = {};
1854 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1890 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1855 parseBool(n) { 1891 parseBool(n) {
1856 if (n == "true") return true; 1892 if (n == "true") return true;
1857 if (n == "false") return false; 1893 if (n == "false") return false;
1858 if (n == null) return null; 1894 if (n == null) return null;
1859 throw new core.ArgumentError("Invalid boolean: $n"); 1895 throw new core.ArgumentError("Invalid boolean: $n");
1860 } 1896 }
1861 if (query.length > 0) { 1897 if (query.length > 0) {
1862 for (var part in query.split("&")) { 1898 for (var part in query.split("&")) {
1863 var keyvalue = part.split("="); 1899 var keyvalue = part.split("=");
1864 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1900 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1865 } 1901 }
1866 } 1902 }
1903 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1867 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 1904 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1868 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1869 1905
1870 1906
1871 var h = { 1907 var h = {
1872 "content-type" : "application/json; charset=utf-8", 1908 "content-type" : "application/json; charset=utf-8",
1873 }; 1909 };
1874 var resp = convert.JSON.encode(buildListCryptoKeysResponse()); 1910 var resp = convert.JSON.encode(buildListCryptoKeysResponse());
1875 return new async.Future.value(stringResponse(200, h, resp)); 1911 return new async.Future.value(stringResponse(200, h, resp));
1876 }), true); 1912 }), true);
1877 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync(((api.ListCryptoKeysResponse response) { 1913 res.list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken).the n(unittest.expectAsync1(((api.ListCryptoKeysResponse response) {
1878 checkListCryptoKeysResponse(response); 1914 checkListCryptoKeysResponse(response);
1879 }))); 1915 })));
1880 }); 1916 });
1881 1917
1882 unittest.test("method--patch", () { 1918 unittest.test("method--patch", () {
1883 1919
1884 var mock = new HttpServerMock(); 1920 var mock = new HttpServerMock();
1885 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1921 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1886 var arg_request = buildCryptoKey(); 1922 var arg_request = buildCryptoKey();
1887 var arg_name = "foo"; 1923 var arg_name = "foo";
1888 var arg_updateMask = "foo"; 1924 var arg_updateMask = "foo";
1889 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1925 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1890 var obj = new api.CryptoKey.fromJson(json); 1926 var obj = new api.CryptoKey.fromJson(json);
1891 checkCryptoKey(obj); 1927 checkCryptoKey(obj);
1892 1928
1893 var path = (req.url).path; 1929 var path = (req.url).path;
1894 var pathOffset = 0; 1930 var pathOffset = 0;
1895 var index; 1931 var index;
1896 var subPart; 1932 var subPart;
1897 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1933 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1898 pathOffset += 1; 1934 pathOffset += 1;
1899 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1935 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 18 matching lines...)
1918 } 1954 }
1919 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask)); 1955 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask));
1920 1956
1921 1957
1922 var h = { 1958 var h = {
1923 "content-type" : "application/json; charset=utf-8", 1959 "content-type" : "application/json; charset=utf-8",
1924 }; 1960 };
1925 var resp = convert.JSON.encode(buildCryptoKey()); 1961 var resp = convert.JSON.encode(buildCryptoKey());
1926 return new async.Future.value(stringResponse(200, h, resp)); 1962 return new async.Future.value(stringResponse(200, h, resp));
1927 }), true); 1963 }), true);
1928 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest .expectAsync(((api.CryptoKey response) { 1964 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest .expectAsync1(((api.CryptoKey response) {
1929 checkCryptoKey(response); 1965 checkCryptoKey(response);
1930 }))); 1966 })));
1931 }); 1967 });
1932 1968
1933 unittest.test("method--setIamPolicy", () { 1969 unittest.test("method--setIamPolicy", () {
1934 1970
1935 var mock = new HttpServerMock(); 1971 var mock = new HttpServerMock();
1936 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 1972 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1937 var arg_request = buildSetIamPolicyRequest(); 1973 var arg_request = buildSetIamPolicyRequest();
1938 var arg_resource = "foo"; 1974 var arg_resource = "foo";
1939 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1975 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1940 var obj = new api.SetIamPolicyRequest.fromJson(json); 1976 var obj = new api.SetIamPolicyRequest.fromJson(json);
1941 checkSetIamPolicyRequest(obj); 1977 checkSetIamPolicyRequest(obj);
1942 1978
1943 var path = (req.url).path; 1979 var path = (req.url).path;
1944 var pathOffset = 0; 1980 var pathOffset = 0;
1945 var index; 1981 var index;
1946 var subPart; 1982 var subPart;
1947 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1983 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1948 pathOffset += 1; 1984 pathOffset += 1;
1949 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 1985 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
1967 } 2003 }
1968 } 2004 }
1969 2005
1970 2006
1971 var h = { 2007 var h = {
1972 "content-type" : "application/json; charset=utf-8", 2008 "content-type" : "application/json; charset=utf-8",
1973 }; 2009 };
1974 var resp = convert.JSON.encode(buildPolicy()); 2010 var resp = convert.JSON.encode(buildPolicy());
1975 return new async.Future.value(stringResponse(200, h, resp)); 2011 return new async.Future.value(stringResponse(200, h, resp));
1976 }), true); 2012 }), true);
1977 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync(((ap i.Policy response) { 2013 res.setIamPolicy(arg_request, arg_resource).then(unittest.expectAsync1(((a pi.Policy response) {
1978 checkPolicy(response); 2014 checkPolicy(response);
1979 }))); 2015 })));
1980 }); 2016 });
1981 2017
1982 unittest.test("method--testIamPermissions", () { 2018 unittest.test("method--testIamPermissions", () {
1983 2019
1984 var mock = new HttpServerMock(); 2020 var mock = new HttpServerMock();
1985 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 2021 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
1986 var arg_request = buildTestIamPermissionsRequest(); 2022 var arg_request = buildTestIamPermissionsRequest();
1987 var arg_resource = "foo"; 2023 var arg_resource = "foo";
1988 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2024 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1989 var obj = new api.TestIamPermissionsRequest.fromJson(json); 2025 var obj = new api.TestIamPermissionsRequest.fromJson(json);
1990 checkTestIamPermissionsRequest(obj); 2026 checkTestIamPermissionsRequest(obj);
1991 2027
1992 var path = (req.url).path; 2028 var path = (req.url).path;
1993 var pathOffset = 0; 2029 var pathOffset = 0;
1994 var index; 2030 var index;
1995 var subPart; 2031 var subPart;
1996 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2032 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1997 pathOffset += 1; 2033 pathOffset += 1;
1998 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2034 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
2016 } 2052 }
2017 } 2053 }
2018 2054
2019 2055
2020 var h = { 2056 var h = {
2021 "content-type" : "application/json; charset=utf-8", 2057 "content-type" : "application/json; charset=utf-8",
2022 }; 2058 };
2023 var resp = convert.JSON.encode(buildTestIamPermissionsResponse()); 2059 var resp = convert.JSON.encode(buildTestIamPermissionsResponse());
2024 return new async.Future.value(stringResponse(200, h, resp)); 2060 return new async.Future.value(stringResponse(200, h, resp));
2025 }), true); 2061 }), true);
2026 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn c(((api.TestIamPermissionsResponse response) { 2062 res.testIamPermissions(arg_request, arg_resource).then(unittest.expectAsyn c1(((api.TestIamPermissionsResponse response) {
2027 checkTestIamPermissionsResponse(response); 2063 checkTestIamPermissionsResponse(response);
2028 }))); 2064 })));
2029 }); 2065 });
2030 2066
2031 unittest.test("method--updatePrimaryVersion", () { 2067 unittest.test("method--updatePrimaryVersion", () {
2032 2068
2033 var mock = new HttpServerMock(); 2069 var mock = new HttpServerMock();
2034 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys; 2070 api.ProjectsLocationsKeyRingsCryptoKeysResourceApi res = new api.CloudkmsA pi(mock).projects.locations.keyRings.cryptoKeys;
2035 var arg_request = buildUpdateCryptoKeyPrimaryVersionRequest(); 2071 var arg_request = buildUpdateCryptoKeyPrimaryVersionRequest();
2036 var arg_name = "foo"; 2072 var arg_name = "foo";
2037 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2073 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2038 var obj = new api.UpdateCryptoKeyPrimaryVersionRequest.fromJson(json); 2074 var obj = new api.UpdateCryptoKeyPrimaryVersionRequest.fromJson(json);
2039 checkUpdateCryptoKeyPrimaryVersionRequest(obj); 2075 checkUpdateCryptoKeyPrimaryVersionRequest(obj);
2040 2076
2041 var path = (req.url).path; 2077 var path = (req.url).path;
2042 var pathOffset = 0; 2078 var pathOffset = 0;
2043 var index; 2079 var index;
2044 var subPart; 2080 var subPart;
2045 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2081 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2046 pathOffset += 1; 2082 pathOffset += 1;
2047 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2083 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
2065 } 2101 }
2066 } 2102 }
2067 2103
2068 2104
2069 var h = { 2105 var h = {
2070 "content-type" : "application/json; charset=utf-8", 2106 "content-type" : "application/json; charset=utf-8",
2071 }; 2107 };
2072 var resp = convert.JSON.encode(buildCryptoKey()); 2108 var resp = convert.JSON.encode(buildCryptoKey());
2073 return new async.Future.value(stringResponse(200, h, resp)); 2109 return new async.Future.value(stringResponse(200, h, resp));
2074 }), true); 2110 }), true);
2075 res.updatePrimaryVersion(arg_request, arg_name).then(unittest.expectAsync( ((api.CryptoKey response) { 2111 res.updatePrimaryVersion(arg_request, arg_name).then(unittest.expectAsync1 (((api.CryptoKey response) {
2076 checkCryptoKey(response); 2112 checkCryptoKey(response);
2077 }))); 2113 })));
2078 }); 2114 });
2079 2115
2080 }); 2116 });
2081 2117
2082 2118
2083 unittest.group("resource-ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsR esourceApi", () { 2119 unittest.group("resource-ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsR esourceApi", () {
2084 unittest.test("method--create", () { 2120 unittest.test("method--create", () {
2085 2121
2086 var mock = new HttpServerMock(); 2122 var mock = new HttpServerMock();
2087 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns; 2123 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns;
2088 var arg_request = buildCryptoKeyVersion(); 2124 var arg_request = buildCryptoKeyVersion();
2089 var arg_parent = "foo"; 2125 var arg_parent = "foo";
2090 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2126 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2091 var obj = new api.CryptoKeyVersion.fromJson(json); 2127 var obj = new api.CryptoKeyVersion.fromJson(json);
2092 checkCryptoKeyVersion(obj); 2128 checkCryptoKeyVersion(obj);
2093 2129
2094 var path = (req.url).path; 2130 var path = (req.url).path;
2095 var pathOffset = 0; 2131 var pathOffset = 0;
2096 var index; 2132 var index;
2097 var subPart; 2133 var subPart;
2098 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2099 pathOffset += 1; 2135 pathOffset += 1;
2100 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2136 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
2118 } 2154 }
2119 } 2155 }
2120 2156
2121 2157
2122 var h = { 2158 var h = {
2123 "content-type" : "application/json; charset=utf-8", 2159 "content-type" : "application/json; charset=utf-8",
2124 }; 2160 };
2125 var resp = convert.JSON.encode(buildCryptoKeyVersion()); 2161 var resp = convert.JSON.encode(buildCryptoKeyVersion());
2126 return new async.Future.value(stringResponse(200, h, resp)); 2162 return new async.Future.value(stringResponse(200, h, resp));
2127 }), true); 2163 }), true);
2128 res.create(arg_request, arg_parent).then(unittest.expectAsync(((api.Crypto KeyVersion response) { 2164 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.Crypt oKeyVersion response) {
2129 checkCryptoKeyVersion(response); 2165 checkCryptoKeyVersion(response);
2130 }))); 2166 })));
2131 }); 2167 });
2132 2168
2133 unittest.test("method--destroy", () { 2169 unittest.test("method--destroy", () {
2134 2170
2135 var mock = new HttpServerMock(); 2171 var mock = new HttpServerMock();
2136 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns; 2172 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns;
2137 var arg_request = buildDestroyCryptoKeyVersionRequest(); 2173 var arg_request = buildDestroyCryptoKeyVersionRequest();
2138 var arg_name = "foo"; 2174 var arg_name = "foo";
2139 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2175 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2140 var obj = new api.DestroyCryptoKeyVersionRequest.fromJson(json); 2176 var obj = new api.DestroyCryptoKeyVersionRequest.fromJson(json);
2141 checkDestroyCryptoKeyVersionRequest(obj); 2177 checkDestroyCryptoKeyVersionRequest(obj);
2142 2178
2143 var path = (req.url).path; 2179 var path = (req.url).path;
2144 var pathOffset = 0; 2180 var pathOffset = 0;
2145 var index; 2181 var index;
2146 var subPart; 2182 var subPart;
2147 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2183 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2148 pathOffset += 1; 2184 pathOffset += 1;
2149 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2185 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
2167 } 2203 }
2168 } 2204 }
2169 2205
2170 2206
2171 var h = { 2207 var h = {
2172 "content-type" : "application/json; charset=utf-8", 2208 "content-type" : "application/json; charset=utf-8",
2173 }; 2209 };
2174 var resp = convert.JSON.encode(buildCryptoKeyVersion()); 2210 var resp = convert.JSON.encode(buildCryptoKeyVersion());
2175 return new async.Future.value(stringResponse(200, h, resp)); 2211 return new async.Future.value(stringResponse(200, h, resp));
2176 }), true); 2212 }), true);
2177 res.destroy(arg_request, arg_name).then(unittest.expectAsync(((api.CryptoK eyVersion response) { 2213 res.destroy(arg_request, arg_name).then(unittest.expectAsync1(((api.Crypto KeyVersion response) {
2178 checkCryptoKeyVersion(response); 2214 checkCryptoKeyVersion(response);
2179 }))); 2215 })));
2180 }); 2216 });
2181 2217
2182 unittest.test("method--get", () { 2218 unittest.test("method--get", () {
2183 2219
2184 var mock = new HttpServerMock(); 2220 var mock = new HttpServerMock();
2185 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns; 2221 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns;
2186 var arg_name = "foo"; 2222 var arg_name = "foo";
2187 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2223 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2188 var path = (req.url).path; 2224 var path = (req.url).path;
2189 var pathOffset = 0; 2225 var pathOffset = 0;
2190 var index; 2226 var index;
2191 var subPart; 2227 var subPart;
2192 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2228 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2193 pathOffset += 1; 2229 pathOffset += 1;
2194 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2230 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
2195 pathOffset += 3; 2231 pathOffset += 3;
2196 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2232 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2197 2233
(...skipping 14 matching lines...)
2212 } 2248 }
2213 } 2249 }
2214 2250
2215 2251
2216 var h = { 2252 var h = {
2217 "content-type" : "application/json; charset=utf-8", 2253 "content-type" : "application/json; charset=utf-8",
2218 }; 2254 };
2219 var resp = convert.JSON.encode(buildCryptoKeyVersion()); 2255 var resp = convert.JSON.encode(buildCryptoKeyVersion());
2220 return new async.Future.value(stringResponse(200, h, resp)); 2256 return new async.Future.value(stringResponse(200, h, resp));
2221 }), true); 2257 }), true);
2222 res.get(arg_name).then(unittest.expectAsync(((api.CryptoKeyVersion respons e) { 2258 res.get(arg_name).then(unittest.expectAsync1(((api.CryptoKeyVersion respon se) {
2223 checkCryptoKeyVersion(response); 2259 checkCryptoKeyVersion(response);
2224 }))); 2260 })));
2225 }); 2261 });
2226 2262
2227 unittest.test("method--list", () { 2263 unittest.test("method--list", () {
2228 2264
2229 var mock = new HttpServerMock(); 2265 var mock = new HttpServerMock();
2230 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;
2231 var arg_parent = "foo"; 2267 var arg_parent = "foo";
2232 var arg_pageToken = "foo"; 2268 var arg_pageToken = "foo";
2233 var arg_pageSize = 42; 2269 var arg_pageSize = 42;
2234 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2270 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2235 var path = (req.url).path; 2271 var path = (req.url).path;
2236 var pathOffset = 0; 2272 var pathOffset = 0;
2237 var index; 2273 var index;
2238 var subPart; 2274 var subPart;
2239 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2240 pathOffset += 1; 2276 pathOffset += 1;
2241 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2277 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
2242 pathOffset += 3; 2278 pathOffset += 3;
2243 // 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;
2244 2280
(...skipping 16 matching lines...)
2261 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2297 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2262 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 2298 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2263 2299
2264 2300
2265 var h = { 2301 var h = {
2266 "content-type" : "application/json; charset=utf-8", 2302 "content-type" : "application/json; charset=utf-8",
2267 }; 2303 };
2268 var resp = convert.JSON.encode(buildListCryptoKeyVersionsResponse()); 2304 var resp = convert.JSON.encode(buildListCryptoKeyVersionsResponse());
2269 return new async.Future.value(stringResponse(200, h, resp)); 2305 return new async.Future.value(stringResponse(200, h, resp));
2270 }), true); 2306 }), true);
2271 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync(((api.ListCryptoKeyVersionsResponse response) { 2307 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListCryptoKeyVersionsResponse response) {
2272 checkListCryptoKeyVersionsResponse(response); 2308 checkListCryptoKeyVersionsResponse(response);
2273 }))); 2309 })));
2274 }); 2310 });
2275 2311
2276 unittest.test("method--patch", () { 2312 unittest.test("method--patch", () {
2277 2313
2278 var mock = new HttpServerMock(); 2314 var mock = new HttpServerMock();
2279 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;
2280 var arg_request = buildCryptoKeyVersion(); 2316 var arg_request = buildCryptoKeyVersion();
2281 var arg_name = "foo"; 2317 var arg_name = "foo";
2282 var arg_updateMask = "foo"; 2318 var arg_updateMask = "foo";
2283 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2319 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2284 var obj = new api.CryptoKeyVersion.fromJson(json); 2320 var obj = new api.CryptoKeyVersion.fromJson(json);
2285 checkCryptoKeyVersion(obj); 2321 checkCryptoKeyVersion(obj);
2286 2322
2287 var path = (req.url).path; 2323 var path = (req.url).path;
2288 var pathOffset = 0; 2324 var pathOffset = 0;
2289 var index; 2325 var index;
2290 var subPart; 2326 var subPart;
2291 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2327 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2292 pathOffset += 1; 2328 pathOffset += 1;
2293 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2329 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 18 matching lines...)
2312 } 2348 }
2313 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask)); 2349 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask));
2314 2350
2315 2351
2316 var h = { 2352 var h = {
2317 "content-type" : "application/json; charset=utf-8", 2353 "content-type" : "application/json; charset=utf-8",
2318 }; 2354 };
2319 var resp = convert.JSON.encode(buildCryptoKeyVersion()); 2355 var resp = convert.JSON.encode(buildCryptoKeyVersion());
2320 return new async.Future.value(stringResponse(200, h, resp)); 2356 return new async.Future.value(stringResponse(200, h, resp));
2321 }), true); 2357 }), true);
2322 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest .expectAsync(((api.CryptoKeyVersion response) { 2358 res.patch(arg_request, arg_name, updateMask: arg_updateMask).then(unittest .expectAsync1(((api.CryptoKeyVersion response) {
2323 checkCryptoKeyVersion(response); 2359 checkCryptoKeyVersion(response);
2324 }))); 2360 })));
2325 }); 2361 });
2326 2362
2327 unittest.test("method--restore", () { 2363 unittest.test("method--restore", () {
2328 2364
2329 var mock = new HttpServerMock(); 2365 var mock = new HttpServerMock();
2330 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns; 2366 api.ProjectsLocationsKeyRingsCryptoKeysCryptoKeyVersionsResourceApi res = new api.CloudkmsApi(mock).projects.locations.keyRings.cryptoKeys.cryptoKeyVersio ns;
2331 var arg_request = buildRestoreCryptoKeyVersionRequest(); 2367 var arg_request = buildRestoreCryptoKeyVersionRequest();
2332 var arg_name = "foo"; 2368 var arg_name = "foo";
2333 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2369 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2334 var obj = new api.RestoreCryptoKeyVersionRequest.fromJson(json); 2370 var obj = new api.RestoreCryptoKeyVersionRequest.fromJson(json);
2335 checkRestoreCryptoKeyVersionRequest(obj); 2371 checkRestoreCryptoKeyVersionRequest(obj);
2336 2372
2337 var path = (req.url).path; 2373 var path = (req.url).path;
2338 var pathOffset = 0; 2374 var pathOffset = 0;
2339 var index; 2375 var index;
2340 var subPart; 2376 var subPart;
2341 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2377 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2342 pathOffset += 1; 2378 pathOffset += 1;
2343 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2379 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
(...skipping 17 matching lines...)
2361 } 2397 }
2362 } 2398 }
2363 2399
2364 2400
2365 var h = { 2401 var h = {
2366 "content-type" : "application/json; charset=utf-8", 2402 "content-type" : "application/json; charset=utf-8",
2367 }; 2403 };
2368 var resp = convert.JSON.encode(buildCryptoKeyVersion()); 2404 var resp = convert.JSON.encode(buildCryptoKeyVersion());
2369 return new async.Future.value(stringResponse(200, h, resp)); 2405 return new async.Future.value(stringResponse(200, h, resp));
2370 }), true); 2406 }), true);
2371 res.restore(arg_request, arg_name).then(unittest.expectAsync(((api.CryptoK eyVersion response) { 2407 res.restore(arg_request, arg_name).then(unittest.expectAsync1(((api.Crypto KeyVersion response) {
2372 checkCryptoKeyVersion(response); 2408 checkCryptoKeyVersion(response);
2373 }))); 2409 })));
2374 }); 2410 });
2375 2411
2376 }); 2412 });
2377 2413
2378 2414
2379 } 2415 }
2380 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