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

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

Issue 1797933002: Api-roll 33: 2016-03-14 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Added resources/*/CHANGELOG.md, addresssed comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.dataproc.v1.test; 1 library googleapis.dataproc.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:unittest/unittest.dart' as unittest;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map headers, core.String body) {
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 core.int buildCounterCancelJobRequest = 0;
55 buildCancelJobRequest() {
56 var o = new api.CancelJobRequest();
57 buildCounterCancelJobRequest++;
58 if (buildCounterCancelJobRequest < 3) {
59 }
60 buildCounterCancelJobRequest--;
61 return o;
62 }
63
64 checkCancelJobRequest(api.CancelJobRequest o) {
65 buildCounterCancelJobRequest++;
66 if (buildCounterCancelJobRequest < 3) {
67 }
68 buildCounterCancelJobRequest--;
69 }
70
71 buildUnnamed832() {
72 var o = new core.List<api.ClusterStatus>();
73 o.add(buildClusterStatus());
74 o.add(buildClusterStatus());
75 return o;
76 }
77
78 checkUnnamed832(core.List<api.ClusterStatus> o) {
79 unittest.expect(o, unittest.hasLength(2));
80 checkClusterStatus(o[0]);
81 checkClusterStatus(o[1]);
82 }
83
84 core.int buildCounterCluster = 0;
85 buildCluster() {
86 var o = new api.Cluster();
87 buildCounterCluster++;
88 if (buildCounterCluster < 3) {
89 o.clusterName = "foo";
90 o.clusterUuid = "foo";
91 o.config = buildClusterConfig();
92 o.projectId = "foo";
93 o.status = buildClusterStatus();
94 o.statusHistory = buildUnnamed832();
95 }
96 buildCounterCluster--;
97 return o;
98 }
99
100 checkCluster(api.Cluster o) {
101 buildCounterCluster++;
102 if (buildCounterCluster < 3) {
103 unittest.expect(o.clusterName, unittest.equals('foo'));
104 unittest.expect(o.clusterUuid, unittest.equals('foo'));
105 checkClusterConfig(o.config);
106 unittest.expect(o.projectId, unittest.equals('foo'));
107 checkClusterStatus(o.status);
108 checkUnnamed832(o.statusHistory);
109 }
110 buildCounterCluster--;
111 }
112
113 buildUnnamed833() {
114 var o = new core.List<api.NodeInitializationAction>();
115 o.add(buildNodeInitializationAction());
116 o.add(buildNodeInitializationAction());
117 return o;
118 }
119
120 checkUnnamed833(core.List<api.NodeInitializationAction> o) {
121 unittest.expect(o, unittest.hasLength(2));
122 checkNodeInitializationAction(o[0]);
123 checkNodeInitializationAction(o[1]);
124 }
125
126 core.int buildCounterClusterConfig = 0;
127 buildClusterConfig() {
128 var o = new api.ClusterConfig();
129 buildCounterClusterConfig++;
130 if (buildCounterClusterConfig < 3) {
131 o.configBucket = "foo";
132 o.gceClusterConfig = buildGceClusterConfig();
133 o.initializationActions = buildUnnamed833();
134 o.masterConfig = buildInstanceGroupConfig();
135 o.secondaryWorkerConfig = buildInstanceGroupConfig();
136 o.softwareConfig = buildSoftwareConfig();
137 o.workerConfig = buildInstanceGroupConfig();
138 }
139 buildCounterClusterConfig--;
140 return o;
141 }
142
143 checkClusterConfig(api.ClusterConfig o) {
144 buildCounterClusterConfig++;
145 if (buildCounterClusterConfig < 3) {
146 unittest.expect(o.configBucket, unittest.equals('foo'));
147 checkGceClusterConfig(o.gceClusterConfig);
148 checkUnnamed833(o.initializationActions);
149 checkInstanceGroupConfig(o.masterConfig);
150 checkInstanceGroupConfig(o.secondaryWorkerConfig);
151 checkSoftwareConfig(o.softwareConfig);
152 checkInstanceGroupConfig(o.workerConfig);
153 }
154 buildCounterClusterConfig--;
155 }
156
157 buildUnnamed834() {
158 var o = new core.List<api.ClusterOperationStatus>();
159 o.add(buildClusterOperationStatus());
160 o.add(buildClusterOperationStatus());
161 return o;
162 }
163
164 checkUnnamed834(core.List<api.ClusterOperationStatus> o) {
165 unittest.expect(o, unittest.hasLength(2));
166 checkClusterOperationStatus(o[0]);
167 checkClusterOperationStatus(o[1]);
168 }
169
170 core.int buildCounterClusterOperationMetadata = 0;
171 buildClusterOperationMetadata() {
172 var o = new api.ClusterOperationMetadata();
173 buildCounterClusterOperationMetadata++;
174 if (buildCounterClusterOperationMetadata < 3) {
175 o.clusterName = "foo";
176 o.clusterUuid = "foo";
177 o.description = "foo";
178 o.operationType = "foo";
179 o.status = buildClusterOperationStatus();
180 o.statusHistory = buildUnnamed834();
181 }
182 buildCounterClusterOperationMetadata--;
183 return o;
184 }
185
186 checkClusterOperationMetadata(api.ClusterOperationMetadata o) {
187 buildCounterClusterOperationMetadata++;
188 if (buildCounterClusterOperationMetadata < 3) {
189 unittest.expect(o.clusterName, unittest.equals('foo'));
190 unittest.expect(o.clusterUuid, unittest.equals('foo'));
191 unittest.expect(o.description, unittest.equals('foo'));
192 unittest.expect(o.operationType, unittest.equals('foo'));
193 checkClusterOperationStatus(o.status);
194 checkUnnamed834(o.statusHistory);
195 }
196 buildCounterClusterOperationMetadata--;
197 }
198
199 core.int buildCounterClusterOperationStatus = 0;
200 buildClusterOperationStatus() {
201 var o = new api.ClusterOperationStatus();
202 buildCounterClusterOperationStatus++;
203 if (buildCounterClusterOperationStatus < 3) {
204 o.details = "foo";
205 o.innerState = "foo";
206 o.state = "foo";
207 o.stateStartTime = "foo";
208 }
209 buildCounterClusterOperationStatus--;
210 return o;
211 }
212
213 checkClusterOperationStatus(api.ClusterOperationStatus o) {
214 buildCounterClusterOperationStatus++;
215 if (buildCounterClusterOperationStatus < 3) {
216 unittest.expect(o.details, unittest.equals('foo'));
217 unittest.expect(o.innerState, unittest.equals('foo'));
218 unittest.expect(o.state, unittest.equals('foo'));
219 unittest.expect(o.stateStartTime, unittest.equals('foo'));
220 }
221 buildCounterClusterOperationStatus--;
222 }
223
224 core.int buildCounterClusterStatus = 0;
225 buildClusterStatus() {
226 var o = new api.ClusterStatus();
227 buildCounterClusterStatus++;
228 if (buildCounterClusterStatus < 3) {
229 o.detail = "foo";
230 o.state = "foo";
231 o.stateStartTime = "foo";
232 }
233 buildCounterClusterStatus--;
234 return o;
235 }
236
237 checkClusterStatus(api.ClusterStatus o) {
238 buildCounterClusterStatus++;
239 if (buildCounterClusterStatus < 3) {
240 unittest.expect(o.detail, unittest.equals('foo'));
241 unittest.expect(o.state, unittest.equals('foo'));
242 unittest.expect(o.stateStartTime, unittest.equals('foo'));
243 }
244 buildCounterClusterStatus--;
245 }
246
54 core.int buildCounterDiagnoseClusterOutputLocation = 0; 247 core.int buildCounterDiagnoseClusterOutputLocation = 0;
55 buildDiagnoseClusterOutputLocation() { 248 buildDiagnoseClusterOutputLocation() {
56 var o = new api.DiagnoseClusterOutputLocation(); 249 var o = new api.DiagnoseClusterOutputLocation();
57 buildCounterDiagnoseClusterOutputLocation++; 250 buildCounterDiagnoseClusterOutputLocation++;
58 if (buildCounterDiagnoseClusterOutputLocation < 3) { 251 if (buildCounterDiagnoseClusterOutputLocation < 3) {
59 o.outputUri = "foo"; 252 o.outputUri = "foo";
60 } 253 }
61 buildCounterDiagnoseClusterOutputLocation--; 254 buildCounterDiagnoseClusterOutputLocation--;
62 return o; 255 return o;
63 } 256 }
64 257
65 checkDiagnoseClusterOutputLocation(api.DiagnoseClusterOutputLocation o) { 258 checkDiagnoseClusterOutputLocation(api.DiagnoseClusterOutputLocation o) {
66 buildCounterDiagnoseClusterOutputLocation++; 259 buildCounterDiagnoseClusterOutputLocation++;
67 if (buildCounterDiagnoseClusterOutputLocation < 3) { 260 if (buildCounterDiagnoseClusterOutputLocation < 3) {
68 unittest.expect(o.outputUri, unittest.equals('foo')); 261 unittest.expect(o.outputUri, unittest.equals('foo'));
69 } 262 }
70 buildCounterDiagnoseClusterOutputLocation--; 263 buildCounterDiagnoseClusterOutputLocation--;
71 } 264 }
72 265
266 core.int buildCounterDiagnoseClusterRequest = 0;
267 buildDiagnoseClusterRequest() {
268 var o = new api.DiagnoseClusterRequest();
269 buildCounterDiagnoseClusterRequest++;
270 if (buildCounterDiagnoseClusterRequest < 3) {
271 }
272 buildCounterDiagnoseClusterRequest--;
273 return o;
274 }
275
276 checkDiagnoseClusterRequest(api.DiagnoseClusterRequest o) {
277 buildCounterDiagnoseClusterRequest++;
278 if (buildCounterDiagnoseClusterRequest < 3) {
279 }
280 buildCounterDiagnoseClusterRequest--;
281 }
282
283 core.int buildCounterDiagnoseClusterResults = 0;
284 buildDiagnoseClusterResults() {
285 var o = new api.DiagnoseClusterResults();
286 buildCounterDiagnoseClusterResults++;
287 if (buildCounterDiagnoseClusterResults < 3) {
288 o.outputUri = "foo";
289 }
290 buildCounterDiagnoseClusterResults--;
291 return o;
292 }
293
294 checkDiagnoseClusterResults(api.DiagnoseClusterResults o) {
295 buildCounterDiagnoseClusterResults++;
296 if (buildCounterDiagnoseClusterResults < 3) {
297 unittest.expect(o.outputUri, unittest.equals('foo'));
298 }
299 buildCounterDiagnoseClusterResults--;
300 }
301
302 core.int buildCounterDiskConfig = 0;
303 buildDiskConfig() {
304 var o = new api.DiskConfig();
305 buildCounterDiskConfig++;
306 if (buildCounterDiskConfig < 3) {
307 o.bootDiskSizeGb = 42;
308 o.numLocalSsds = 42;
309 }
310 buildCounterDiskConfig--;
311 return o;
312 }
313
314 checkDiskConfig(api.DiskConfig o) {
315 buildCounterDiskConfig++;
316 if (buildCounterDiskConfig < 3) {
317 unittest.expect(o.bootDiskSizeGb, unittest.equals(42));
318 unittest.expect(o.numLocalSsds, unittest.equals(42));
319 }
320 buildCounterDiskConfig--;
321 }
322
323 core.int buildCounterEmpty = 0;
324 buildEmpty() {
325 var o = new api.Empty();
326 buildCounterEmpty++;
327 if (buildCounterEmpty < 3) {
328 }
329 buildCounterEmpty--;
330 return o;
331 }
332
333 checkEmpty(api.Empty o) {
334 buildCounterEmpty++;
335 if (buildCounterEmpty < 3) {
336 }
337 buildCounterEmpty--;
338 }
339
340 buildUnnamed835() {
341 var o = new core.Map<core.String, core.String>();
342 o["x"] = "foo";
343 o["y"] = "foo";
344 return o;
345 }
346
347 checkUnnamed835(core.Map<core.String, core.String> o) {
348 unittest.expect(o, unittest.hasLength(2));
349 unittest.expect(o["x"], unittest.equals('foo'));
350 unittest.expect(o["y"], unittest.equals('foo'));
351 }
352
353 buildUnnamed836() {
354 var o = new core.List<core.String>();
355 o.add("foo");
356 o.add("foo");
357 return o;
358 }
359
360 checkUnnamed836(core.List<core.String> o) {
361 unittest.expect(o, unittest.hasLength(2));
362 unittest.expect(o[0], unittest.equals('foo'));
363 unittest.expect(o[1], unittest.equals('foo'));
364 }
365
366 buildUnnamed837() {
367 var o = new core.List<core.String>();
368 o.add("foo");
369 o.add("foo");
370 return o;
371 }
372
373 checkUnnamed837(core.List<core.String> o) {
374 unittest.expect(o, unittest.hasLength(2));
375 unittest.expect(o[0], unittest.equals('foo'));
376 unittest.expect(o[1], unittest.equals('foo'));
377 }
378
379 core.int buildCounterGceClusterConfig = 0;
380 buildGceClusterConfig() {
381 var o = new api.GceClusterConfig();
382 buildCounterGceClusterConfig++;
383 if (buildCounterGceClusterConfig < 3) {
384 o.metadata = buildUnnamed835();
385 o.networkUri = "foo";
386 o.serviceAccountScopes = buildUnnamed836();
387 o.subnetworkUri = "foo";
388 o.tags = buildUnnamed837();
389 o.zoneUri = "foo";
390 }
391 buildCounterGceClusterConfig--;
392 return o;
393 }
394
395 checkGceClusterConfig(api.GceClusterConfig o) {
396 buildCounterGceClusterConfig++;
397 if (buildCounterGceClusterConfig < 3) {
398 checkUnnamed835(o.metadata);
399 unittest.expect(o.networkUri, unittest.equals('foo'));
400 checkUnnamed836(o.serviceAccountScopes);
401 unittest.expect(o.subnetworkUri, unittest.equals('foo'));
402 checkUnnamed837(o.tags);
403 unittest.expect(o.zoneUri, unittest.equals('foo'));
404 }
405 buildCounterGceClusterConfig--;
406 }
407
408 buildUnnamed838() {
409 var o = new core.List<core.String>();
410 o.add("foo");
411 o.add("foo");
412 return o;
413 }
414
415 checkUnnamed838(core.List<core.String> o) {
416 unittest.expect(o, unittest.hasLength(2));
417 unittest.expect(o[0], unittest.equals('foo'));
418 unittest.expect(o[1], unittest.equals('foo'));
419 }
420
421 buildUnnamed839() {
422 var o = new core.List<core.String>();
423 o.add("foo");
424 o.add("foo");
425 return o;
426 }
427
428 checkUnnamed839(core.List<core.String> o) {
429 unittest.expect(o, unittest.hasLength(2));
430 unittest.expect(o[0], unittest.equals('foo'));
431 unittest.expect(o[1], unittest.equals('foo'));
432 }
433
434 buildUnnamed840() {
435 var o = new core.List<core.String>();
436 o.add("foo");
437 o.add("foo");
438 return o;
439 }
440
441 checkUnnamed840(core.List<core.String> o) {
442 unittest.expect(o, unittest.hasLength(2));
443 unittest.expect(o[0], unittest.equals('foo'));
444 unittest.expect(o[1], unittest.equals('foo'));
445 }
446
447 buildUnnamed841() {
448 var o = new core.List<core.String>();
449 o.add("foo");
450 o.add("foo");
451 return o;
452 }
453
454 checkUnnamed841(core.List<core.String> o) {
455 unittest.expect(o, unittest.hasLength(2));
456 unittest.expect(o[0], unittest.equals('foo'));
457 unittest.expect(o[1], unittest.equals('foo'));
458 }
459
460 buildUnnamed842() {
461 var o = new core.Map<core.String, core.String>();
462 o["x"] = "foo";
463 o["y"] = "foo";
464 return o;
465 }
466
467 checkUnnamed842(core.Map<core.String, core.String> o) {
468 unittest.expect(o, unittest.hasLength(2));
469 unittest.expect(o["x"], unittest.equals('foo'));
470 unittest.expect(o["y"], unittest.equals('foo'));
471 }
472
473 core.int buildCounterHadoopJob = 0;
474 buildHadoopJob() {
475 var o = new api.HadoopJob();
476 buildCounterHadoopJob++;
477 if (buildCounterHadoopJob < 3) {
478 o.archiveUris = buildUnnamed838();
479 o.args = buildUnnamed839();
480 o.fileUris = buildUnnamed840();
481 o.jarFileUris = buildUnnamed841();
482 o.loggingConfig = buildLoggingConfig();
483 o.mainClass = "foo";
484 o.mainJarFileUri = "foo";
485 o.properties = buildUnnamed842();
486 }
487 buildCounterHadoopJob--;
488 return o;
489 }
490
491 checkHadoopJob(api.HadoopJob o) {
492 buildCounterHadoopJob++;
493 if (buildCounterHadoopJob < 3) {
494 checkUnnamed838(o.archiveUris);
495 checkUnnamed839(o.args);
496 checkUnnamed840(o.fileUris);
497 checkUnnamed841(o.jarFileUris);
498 checkLoggingConfig(o.loggingConfig);
499 unittest.expect(o.mainClass, unittest.equals('foo'));
500 unittest.expect(o.mainJarFileUri, unittest.equals('foo'));
501 checkUnnamed842(o.properties);
502 }
503 buildCounterHadoopJob--;
504 }
505
506 buildUnnamed843() {
507 var o = new core.List<core.String>();
508 o.add("foo");
509 o.add("foo");
510 return o;
511 }
512
513 checkUnnamed843(core.List<core.String> o) {
514 unittest.expect(o, unittest.hasLength(2));
515 unittest.expect(o[0], unittest.equals('foo'));
516 unittest.expect(o[1], unittest.equals('foo'));
517 }
518
519 buildUnnamed844() {
520 var o = new core.Map<core.String, core.String>();
521 o["x"] = "foo";
522 o["y"] = "foo";
523 return o;
524 }
525
526 checkUnnamed844(core.Map<core.String, core.String> o) {
527 unittest.expect(o, unittest.hasLength(2));
528 unittest.expect(o["x"], unittest.equals('foo'));
529 unittest.expect(o["y"], unittest.equals('foo'));
530 }
531
532 buildUnnamed845() {
533 var o = new core.Map<core.String, core.String>();
534 o["x"] = "foo";
535 o["y"] = "foo";
536 return o;
537 }
538
539 checkUnnamed845(core.Map<core.String, core.String> o) {
540 unittest.expect(o, unittest.hasLength(2));
541 unittest.expect(o["x"], unittest.equals('foo'));
542 unittest.expect(o["y"], unittest.equals('foo'));
543 }
544
545 core.int buildCounterHiveJob = 0;
546 buildHiveJob() {
547 var o = new api.HiveJob();
548 buildCounterHiveJob++;
549 if (buildCounterHiveJob < 3) {
550 o.continueOnFailure = true;
551 o.jarFileUris = buildUnnamed843();
552 o.properties = buildUnnamed844();
553 o.queryFileUri = "foo";
554 o.queryList = buildQueryList();
555 o.scriptVariables = buildUnnamed845();
556 }
557 buildCounterHiveJob--;
558 return o;
559 }
560
561 checkHiveJob(api.HiveJob o) {
562 buildCounterHiveJob++;
563 if (buildCounterHiveJob < 3) {
564 unittest.expect(o.continueOnFailure, unittest.isTrue);
565 checkUnnamed843(o.jarFileUris);
566 checkUnnamed844(o.properties);
567 unittest.expect(o.queryFileUri, unittest.equals('foo'));
568 checkQueryList(o.queryList);
569 checkUnnamed845(o.scriptVariables);
570 }
571 buildCounterHiveJob--;
572 }
573
574 buildUnnamed846() {
575 var o = new core.List<core.String>();
576 o.add("foo");
577 o.add("foo");
578 return o;
579 }
580
581 checkUnnamed846(core.List<core.String> o) {
582 unittest.expect(o, unittest.hasLength(2));
583 unittest.expect(o[0], unittest.equals('foo'));
584 unittest.expect(o[1], unittest.equals('foo'));
585 }
586
587 core.int buildCounterInstanceGroupConfig = 0;
588 buildInstanceGroupConfig() {
589 var o = new api.InstanceGroupConfig();
590 buildCounterInstanceGroupConfig++;
591 if (buildCounterInstanceGroupConfig < 3) {
592 o.diskConfig = buildDiskConfig();
593 o.imageUri = "foo";
594 o.instanceNames = buildUnnamed846();
595 o.isPreemptible = true;
596 o.machineTypeUri = "foo";
597 o.managedGroupConfig = buildManagedGroupConfig();
598 o.numInstances = 42;
599 }
600 buildCounterInstanceGroupConfig--;
601 return o;
602 }
603
604 checkInstanceGroupConfig(api.InstanceGroupConfig o) {
605 buildCounterInstanceGroupConfig++;
606 if (buildCounterInstanceGroupConfig < 3) {
607 checkDiskConfig(o.diskConfig);
608 unittest.expect(o.imageUri, unittest.equals('foo'));
609 checkUnnamed846(o.instanceNames);
610 unittest.expect(o.isPreemptible, unittest.isTrue);
611 unittest.expect(o.machineTypeUri, unittest.equals('foo'));
612 checkManagedGroupConfig(o.managedGroupConfig);
613 unittest.expect(o.numInstances, unittest.equals(42));
614 }
615 buildCounterInstanceGroupConfig--;
616 }
617
618 buildUnnamed847() {
619 var o = new core.List<api.JobStatus>();
620 o.add(buildJobStatus());
621 o.add(buildJobStatus());
622 return o;
623 }
624
625 checkUnnamed847(core.List<api.JobStatus> o) {
626 unittest.expect(o, unittest.hasLength(2));
627 checkJobStatus(o[0]);
628 checkJobStatus(o[1]);
629 }
630
631 core.int buildCounterJob = 0;
632 buildJob() {
633 var o = new api.Job();
634 buildCounterJob++;
635 if (buildCounterJob < 3) {
636 o.driverControlFilesUri = "foo";
637 o.driverOutputResourceUri = "foo";
638 o.hadoopJob = buildHadoopJob();
639 o.hiveJob = buildHiveJob();
640 o.pigJob = buildPigJob();
641 o.placement = buildJobPlacement();
642 o.pysparkJob = buildPySparkJob();
643 o.reference = buildJobReference();
644 o.sparkJob = buildSparkJob();
645 o.sparkSqlJob = buildSparkSqlJob();
646 o.status = buildJobStatus();
647 o.statusHistory = buildUnnamed847();
648 }
649 buildCounterJob--;
650 return o;
651 }
652
653 checkJob(api.Job o) {
654 buildCounterJob++;
655 if (buildCounterJob < 3) {
656 unittest.expect(o.driverControlFilesUri, unittest.equals('foo'));
657 unittest.expect(o.driverOutputResourceUri, unittest.equals('foo'));
658 checkHadoopJob(o.hadoopJob);
659 checkHiveJob(o.hiveJob);
660 checkPigJob(o.pigJob);
661 checkJobPlacement(o.placement);
662 checkPySparkJob(o.pysparkJob);
663 checkJobReference(o.reference);
664 checkSparkJob(o.sparkJob);
665 checkSparkSqlJob(o.sparkSqlJob);
666 checkJobStatus(o.status);
667 checkUnnamed847(o.statusHistory);
668 }
669 buildCounterJob--;
670 }
671
672 core.int buildCounterJobPlacement = 0;
673 buildJobPlacement() {
674 var o = new api.JobPlacement();
675 buildCounterJobPlacement++;
676 if (buildCounterJobPlacement < 3) {
677 o.clusterName = "foo";
678 o.clusterUuid = "foo";
679 }
680 buildCounterJobPlacement--;
681 return o;
682 }
683
684 checkJobPlacement(api.JobPlacement o) {
685 buildCounterJobPlacement++;
686 if (buildCounterJobPlacement < 3) {
687 unittest.expect(o.clusterName, unittest.equals('foo'));
688 unittest.expect(o.clusterUuid, unittest.equals('foo'));
689 }
690 buildCounterJobPlacement--;
691 }
692
693 core.int buildCounterJobReference = 0;
694 buildJobReference() {
695 var o = new api.JobReference();
696 buildCounterJobReference++;
697 if (buildCounterJobReference < 3) {
698 o.jobId = "foo";
699 o.projectId = "foo";
700 }
701 buildCounterJobReference--;
702 return o;
703 }
704
705 checkJobReference(api.JobReference o) {
706 buildCounterJobReference++;
707 if (buildCounterJobReference < 3) {
708 unittest.expect(o.jobId, unittest.equals('foo'));
709 unittest.expect(o.projectId, unittest.equals('foo'));
710 }
711 buildCounterJobReference--;
712 }
713
714 core.int buildCounterJobStatus = 0;
715 buildJobStatus() {
716 var o = new api.JobStatus();
717 buildCounterJobStatus++;
718 if (buildCounterJobStatus < 3) {
719 o.details = "foo";
720 o.state = "foo";
721 o.stateStartTime = "foo";
722 }
723 buildCounterJobStatus--;
724 return o;
725 }
726
727 checkJobStatus(api.JobStatus o) {
728 buildCounterJobStatus++;
729 if (buildCounterJobStatus < 3) {
730 unittest.expect(o.details, unittest.equals('foo'));
731 unittest.expect(o.state, unittest.equals('foo'));
732 unittest.expect(o.stateStartTime, unittest.equals('foo'));
733 }
734 buildCounterJobStatus--;
735 }
736
737 buildUnnamed848() {
738 var o = new core.List<api.Cluster>();
739 o.add(buildCluster());
740 o.add(buildCluster());
741 return o;
742 }
743
744 checkUnnamed848(core.List<api.Cluster> o) {
745 unittest.expect(o, unittest.hasLength(2));
746 checkCluster(o[0]);
747 checkCluster(o[1]);
748 }
749
750 core.int buildCounterListClustersResponse = 0;
751 buildListClustersResponse() {
752 var o = new api.ListClustersResponse();
753 buildCounterListClustersResponse++;
754 if (buildCounterListClustersResponse < 3) {
755 o.clusters = buildUnnamed848();
756 o.nextPageToken = "foo";
757 }
758 buildCounterListClustersResponse--;
759 return o;
760 }
761
762 checkListClustersResponse(api.ListClustersResponse o) {
763 buildCounterListClustersResponse++;
764 if (buildCounterListClustersResponse < 3) {
765 checkUnnamed848(o.clusters);
766 unittest.expect(o.nextPageToken, unittest.equals('foo'));
767 }
768 buildCounterListClustersResponse--;
769 }
770
771 buildUnnamed849() {
772 var o = new core.List<api.Job>();
773 o.add(buildJob());
774 o.add(buildJob());
775 return o;
776 }
777
778 checkUnnamed849(core.List<api.Job> o) {
779 unittest.expect(o, unittest.hasLength(2));
780 checkJob(o[0]);
781 checkJob(o[1]);
782 }
783
784 core.int buildCounterListJobsResponse = 0;
785 buildListJobsResponse() {
786 var o = new api.ListJobsResponse();
787 buildCounterListJobsResponse++;
788 if (buildCounterListJobsResponse < 3) {
789 o.jobs = buildUnnamed849();
790 o.nextPageToken = "foo";
791 }
792 buildCounterListJobsResponse--;
793 return o;
794 }
795
796 checkListJobsResponse(api.ListJobsResponse o) {
797 buildCounterListJobsResponse++;
798 if (buildCounterListJobsResponse < 3) {
799 checkUnnamed849(o.jobs);
800 unittest.expect(o.nextPageToken, unittest.equals('foo'));
801 }
802 buildCounterListJobsResponse--;
803 }
804
805 buildUnnamed850() {
806 var o = new core.List<api.Operation>();
807 o.add(buildOperation());
808 o.add(buildOperation());
809 return o;
810 }
811
812 checkUnnamed850(core.List<api.Operation> o) {
813 unittest.expect(o, unittest.hasLength(2));
814 checkOperation(o[0]);
815 checkOperation(o[1]);
816 }
817
818 core.int buildCounterListOperationsResponse = 0;
819 buildListOperationsResponse() {
820 var o = new api.ListOperationsResponse();
821 buildCounterListOperationsResponse++;
822 if (buildCounterListOperationsResponse < 3) {
823 o.nextPageToken = "foo";
824 o.operations = buildUnnamed850();
825 }
826 buildCounterListOperationsResponse--;
827 return o;
828 }
829
830 checkListOperationsResponse(api.ListOperationsResponse o) {
831 buildCounterListOperationsResponse++;
832 if (buildCounterListOperationsResponse < 3) {
833 unittest.expect(o.nextPageToken, unittest.equals('foo'));
834 checkUnnamed850(o.operations);
835 }
836 buildCounterListOperationsResponse--;
837 }
838
839 buildUnnamed851() {
840 var o = new core.Map<core.String, core.String>();
841 o["x"] = "foo";
842 o["y"] = "foo";
843 return o;
844 }
845
846 checkUnnamed851(core.Map<core.String, core.String> o) {
847 unittest.expect(o, unittest.hasLength(2));
848 unittest.expect(o["x"], unittest.equals('foo'));
849 unittest.expect(o["y"], unittest.equals('foo'));
850 }
851
852 core.int buildCounterLoggingConfig = 0;
853 buildLoggingConfig() {
854 var o = new api.LoggingConfig();
855 buildCounterLoggingConfig++;
856 if (buildCounterLoggingConfig < 3) {
857 o.driverLogLevels = buildUnnamed851();
858 }
859 buildCounterLoggingConfig--;
860 return o;
861 }
862
863 checkLoggingConfig(api.LoggingConfig o) {
864 buildCounterLoggingConfig++;
865 if (buildCounterLoggingConfig < 3) {
866 checkUnnamed851(o.driverLogLevels);
867 }
868 buildCounterLoggingConfig--;
869 }
870
871 core.int buildCounterManagedGroupConfig = 0;
872 buildManagedGroupConfig() {
873 var o = new api.ManagedGroupConfig();
874 buildCounterManagedGroupConfig++;
875 if (buildCounterManagedGroupConfig < 3) {
876 o.instanceGroupManagerName = "foo";
877 o.instanceTemplateName = "foo";
878 }
879 buildCounterManagedGroupConfig--;
880 return o;
881 }
882
883 checkManagedGroupConfig(api.ManagedGroupConfig o) {
884 buildCounterManagedGroupConfig++;
885 if (buildCounterManagedGroupConfig < 3) {
886 unittest.expect(o.instanceGroupManagerName, unittest.equals('foo'));
887 unittest.expect(o.instanceTemplateName, unittest.equals('foo'));
888 }
889 buildCounterManagedGroupConfig--;
890 }
891
73 core.int buildCounterMedia = 0; 892 core.int buildCounterMedia = 0;
74 buildMedia() { 893 buildMedia() {
75 var o = new api.Media(); 894 var o = new api.Media();
76 buildCounterMedia++; 895 buildCounterMedia++;
77 if (buildCounterMedia < 3) { 896 if (buildCounterMedia < 3) {
78 o.resourceName = "foo"; 897 o.resourceName = "foo";
79 } 898 }
80 buildCounterMedia--; 899 buildCounterMedia--;
81 return o; 900 return o;
82 } 901 }
83 902
84 checkMedia(api.Media o) { 903 checkMedia(api.Media o) {
85 buildCounterMedia++; 904 buildCounterMedia++;
86 if (buildCounterMedia < 3) { 905 if (buildCounterMedia < 3) {
87 unittest.expect(o.resourceName, unittest.equals('foo')); 906 unittest.expect(o.resourceName, unittest.equals('foo'));
88 } 907 }
89 buildCounterMedia--; 908 buildCounterMedia--;
90 } 909 }
91 910
92 buildUnnamed616() { 911 core.int buildCounterNodeInitializationAction = 0;
912 buildNodeInitializationAction() {
913 var o = new api.NodeInitializationAction();
914 buildCounterNodeInitializationAction++;
915 if (buildCounterNodeInitializationAction < 3) {
916 o.executableFile = "foo";
917 o.executionTimeout = "foo";
918 }
919 buildCounterNodeInitializationAction--;
920 return o;
921 }
922
923 checkNodeInitializationAction(api.NodeInitializationAction o) {
924 buildCounterNodeInitializationAction++;
925 if (buildCounterNodeInitializationAction < 3) {
926 unittest.expect(o.executableFile, unittest.equals('foo'));
927 unittest.expect(o.executionTimeout, unittest.equals('foo'));
928 }
929 buildCounterNodeInitializationAction--;
930 }
931
932 buildUnnamed852() {
933 var o = new core.Map<core.String, core.Object>();
934 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
935 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
936 return o;
937 }
938
939 checkUnnamed852(core.Map<core.String, core.Object> o) {
940 unittest.expect(o, unittest.hasLength(2));
941 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'));
942 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'));
943 }
944
945 buildUnnamed853() {
946 var o = new core.Map<core.String, core.Object>();
947 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
948 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
949 return o;
950 }
951
952 checkUnnamed853(core.Map<core.String, core.Object> o) {
953 unittest.expect(o, unittest.hasLength(2));
954 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], unittest.equals('foo'));
955 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo'));
956 }
957
958 core.int buildCounterOperation = 0;
959 buildOperation() {
960 var o = new api.Operation();
961 buildCounterOperation++;
962 if (buildCounterOperation < 3) {
963 o.done = true;
964 o.error = buildStatus();
965 o.metadata = buildUnnamed852();
966 o.name = "foo";
967 o.response = buildUnnamed853();
968 }
969 buildCounterOperation--;
970 return o;
971 }
972
973 checkOperation(api.Operation o) {
974 buildCounterOperation++;
975 if (buildCounterOperation < 3) {
976 unittest.expect(o.done, unittest.isTrue);
977 checkStatus(o.error);
978 checkUnnamed852(o.metadata);
979 unittest.expect(o.name, unittest.equals('foo'));
980 checkUnnamed853(o.response);
981 }
982 buildCounterOperation--;
983 }
984
985 buildUnnamed854() {
93 var o = new core.List<api.OperationStatus>(); 986 var o = new core.List<api.OperationStatus>();
94 o.add(buildOperationStatus()); 987 o.add(buildOperationStatus());
95 o.add(buildOperationStatus()); 988 o.add(buildOperationStatus());
96 return o; 989 return o;
97 } 990 }
98 991
99 checkUnnamed616(core.List<api.OperationStatus> o) { 992 checkUnnamed854(core.List<api.OperationStatus> o) {
100 unittest.expect(o, unittest.hasLength(2)); 993 unittest.expect(o, unittest.hasLength(2));
101 checkOperationStatus(o[0]); 994 checkOperationStatus(o[0]);
102 checkOperationStatus(o[1]); 995 checkOperationStatus(o[1]);
103 } 996 }
104 997
105 core.int buildCounterOperationMetadata = 0; 998 core.int buildCounterOperationMetadata = 0;
106 buildOperationMetadata() { 999 buildOperationMetadata() {
107 var o = new api.OperationMetadata(); 1000 var o = new api.OperationMetadata();
108 buildCounterOperationMetadata++; 1001 buildCounterOperationMetadata++;
109 if (buildCounterOperationMetadata < 3) { 1002 if (buildCounterOperationMetadata < 3) {
110 o.clusterName = "foo"; 1003 o.clusterName = "foo";
111 o.clusterUuid = "foo"; 1004 o.clusterUuid = "foo";
1005 o.description = "foo";
112 o.details = "foo"; 1006 o.details = "foo";
113 o.endTime = "foo"; 1007 o.endTime = "foo";
114 o.innerState = "foo"; 1008 o.innerState = "foo";
115 o.insertTime = "foo"; 1009 o.insertTime = "foo";
1010 o.operationType = "foo";
116 o.startTime = "foo"; 1011 o.startTime = "foo";
117 o.state = "foo"; 1012 o.state = "foo";
118 o.status = buildOperationStatus(); 1013 o.status = buildOperationStatus();
119 o.statusHistory = buildUnnamed616(); 1014 o.statusHistory = buildUnnamed854();
120 } 1015 }
121 buildCounterOperationMetadata--; 1016 buildCounterOperationMetadata--;
122 return o; 1017 return o;
123 } 1018 }
124 1019
125 checkOperationMetadata(api.OperationMetadata o) { 1020 checkOperationMetadata(api.OperationMetadata o) {
126 buildCounterOperationMetadata++; 1021 buildCounterOperationMetadata++;
127 if (buildCounterOperationMetadata < 3) { 1022 if (buildCounterOperationMetadata < 3) {
128 unittest.expect(o.clusterName, unittest.equals('foo')); 1023 unittest.expect(o.clusterName, unittest.equals('foo'));
129 unittest.expect(o.clusterUuid, unittest.equals('foo')); 1024 unittest.expect(o.clusterUuid, unittest.equals('foo'));
1025 unittest.expect(o.description, unittest.equals('foo'));
130 unittest.expect(o.details, unittest.equals('foo')); 1026 unittest.expect(o.details, unittest.equals('foo'));
131 unittest.expect(o.endTime, unittest.equals('foo')); 1027 unittest.expect(o.endTime, unittest.equals('foo'));
132 unittest.expect(o.innerState, unittest.equals('foo')); 1028 unittest.expect(o.innerState, unittest.equals('foo'));
133 unittest.expect(o.insertTime, unittest.equals('foo')); 1029 unittest.expect(o.insertTime, unittest.equals('foo'));
1030 unittest.expect(o.operationType, unittest.equals('foo'));
134 unittest.expect(o.startTime, unittest.equals('foo')); 1031 unittest.expect(o.startTime, unittest.equals('foo'));
135 unittest.expect(o.state, unittest.equals('foo')); 1032 unittest.expect(o.state, unittest.equals('foo'));
136 checkOperationStatus(o.status); 1033 checkOperationStatus(o.status);
137 checkUnnamed616(o.statusHistory); 1034 checkUnnamed854(o.statusHistory);
138 } 1035 }
139 buildCounterOperationMetadata--; 1036 buildCounterOperationMetadata--;
140 } 1037 }
141 1038
142 core.int buildCounterOperationStatus = 0; 1039 core.int buildCounterOperationStatus = 0;
143 buildOperationStatus() { 1040 buildOperationStatus() {
144 var o = new api.OperationStatus(); 1041 var o = new api.OperationStatus();
145 buildCounterOperationStatus++; 1042 buildCounterOperationStatus++;
146 if (buildCounterOperationStatus < 3) { 1043 if (buildCounterOperationStatus < 3) {
147 o.details = "foo"; 1044 o.details = "foo";
148 o.innerState = "foo"; 1045 o.innerState = "foo";
149 o.state = "foo"; 1046 o.state = "foo";
150 o.stateStartTime = "foo"; 1047 o.stateStartTime = "foo";
151 } 1048 }
152 buildCounterOperationStatus--; 1049 buildCounterOperationStatus--;
153 return o; 1050 return o;
154 } 1051 }
155 1052
156 checkOperationStatus(api.OperationStatus o) { 1053 checkOperationStatus(api.OperationStatus o) {
157 buildCounterOperationStatus++; 1054 buildCounterOperationStatus++;
158 if (buildCounterOperationStatus < 3) { 1055 if (buildCounterOperationStatus < 3) {
159 unittest.expect(o.details, unittest.equals('foo')); 1056 unittest.expect(o.details, unittest.equals('foo'));
160 unittest.expect(o.innerState, unittest.equals('foo')); 1057 unittest.expect(o.innerState, unittest.equals('foo'));
161 unittest.expect(o.state, unittest.equals('foo')); 1058 unittest.expect(o.state, unittest.equals('foo'));
162 unittest.expect(o.stateStartTime, unittest.equals('foo')); 1059 unittest.expect(o.stateStartTime, unittest.equals('foo'));
163 } 1060 }
164 buildCounterOperationStatus--; 1061 buildCounterOperationStatus--;
165 } 1062 }
166 1063
1064 buildUnnamed855() {
1065 var o = new core.List<core.String>();
1066 o.add("foo");
1067 o.add("foo");
1068 return o;
1069 }
1070
1071 checkUnnamed855(core.List<core.String> o) {
1072 unittest.expect(o, unittest.hasLength(2));
1073 unittest.expect(o[0], unittest.equals('foo'));
1074 unittest.expect(o[1], unittest.equals('foo'));
1075 }
1076
1077 buildUnnamed856() {
1078 var o = new core.Map<core.String, core.String>();
1079 o["x"] = "foo";
1080 o["y"] = "foo";
1081 return o;
1082 }
1083
1084 checkUnnamed856(core.Map<core.String, core.String> o) {
1085 unittest.expect(o, unittest.hasLength(2));
1086 unittest.expect(o["x"], unittest.equals('foo'));
1087 unittest.expect(o["y"], unittest.equals('foo'));
1088 }
1089
1090 buildUnnamed857() {
1091 var o = new core.Map<core.String, core.String>();
1092 o["x"] = "foo";
1093 o["y"] = "foo";
1094 return o;
1095 }
1096
1097 checkUnnamed857(core.Map<core.String, core.String> o) {
1098 unittest.expect(o, unittest.hasLength(2));
1099 unittest.expect(o["x"], unittest.equals('foo'));
1100 unittest.expect(o["y"], unittest.equals('foo'));
1101 }
1102
1103 core.int buildCounterPigJob = 0;
1104 buildPigJob() {
1105 var o = new api.PigJob();
1106 buildCounterPigJob++;
1107 if (buildCounterPigJob < 3) {
1108 o.continueOnFailure = true;
1109 o.jarFileUris = buildUnnamed855();
1110 o.loggingConfig = buildLoggingConfig();
1111 o.properties = buildUnnamed856();
1112 o.queryFileUri = "foo";
1113 o.queryList = buildQueryList();
1114 o.scriptVariables = buildUnnamed857();
1115 }
1116 buildCounterPigJob--;
1117 return o;
1118 }
1119
1120 checkPigJob(api.PigJob o) {
1121 buildCounterPigJob++;
1122 if (buildCounterPigJob < 3) {
1123 unittest.expect(o.continueOnFailure, unittest.isTrue);
1124 checkUnnamed855(o.jarFileUris);
1125 checkLoggingConfig(o.loggingConfig);
1126 checkUnnamed856(o.properties);
1127 unittest.expect(o.queryFileUri, unittest.equals('foo'));
1128 checkQueryList(o.queryList);
1129 checkUnnamed857(o.scriptVariables);
1130 }
1131 buildCounterPigJob--;
1132 }
1133
1134 buildUnnamed858() {
1135 var o = new core.List<core.String>();
1136 o.add("foo");
1137 o.add("foo");
1138 return o;
1139 }
1140
1141 checkUnnamed858(core.List<core.String> o) {
1142 unittest.expect(o, unittest.hasLength(2));
1143 unittest.expect(o[0], unittest.equals('foo'));
1144 unittest.expect(o[1], unittest.equals('foo'));
1145 }
1146
1147 buildUnnamed859() {
1148 var o = new core.List<core.String>();
1149 o.add("foo");
1150 o.add("foo");
1151 return o;
1152 }
1153
1154 checkUnnamed859(core.List<core.String> o) {
1155 unittest.expect(o, unittest.hasLength(2));
1156 unittest.expect(o[0], unittest.equals('foo'));
1157 unittest.expect(o[1], unittest.equals('foo'));
1158 }
1159
1160 buildUnnamed860() {
1161 var o = new core.List<core.String>();
1162 o.add("foo");
1163 o.add("foo");
1164 return o;
1165 }
1166
1167 checkUnnamed860(core.List<core.String> o) {
1168 unittest.expect(o, unittest.hasLength(2));
1169 unittest.expect(o[0], unittest.equals('foo'));
1170 unittest.expect(o[1], unittest.equals('foo'));
1171 }
1172
1173 buildUnnamed861() {
1174 var o = new core.List<core.String>();
1175 o.add("foo");
1176 o.add("foo");
1177 return o;
1178 }
1179
1180 checkUnnamed861(core.List<core.String> o) {
1181 unittest.expect(o, unittest.hasLength(2));
1182 unittest.expect(o[0], unittest.equals('foo'));
1183 unittest.expect(o[1], unittest.equals('foo'));
1184 }
1185
1186 buildUnnamed862() {
1187 var o = new core.Map<core.String, core.String>();
1188 o["x"] = "foo";
1189 o["y"] = "foo";
1190 return o;
1191 }
1192
1193 checkUnnamed862(core.Map<core.String, core.String> o) {
1194 unittest.expect(o, unittest.hasLength(2));
1195 unittest.expect(o["x"], unittest.equals('foo'));
1196 unittest.expect(o["y"], unittest.equals('foo'));
1197 }
1198
1199 buildUnnamed863() {
1200 var o = new core.List<core.String>();
1201 o.add("foo");
1202 o.add("foo");
1203 return o;
1204 }
1205
1206 checkUnnamed863(core.List<core.String> o) {
1207 unittest.expect(o, unittest.hasLength(2));
1208 unittest.expect(o[0], unittest.equals('foo'));
1209 unittest.expect(o[1], unittest.equals('foo'));
1210 }
1211
1212 core.int buildCounterPySparkJob = 0;
1213 buildPySparkJob() {
1214 var o = new api.PySparkJob();
1215 buildCounterPySparkJob++;
1216 if (buildCounterPySparkJob < 3) {
1217 o.archiveUris = buildUnnamed858();
1218 o.args = buildUnnamed859();
1219 o.fileUris = buildUnnamed860();
1220 o.jarFileUris = buildUnnamed861();
1221 o.loggingConfig = buildLoggingConfig();
1222 o.mainPythonFileUri = "foo";
1223 o.properties = buildUnnamed862();
1224 o.pythonFileUris = buildUnnamed863();
1225 }
1226 buildCounterPySparkJob--;
1227 return o;
1228 }
1229
1230 checkPySparkJob(api.PySparkJob o) {
1231 buildCounterPySparkJob++;
1232 if (buildCounterPySparkJob < 3) {
1233 checkUnnamed858(o.archiveUris);
1234 checkUnnamed859(o.args);
1235 checkUnnamed860(o.fileUris);
1236 checkUnnamed861(o.jarFileUris);
1237 checkLoggingConfig(o.loggingConfig);
1238 unittest.expect(o.mainPythonFileUri, unittest.equals('foo'));
1239 checkUnnamed862(o.properties);
1240 checkUnnamed863(o.pythonFileUris);
1241 }
1242 buildCounterPySparkJob--;
1243 }
1244
1245 buildUnnamed864() {
1246 var o = new core.List<core.String>();
1247 o.add("foo");
1248 o.add("foo");
1249 return o;
1250 }
1251
1252 checkUnnamed864(core.List<core.String> o) {
1253 unittest.expect(o, unittest.hasLength(2));
1254 unittest.expect(o[0], unittest.equals('foo'));
1255 unittest.expect(o[1], unittest.equals('foo'));
1256 }
1257
1258 core.int buildCounterQueryList = 0;
1259 buildQueryList() {
1260 var o = new api.QueryList();
1261 buildCounterQueryList++;
1262 if (buildCounterQueryList < 3) {
1263 o.queries = buildUnnamed864();
1264 }
1265 buildCounterQueryList--;
1266 return o;
1267 }
1268
1269 checkQueryList(api.QueryList o) {
1270 buildCounterQueryList++;
1271 if (buildCounterQueryList < 3) {
1272 checkUnnamed864(o.queries);
1273 }
1274 buildCounterQueryList--;
1275 }
1276
1277 buildUnnamed865() {
1278 var o = new core.Map<core.String, core.String>();
1279 o["x"] = "foo";
1280 o["y"] = "foo";
1281 return o;
1282 }
1283
1284 checkUnnamed865(core.Map<core.String, core.String> o) {
1285 unittest.expect(o, unittest.hasLength(2));
1286 unittest.expect(o["x"], unittest.equals('foo'));
1287 unittest.expect(o["y"], unittest.equals('foo'));
1288 }
1289
1290 core.int buildCounterSoftwareConfig = 0;
1291 buildSoftwareConfig() {
1292 var o = new api.SoftwareConfig();
1293 buildCounterSoftwareConfig++;
1294 if (buildCounterSoftwareConfig < 3) {
1295 o.imageVersion = "foo";
1296 o.properties = buildUnnamed865();
1297 }
1298 buildCounterSoftwareConfig--;
1299 return o;
1300 }
1301
1302 checkSoftwareConfig(api.SoftwareConfig o) {
1303 buildCounterSoftwareConfig++;
1304 if (buildCounterSoftwareConfig < 3) {
1305 unittest.expect(o.imageVersion, unittest.equals('foo'));
1306 checkUnnamed865(o.properties);
1307 }
1308 buildCounterSoftwareConfig--;
1309 }
1310
1311 buildUnnamed866() {
1312 var o = new core.List<core.String>();
1313 o.add("foo");
1314 o.add("foo");
1315 return o;
1316 }
1317
1318 checkUnnamed866(core.List<core.String> o) {
1319 unittest.expect(o, unittest.hasLength(2));
1320 unittest.expect(o[0], unittest.equals('foo'));
1321 unittest.expect(o[1], unittest.equals('foo'));
1322 }
1323
1324 buildUnnamed867() {
1325 var o = new core.List<core.String>();
1326 o.add("foo");
1327 o.add("foo");
1328 return o;
1329 }
1330
1331 checkUnnamed867(core.List<core.String> o) {
1332 unittest.expect(o, unittest.hasLength(2));
1333 unittest.expect(o[0], unittest.equals('foo'));
1334 unittest.expect(o[1], unittest.equals('foo'));
1335 }
1336
1337 buildUnnamed868() {
1338 var o = new core.List<core.String>();
1339 o.add("foo");
1340 o.add("foo");
1341 return o;
1342 }
1343
1344 checkUnnamed868(core.List<core.String> o) {
1345 unittest.expect(o, unittest.hasLength(2));
1346 unittest.expect(o[0], unittest.equals('foo'));
1347 unittest.expect(o[1], unittest.equals('foo'));
1348 }
1349
1350 buildUnnamed869() {
1351 var o = new core.List<core.String>();
1352 o.add("foo");
1353 o.add("foo");
1354 return o;
1355 }
1356
1357 checkUnnamed869(core.List<core.String> o) {
1358 unittest.expect(o, unittest.hasLength(2));
1359 unittest.expect(o[0], unittest.equals('foo'));
1360 unittest.expect(o[1], unittest.equals('foo'));
1361 }
1362
1363 buildUnnamed870() {
1364 var o = new core.Map<core.String, core.String>();
1365 o["x"] = "foo";
1366 o["y"] = "foo";
1367 return o;
1368 }
1369
1370 checkUnnamed870(core.Map<core.String, core.String> o) {
1371 unittest.expect(o, unittest.hasLength(2));
1372 unittest.expect(o["x"], unittest.equals('foo'));
1373 unittest.expect(o["y"], unittest.equals('foo'));
1374 }
1375
1376 core.int buildCounterSparkJob = 0;
1377 buildSparkJob() {
1378 var o = new api.SparkJob();
1379 buildCounterSparkJob++;
1380 if (buildCounterSparkJob < 3) {
1381 o.archiveUris = buildUnnamed866();
1382 o.args = buildUnnamed867();
1383 o.fileUris = buildUnnamed868();
1384 o.jarFileUris = buildUnnamed869();
1385 o.loggingConfig = buildLoggingConfig();
1386 o.mainClass = "foo";
1387 o.mainJarFileUri = "foo";
1388 o.properties = buildUnnamed870();
1389 }
1390 buildCounterSparkJob--;
1391 return o;
1392 }
1393
1394 checkSparkJob(api.SparkJob o) {
1395 buildCounterSparkJob++;
1396 if (buildCounterSparkJob < 3) {
1397 checkUnnamed866(o.archiveUris);
1398 checkUnnamed867(o.args);
1399 checkUnnamed868(o.fileUris);
1400 checkUnnamed869(o.jarFileUris);
1401 checkLoggingConfig(o.loggingConfig);
1402 unittest.expect(o.mainClass, unittest.equals('foo'));
1403 unittest.expect(o.mainJarFileUri, unittest.equals('foo'));
1404 checkUnnamed870(o.properties);
1405 }
1406 buildCounterSparkJob--;
1407 }
1408
1409 buildUnnamed871() {
1410 var o = new core.List<core.String>();
1411 o.add("foo");
1412 o.add("foo");
1413 return o;
1414 }
1415
1416 checkUnnamed871(core.List<core.String> o) {
1417 unittest.expect(o, unittest.hasLength(2));
1418 unittest.expect(o[0], unittest.equals('foo'));
1419 unittest.expect(o[1], unittest.equals('foo'));
1420 }
1421
1422 buildUnnamed872() {
1423 var o = new core.Map<core.String, core.String>();
1424 o["x"] = "foo";
1425 o["y"] = "foo";
1426 return o;
1427 }
1428
1429 checkUnnamed872(core.Map<core.String, core.String> o) {
1430 unittest.expect(o, unittest.hasLength(2));
1431 unittest.expect(o["x"], unittest.equals('foo'));
1432 unittest.expect(o["y"], unittest.equals('foo'));
1433 }
1434
1435 buildUnnamed873() {
1436 var o = new core.Map<core.String, core.String>();
1437 o["x"] = "foo";
1438 o["y"] = "foo";
1439 return o;
1440 }
1441
1442 checkUnnamed873(core.Map<core.String, core.String> o) {
1443 unittest.expect(o, unittest.hasLength(2));
1444 unittest.expect(o["x"], unittest.equals('foo'));
1445 unittest.expect(o["y"], unittest.equals('foo'));
1446 }
1447
1448 core.int buildCounterSparkSqlJob = 0;
1449 buildSparkSqlJob() {
1450 var o = new api.SparkSqlJob();
1451 buildCounterSparkSqlJob++;
1452 if (buildCounterSparkSqlJob < 3) {
1453 o.jarFileUris = buildUnnamed871();
1454 o.loggingConfig = buildLoggingConfig();
1455 o.properties = buildUnnamed872();
1456 o.queryFileUri = "foo";
1457 o.queryList = buildQueryList();
1458 o.scriptVariables = buildUnnamed873();
1459 }
1460 buildCounterSparkSqlJob--;
1461 return o;
1462 }
1463
1464 checkSparkSqlJob(api.SparkSqlJob o) {
1465 buildCounterSparkSqlJob++;
1466 if (buildCounterSparkSqlJob < 3) {
1467 checkUnnamed871(o.jarFileUris);
1468 checkLoggingConfig(o.loggingConfig);
1469 checkUnnamed872(o.properties);
1470 unittest.expect(o.queryFileUri, unittest.equals('foo'));
1471 checkQueryList(o.queryList);
1472 checkUnnamed873(o.scriptVariables);
1473 }
1474 buildCounterSparkSqlJob--;
1475 }
1476
1477 buildUnnamed874() {
1478 var o = new core.Map<core.String, core.Object>();
1479 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1480 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1481 return o;
1482 }
1483
1484 checkUnnamed874(core.Map<core.String, core.Object> o) {
1485 unittest.expect(o, unittest.hasLength(2));
1486 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"], unittest.equals('foo'));
1487 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"], unittest.equals('foo'));
1488 }
1489
1490 buildUnnamed875() {
1491 var o = new core.List<core.Map<core.String, core.Object>>();
1492 o.add(buildUnnamed874());
1493 o.add(buildUnnamed874());
1494 return o;
1495 }
1496
1497 checkUnnamed875(core.List<core.Map<core.String, core.Object>> o) {
1498 unittest.expect(o, unittest.hasLength(2));
1499 checkUnnamed874(o[0]);
1500 checkUnnamed874(o[1]);
1501 }
1502
1503 core.int buildCounterStatus = 0;
1504 buildStatus() {
1505 var o = new api.Status();
1506 buildCounterStatus++;
1507 if (buildCounterStatus < 3) {
1508 o.code = 42;
1509 o.details = buildUnnamed875();
1510 o.message = "foo";
1511 }
1512 buildCounterStatus--;
1513 return o;
1514 }
1515
1516 checkStatus(api.Status o) {
1517 buildCounterStatus++;
1518 if (buildCounterStatus < 3) {
1519 unittest.expect(o.code, unittest.equals(42));
1520 checkUnnamed875(o.details);
1521 unittest.expect(o.message, unittest.equals('foo'));
1522 }
1523 buildCounterStatus--;
1524 }
1525
1526 core.int buildCounterSubmitJobRequest = 0;
1527 buildSubmitJobRequest() {
1528 var o = new api.SubmitJobRequest();
1529 buildCounterSubmitJobRequest++;
1530 if (buildCounterSubmitJobRequest < 3) {
1531 o.job = buildJob();
1532 }
1533 buildCounterSubmitJobRequest--;
1534 return o;
1535 }
1536
1537 checkSubmitJobRequest(api.SubmitJobRequest o) {
1538 buildCounterSubmitJobRequest++;
1539 if (buildCounterSubmitJobRequest < 3) {
1540 checkJob(o.job);
1541 }
1542 buildCounterSubmitJobRequest--;
1543 }
1544
167 1545
168 main() { 1546 main() {
1547 unittest.group("obj-schema-CancelJobRequest", () {
1548 unittest.test("to-json--from-json", () {
1549 var o = buildCancelJobRequest();
1550 var od = new api.CancelJobRequest.fromJson(o.toJson());
1551 checkCancelJobRequest(od);
1552 });
1553 });
1554
1555
1556 unittest.group("obj-schema-Cluster", () {
1557 unittest.test("to-json--from-json", () {
1558 var o = buildCluster();
1559 var od = new api.Cluster.fromJson(o.toJson());
1560 checkCluster(od);
1561 });
1562 });
1563
1564
1565 unittest.group("obj-schema-ClusterConfig", () {
1566 unittest.test("to-json--from-json", () {
1567 var o = buildClusterConfig();
1568 var od = new api.ClusterConfig.fromJson(o.toJson());
1569 checkClusterConfig(od);
1570 });
1571 });
1572
1573
1574 unittest.group("obj-schema-ClusterOperationMetadata", () {
1575 unittest.test("to-json--from-json", () {
1576 var o = buildClusterOperationMetadata();
1577 var od = new api.ClusterOperationMetadata.fromJson(o.toJson());
1578 checkClusterOperationMetadata(od);
1579 });
1580 });
1581
1582
1583 unittest.group("obj-schema-ClusterOperationStatus", () {
1584 unittest.test("to-json--from-json", () {
1585 var o = buildClusterOperationStatus();
1586 var od = new api.ClusterOperationStatus.fromJson(o.toJson());
1587 checkClusterOperationStatus(od);
1588 });
1589 });
1590
1591
1592 unittest.group("obj-schema-ClusterStatus", () {
1593 unittest.test("to-json--from-json", () {
1594 var o = buildClusterStatus();
1595 var od = new api.ClusterStatus.fromJson(o.toJson());
1596 checkClusterStatus(od);
1597 });
1598 });
1599
1600
169 unittest.group("obj-schema-DiagnoseClusterOutputLocation", () { 1601 unittest.group("obj-schema-DiagnoseClusterOutputLocation", () {
170 unittest.test("to-json--from-json", () { 1602 unittest.test("to-json--from-json", () {
171 var o = buildDiagnoseClusterOutputLocation(); 1603 var o = buildDiagnoseClusterOutputLocation();
172 var od = new api.DiagnoseClusterOutputLocation.fromJson(o.toJson()); 1604 var od = new api.DiagnoseClusterOutputLocation.fromJson(o.toJson());
173 checkDiagnoseClusterOutputLocation(od); 1605 checkDiagnoseClusterOutputLocation(od);
174 }); 1606 });
175 }); 1607 });
176 1608
177 1609
1610 unittest.group("obj-schema-DiagnoseClusterRequest", () {
1611 unittest.test("to-json--from-json", () {
1612 var o = buildDiagnoseClusterRequest();
1613 var od = new api.DiagnoseClusterRequest.fromJson(o.toJson());
1614 checkDiagnoseClusterRequest(od);
1615 });
1616 });
1617
1618
1619 unittest.group("obj-schema-DiagnoseClusterResults", () {
1620 unittest.test("to-json--from-json", () {
1621 var o = buildDiagnoseClusterResults();
1622 var od = new api.DiagnoseClusterResults.fromJson(o.toJson());
1623 checkDiagnoseClusterResults(od);
1624 });
1625 });
1626
1627
1628 unittest.group("obj-schema-DiskConfig", () {
1629 unittest.test("to-json--from-json", () {
1630 var o = buildDiskConfig();
1631 var od = new api.DiskConfig.fromJson(o.toJson());
1632 checkDiskConfig(od);
1633 });
1634 });
1635
1636
1637 unittest.group("obj-schema-Empty", () {
1638 unittest.test("to-json--from-json", () {
1639 var o = buildEmpty();
1640 var od = new api.Empty.fromJson(o.toJson());
1641 checkEmpty(od);
1642 });
1643 });
1644
1645
1646 unittest.group("obj-schema-GceClusterConfig", () {
1647 unittest.test("to-json--from-json", () {
1648 var o = buildGceClusterConfig();
1649 var od = new api.GceClusterConfig.fromJson(o.toJson());
1650 checkGceClusterConfig(od);
1651 });
1652 });
1653
1654
1655 unittest.group("obj-schema-HadoopJob", () {
1656 unittest.test("to-json--from-json", () {
1657 var o = buildHadoopJob();
1658 var od = new api.HadoopJob.fromJson(o.toJson());
1659 checkHadoopJob(od);
1660 });
1661 });
1662
1663
1664 unittest.group("obj-schema-HiveJob", () {
1665 unittest.test("to-json--from-json", () {
1666 var o = buildHiveJob();
1667 var od = new api.HiveJob.fromJson(o.toJson());
1668 checkHiveJob(od);
1669 });
1670 });
1671
1672
1673 unittest.group("obj-schema-InstanceGroupConfig", () {
1674 unittest.test("to-json--from-json", () {
1675 var o = buildInstanceGroupConfig();
1676 var od = new api.InstanceGroupConfig.fromJson(o.toJson());
1677 checkInstanceGroupConfig(od);
1678 });
1679 });
1680
1681
1682 unittest.group("obj-schema-Job", () {
1683 unittest.test("to-json--from-json", () {
1684 var o = buildJob();
1685 var od = new api.Job.fromJson(o.toJson());
1686 checkJob(od);
1687 });
1688 });
1689
1690
1691 unittest.group("obj-schema-JobPlacement", () {
1692 unittest.test("to-json--from-json", () {
1693 var o = buildJobPlacement();
1694 var od = new api.JobPlacement.fromJson(o.toJson());
1695 checkJobPlacement(od);
1696 });
1697 });
1698
1699
1700 unittest.group("obj-schema-JobReference", () {
1701 unittest.test("to-json--from-json", () {
1702 var o = buildJobReference();
1703 var od = new api.JobReference.fromJson(o.toJson());
1704 checkJobReference(od);
1705 });
1706 });
1707
1708
1709 unittest.group("obj-schema-JobStatus", () {
1710 unittest.test("to-json--from-json", () {
1711 var o = buildJobStatus();
1712 var od = new api.JobStatus.fromJson(o.toJson());
1713 checkJobStatus(od);
1714 });
1715 });
1716
1717
1718 unittest.group("obj-schema-ListClustersResponse", () {
1719 unittest.test("to-json--from-json", () {
1720 var o = buildListClustersResponse();
1721 var od = new api.ListClustersResponse.fromJson(o.toJson());
1722 checkListClustersResponse(od);
1723 });
1724 });
1725
1726
1727 unittest.group("obj-schema-ListJobsResponse", () {
1728 unittest.test("to-json--from-json", () {
1729 var o = buildListJobsResponse();
1730 var od = new api.ListJobsResponse.fromJson(o.toJson());
1731 checkListJobsResponse(od);
1732 });
1733 });
1734
1735
1736 unittest.group("obj-schema-ListOperationsResponse", () {
1737 unittest.test("to-json--from-json", () {
1738 var o = buildListOperationsResponse();
1739 var od = new api.ListOperationsResponse.fromJson(o.toJson());
1740 checkListOperationsResponse(od);
1741 });
1742 });
1743
1744
1745 unittest.group("obj-schema-LoggingConfig", () {
1746 unittest.test("to-json--from-json", () {
1747 var o = buildLoggingConfig();
1748 var od = new api.LoggingConfig.fromJson(o.toJson());
1749 checkLoggingConfig(od);
1750 });
1751 });
1752
1753
1754 unittest.group("obj-schema-ManagedGroupConfig", () {
1755 unittest.test("to-json--from-json", () {
1756 var o = buildManagedGroupConfig();
1757 var od = new api.ManagedGroupConfig.fromJson(o.toJson());
1758 checkManagedGroupConfig(od);
1759 });
1760 });
1761
1762
178 unittest.group("obj-schema-Media", () { 1763 unittest.group("obj-schema-Media", () {
179 unittest.test("to-json--from-json", () { 1764 unittest.test("to-json--from-json", () {
180 var o = buildMedia(); 1765 var o = buildMedia();
181 var od = new api.Media.fromJson(o.toJson()); 1766 var od = new api.Media.fromJson(o.toJson());
182 checkMedia(od); 1767 checkMedia(od);
183 }); 1768 });
184 }); 1769 });
185 1770
186 1771
1772 unittest.group("obj-schema-NodeInitializationAction", () {
1773 unittest.test("to-json--from-json", () {
1774 var o = buildNodeInitializationAction();
1775 var od = new api.NodeInitializationAction.fromJson(o.toJson());
1776 checkNodeInitializationAction(od);
1777 });
1778 });
1779
1780
1781 unittest.group("obj-schema-Operation", () {
1782 unittest.test("to-json--from-json", () {
1783 var o = buildOperation();
1784 var od = new api.Operation.fromJson(o.toJson());
1785 checkOperation(od);
1786 });
1787 });
1788
1789
187 unittest.group("obj-schema-OperationMetadata", () { 1790 unittest.group("obj-schema-OperationMetadata", () {
188 unittest.test("to-json--from-json", () { 1791 unittest.test("to-json--from-json", () {
189 var o = buildOperationMetadata(); 1792 var o = buildOperationMetadata();
190 var od = new api.OperationMetadata.fromJson(o.toJson()); 1793 var od = new api.OperationMetadata.fromJson(o.toJson());
191 checkOperationMetadata(od); 1794 checkOperationMetadata(od);
192 }); 1795 });
193 }); 1796 });
194 1797
195 1798
196 unittest.group("obj-schema-OperationStatus", () { 1799 unittest.group("obj-schema-OperationStatus", () {
197 unittest.test("to-json--from-json", () { 1800 unittest.test("to-json--from-json", () {
198 var o = buildOperationStatus(); 1801 var o = buildOperationStatus();
199 var od = new api.OperationStatus.fromJson(o.toJson()); 1802 var od = new api.OperationStatus.fromJson(o.toJson());
200 checkOperationStatus(od); 1803 checkOperationStatus(od);
201 }); 1804 });
202 }); 1805 });
203 1806
204 1807
1808 unittest.group("obj-schema-PigJob", () {
1809 unittest.test("to-json--from-json", () {
1810 var o = buildPigJob();
1811 var od = new api.PigJob.fromJson(o.toJson());
1812 checkPigJob(od);
1813 });
1814 });
1815
1816
1817 unittest.group("obj-schema-PySparkJob", () {
1818 unittest.test("to-json--from-json", () {
1819 var o = buildPySparkJob();
1820 var od = new api.PySparkJob.fromJson(o.toJson());
1821 checkPySparkJob(od);
1822 });
1823 });
1824
1825
1826 unittest.group("obj-schema-QueryList", () {
1827 unittest.test("to-json--from-json", () {
1828 var o = buildQueryList();
1829 var od = new api.QueryList.fromJson(o.toJson());
1830 checkQueryList(od);
1831 });
1832 });
1833
1834
1835 unittest.group("obj-schema-SoftwareConfig", () {
1836 unittest.test("to-json--from-json", () {
1837 var o = buildSoftwareConfig();
1838 var od = new api.SoftwareConfig.fromJson(o.toJson());
1839 checkSoftwareConfig(od);
1840 });
1841 });
1842
1843
1844 unittest.group("obj-schema-SparkJob", () {
1845 unittest.test("to-json--from-json", () {
1846 var o = buildSparkJob();
1847 var od = new api.SparkJob.fromJson(o.toJson());
1848 checkSparkJob(od);
1849 });
1850 });
1851
1852
1853 unittest.group("obj-schema-SparkSqlJob", () {
1854 unittest.test("to-json--from-json", () {
1855 var o = buildSparkSqlJob();
1856 var od = new api.SparkSqlJob.fromJson(o.toJson());
1857 checkSparkSqlJob(od);
1858 });
1859 });
1860
1861
1862 unittest.group("obj-schema-Status", () {
1863 unittest.test("to-json--from-json", () {
1864 var o = buildStatus();
1865 var od = new api.Status.fromJson(o.toJson());
1866 checkStatus(od);
1867 });
1868 });
1869
1870
1871 unittest.group("obj-schema-SubmitJobRequest", () {
1872 unittest.test("to-json--from-json", () {
1873 var o = buildSubmitJobRequest();
1874 var od = new api.SubmitJobRequest.fromJson(o.toJson());
1875 checkSubmitJobRequest(od);
1876 });
1877 });
1878
1879
205 unittest.group("resource-MediaResourceApi", () { 1880 unittest.group("resource-MediaResourceApi", () {
206 unittest.test("method--download", () { 1881 unittest.test("method--download", () {
207 // TODO: Implement tests for media upload; 1882 // TODO: Implement tests for media upload;
208 // TODO: Implement tests for media download; 1883 // TODO: Implement tests for media download;
209 1884
210 var mock = new HttpServerMock(); 1885 var mock = new HttpServerMock();
211 api.MediaResourceApi res = new api.DataprocApi(mock).media; 1886 api.MediaResourceApi res = new api.DataprocApi(mock).media;
212 var arg_resourceName = "foo"; 1887 var arg_resourceName = "foo";
213 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 1888 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
214 var path = (req.url).path; 1889 var path = (req.url).path;
215 var pathOffset = 0; 1890 var pathOffset = 0;
1891 var index;
1892 var subPart;
1893 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1894 pathOffset += 1;
1895 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("v1/media/"));
1896 pathOffset += 9;
1897 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1898
1899 var query = (req.url).query;
1900 var queryOffset = 0;
1901 var queryMap = {};
1902 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1903 parseBool(n) {
1904 if (n == "true") return true;
1905 if (n == "false") return false;
1906 if (n == null) return null;
1907 throw new core.ArgumentError("Invalid boolean: $n");
1908 }
1909 if (query.length > 0) {
1910 for (var part in query.split("&")) {
1911 var keyvalue = part.split("=");
1912 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1913 }
1914 }
1915
1916
1917 var h = {
1918 "content-type" : "application/json; charset=utf-8",
1919 };
1920 var resp = convert.JSON.encode(buildMedia());
1921 return new async.Future.value(stringResponse(200, h, resp));
1922 }), true);
1923 res.download(arg_resourceName).then(unittest.expectAsync(((api.Media respo nse) {
1924 checkMedia(response);
1925 })));
1926 });
1927
1928 unittest.test("method--upload", () {
1929 // TODO: Implement tests for media upload;
1930 // TODO: Implement tests for media download;
1931
1932 var mock = new HttpServerMock();
1933 api.MediaResourceApi res = new api.DataprocApi(mock).media;
1934 var arg_request = buildMedia();
1935 var arg_resourceName = "foo";
1936 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1937 var obj = new api.Media.fromJson(json);
1938 checkMedia(obj);
1939
1940 var path = (req.url).path;
1941 var pathOffset = 0;
1942 var index;
1943 var subPart;
1944 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1945 pathOffset += 1;
1946 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("v1/media/"));
1947 pathOffset += 9;
1948 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1949
1950 var query = (req.url).query;
1951 var queryOffset = 0;
1952 var queryMap = {};
1953 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1954 parseBool(n) {
1955 if (n == "true") return true;
1956 if (n == "false") return false;
1957 if (n == null) return null;
1958 throw new core.ArgumentError("Invalid boolean: $n");
1959 }
1960 if (query.length > 0) {
1961 for (var part in query.split("&")) {
1962 var keyvalue = part.split("=");
1963 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1964 }
1965 }
1966
1967
1968 var h = {
1969 "content-type" : "application/json; charset=utf-8",
1970 };
1971 var resp = convert.JSON.encode(buildMedia());
1972 return new async.Future.value(stringResponse(200, h, resp));
1973 }), true);
1974 res.upload(arg_request, arg_resourceName).then(unittest.expectAsync(((api. Media response) {
1975 checkMedia(response);
1976 })));
1977 });
1978
1979 });
1980
1981
1982 unittest.group("resource-ProjectsRegionsClustersResourceApi", () {
1983 unittest.test("method--create", () {
1984
1985 var mock = new HttpServerMock();
1986 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro jects.regions.clusters;
1987 var arg_request = buildCluster();
1988 var arg_projectId = "foo";
1989 var arg_region = "foo";
1990 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1991 var obj = new api.Cluster.fromJson(json);
1992 checkCluster(obj);
1993
1994 var path = (req.url).path;
1995 var pathOffset = 0;
1996 var index;
1997 var subPart;
1998 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1999 pathOffset += 1;
2000 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2001 pathOffset += 12;
2002 index = path.indexOf("/regions/", pathOffset);
2003 unittest.expect(index >= 0, unittest.isTrue);
2004 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2005 pathOffset = index;
2006 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2007 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2008 pathOffset += 9;
2009 index = path.indexOf("/clusters", pathOffset);
2010 unittest.expect(index >= 0, unittest.isTrue);
2011 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2012 pathOffset = index;
2013 unittest.expect(subPart, unittest.equals("$arg_region"));
2014 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/clusters"));
2015 pathOffset += 9;
2016
2017 var query = (req.url).query;
2018 var queryOffset = 0;
2019 var queryMap = {};
2020 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2021 parseBool(n) {
2022 if (n == "true") return true;
2023 if (n == "false") return false;
2024 if (n == null) return null;
2025 throw new core.ArgumentError("Invalid boolean: $n");
2026 }
2027 if (query.length > 0) {
2028 for (var part in query.split("&")) {
2029 var keyvalue = part.split("=");
2030 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2031 }
2032 }
2033
2034
2035 var h = {
2036 "content-type" : "application/json; charset=utf-8",
2037 };
2038 var resp = convert.JSON.encode(buildOperation());
2039 return new async.Future.value(stringResponse(200, h, resp));
2040 }), true);
2041 res.create(arg_request, arg_projectId, arg_region).then(unittest.expectAsy nc(((api.Operation response) {
2042 checkOperation(response);
2043 })));
2044 });
2045
2046 unittest.test("method--delete", () {
2047
2048 var mock = new HttpServerMock();
2049 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro jects.regions.clusters;
2050 var arg_projectId = "foo";
2051 var arg_region = "foo";
2052 var arg_clusterName = "foo";
2053 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2054 var path = (req.url).path;
2055 var pathOffset = 0;
2056 var index;
2057 var subPart;
2058 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2059 pathOffset += 1;
2060 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2061 pathOffset += 12;
2062 index = path.indexOf("/regions/", pathOffset);
2063 unittest.expect(index >= 0, unittest.isTrue);
2064 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2065 pathOffset = index;
2066 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2067 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2068 pathOffset += 9;
2069 index = path.indexOf("/clusters/", pathOffset);
2070 unittest.expect(index >= 0, unittest.isTrue);
2071 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2072 pathOffset = index;
2073 unittest.expect(subPart, unittest.equals("$arg_region"));
2074 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/clusters/"));
2075 pathOffset += 10;
2076 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2077 pathOffset = path.length;
2078 unittest.expect(subPart, unittest.equals("$arg_clusterName"));
2079
2080 var query = (req.url).query;
2081 var queryOffset = 0;
2082 var queryMap = {};
2083 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2084 parseBool(n) {
2085 if (n == "true") return true;
2086 if (n == "false") return false;
2087 if (n == null) return null;
2088 throw new core.ArgumentError("Invalid boolean: $n");
2089 }
2090 if (query.length > 0) {
2091 for (var part in query.split("&")) {
2092 var keyvalue = part.split("=");
2093 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2094 }
2095 }
2096
2097
2098 var h = {
2099 "content-type" : "application/json; charset=utf-8",
2100 };
2101 var resp = convert.JSON.encode(buildOperation());
2102 return new async.Future.value(stringResponse(200, h, resp));
2103 }), true);
2104 res.delete(arg_projectId, arg_region, arg_clusterName).then(unittest.expec tAsync(((api.Operation response) {
2105 checkOperation(response);
2106 })));
2107 });
2108
2109 unittest.test("method--diagnose", () {
2110
2111 var mock = new HttpServerMock();
2112 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro jects.regions.clusters;
2113 var arg_request = buildDiagnoseClusterRequest();
2114 var arg_projectId = "foo";
2115 var arg_region = "foo";
2116 var arg_clusterName = "foo";
2117 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2118 var obj = new api.DiagnoseClusterRequest.fromJson(json);
2119 checkDiagnoseClusterRequest(obj);
2120
2121 var path = (req.url).path;
2122 var pathOffset = 0;
2123 var index;
2124 var subPart;
2125 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2126 pathOffset += 1;
2127 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2128 pathOffset += 12;
2129 index = path.indexOf("/regions/", pathOffset);
2130 unittest.expect(index >= 0, unittest.isTrue);
2131 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2132 pathOffset = index;
2133 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2134 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2135 pathOffset += 9;
2136 index = path.indexOf("/clusters/", pathOffset);
2137 unittest.expect(index >= 0, unittest.isTrue);
2138 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2139 pathOffset = index;
2140 unittest.expect(subPart, unittest.equals("$arg_region"));
2141 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/clusters/"));
2142 pathOffset += 10;
2143 index = path.indexOf(":diagnose", pathOffset);
2144 unittest.expect(index >= 0, unittest.isTrue);
2145 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2146 pathOffset = index;
2147 unittest.expect(subPart, unittest.equals("$arg_clusterName"));
2148 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als(":diagnose"));
2149 pathOffset += 9;
2150
2151 var query = (req.url).query;
2152 var queryOffset = 0;
2153 var queryMap = {};
2154 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2155 parseBool(n) {
2156 if (n == "true") return true;
2157 if (n == "false") return false;
2158 if (n == null) return null;
2159 throw new core.ArgumentError("Invalid boolean: $n");
2160 }
2161 if (query.length > 0) {
2162 for (var part in query.split("&")) {
2163 var keyvalue = part.split("=");
2164 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2165 }
2166 }
2167
2168
2169 var h = {
2170 "content-type" : "application/json; charset=utf-8",
2171 };
2172 var resp = convert.JSON.encode(buildOperation());
2173 return new async.Future.value(stringResponse(200, h, resp));
2174 }), true);
2175 res.diagnose(arg_request, arg_projectId, arg_region, arg_clusterName).then (unittest.expectAsync(((api.Operation response) {
2176 checkOperation(response);
2177 })));
2178 });
2179
2180 unittest.test("method--get", () {
2181
2182 var mock = new HttpServerMock();
2183 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro jects.regions.clusters;
2184 var arg_projectId = "foo";
2185 var arg_region = "foo";
2186 var arg_clusterName = "foo";
2187 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2188 var path = (req.url).path;
2189 var pathOffset = 0;
2190 var index;
2191 var subPart;
2192 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2193 pathOffset += 1;
2194 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2195 pathOffset += 12;
2196 index = path.indexOf("/regions/", pathOffset);
2197 unittest.expect(index >= 0, unittest.isTrue);
2198 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2199 pathOffset = index;
2200 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2201 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2202 pathOffset += 9;
2203 index = path.indexOf("/clusters/", pathOffset);
2204 unittest.expect(index >= 0, unittest.isTrue);
2205 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2206 pathOffset = index;
2207 unittest.expect(subPart, unittest.equals("$arg_region"));
2208 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/clusters/"));
2209 pathOffset += 10;
2210 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2211 pathOffset = path.length;
2212 unittest.expect(subPart, unittest.equals("$arg_clusterName"));
2213
2214 var query = (req.url).query;
2215 var queryOffset = 0;
2216 var queryMap = {};
2217 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2218 parseBool(n) {
2219 if (n == "true") return true;
2220 if (n == "false") return false;
2221 if (n == null) return null;
2222 throw new core.ArgumentError("Invalid boolean: $n");
2223 }
2224 if (query.length > 0) {
2225 for (var part in query.split("&")) {
2226 var keyvalue = part.split("=");
2227 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2228 }
2229 }
2230
2231
2232 var h = {
2233 "content-type" : "application/json; charset=utf-8",
2234 };
2235 var resp = convert.JSON.encode(buildCluster());
2236 return new async.Future.value(stringResponse(200, h, resp));
2237 }), true);
2238 res.get(arg_projectId, arg_region, arg_clusterName).then(unittest.expectAs ync(((api.Cluster response) {
2239 checkCluster(response);
2240 })));
2241 });
2242
2243 unittest.test("method--list", () {
2244
2245 var mock = new HttpServerMock();
2246 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro jects.regions.clusters;
2247 var arg_projectId = "foo";
2248 var arg_region = "foo";
2249 var arg_pageSize = 42;
2250 var arg_pageToken = "foo";
2251 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2252 var path = (req.url).path;
2253 var pathOffset = 0;
2254 var index;
2255 var subPart;
2256 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2257 pathOffset += 1;
2258 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2259 pathOffset += 12;
2260 index = path.indexOf("/regions/", pathOffset);
2261 unittest.expect(index >= 0, unittest.isTrue);
2262 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2263 pathOffset = index;
2264 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2265 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2266 pathOffset += 9;
2267 index = path.indexOf("/clusters", pathOffset);
2268 unittest.expect(index >= 0, unittest.isTrue);
2269 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2270 pathOffset = index;
2271 unittest.expect(subPart, unittest.equals("$arg_region"));
2272 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/clusters"));
2273 pathOffset += 9;
2274
2275 var query = (req.url).query;
2276 var queryOffset = 0;
2277 var queryMap = {};
2278 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2279 parseBool(n) {
2280 if (n == "true") return true;
2281 if (n == "false") return false;
2282 if (n == null) return null;
2283 throw new core.ArgumentError("Invalid boolean: $n");
2284 }
2285 if (query.length > 0) {
2286 for (var part in query.split("&")) {
2287 var keyvalue = part.split("=");
2288 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2289 }
2290 }
2291 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2292 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2293
2294
2295 var h = {
2296 "content-type" : "application/json; charset=utf-8",
2297 };
2298 var resp = convert.JSON.encode(buildListClustersResponse());
2299 return new async.Future.value(stringResponse(200, h, resp));
2300 }), true);
2301 res.list(arg_projectId, arg_region, pageSize: arg_pageSize, pageToken: arg _pageToken).then(unittest.expectAsync(((api.ListClustersResponse response) {
2302 checkListClustersResponse(response);
2303 })));
2304 });
2305
2306 unittest.test("method--patch", () {
2307
2308 var mock = new HttpServerMock();
2309 api.ProjectsRegionsClustersResourceApi res = new api.DataprocApi(mock).pro jects.regions.clusters;
2310 var arg_request = buildCluster();
2311 var arg_projectId = "foo";
2312 var arg_region = "foo";
2313 var arg_clusterName = "foo";
2314 var arg_updateMask = "foo";
2315 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2316 var obj = new api.Cluster.fromJson(json);
2317 checkCluster(obj);
2318
2319 var path = (req.url).path;
2320 var pathOffset = 0;
2321 var index;
2322 var subPart;
2323 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2324 pathOffset += 1;
2325 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2326 pathOffset += 12;
2327 index = path.indexOf("/regions/", pathOffset);
2328 unittest.expect(index >= 0, unittest.isTrue);
2329 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2330 pathOffset = index;
2331 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2332 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2333 pathOffset += 9;
2334 index = path.indexOf("/clusters/", pathOffset);
2335 unittest.expect(index >= 0, unittest.isTrue);
2336 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2337 pathOffset = index;
2338 unittest.expect(subPart, unittest.equals("$arg_region"));
2339 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/clusters/"));
2340 pathOffset += 10;
2341 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2342 pathOffset = path.length;
2343 unittest.expect(subPart, unittest.equals("$arg_clusterName"));
2344
2345 var query = (req.url).query;
2346 var queryOffset = 0;
2347 var queryMap = {};
2348 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2349 parseBool(n) {
2350 if (n == "true") return true;
2351 if (n == "false") return false;
2352 if (n == null) return null;
2353 throw new core.ArgumentError("Invalid boolean: $n");
2354 }
2355 if (query.length > 0) {
2356 for (var part in query.split("&")) {
2357 var keyvalue = part.split("=");
2358 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2359 }
2360 }
2361 unittest.expect(queryMap["updateMask"].first, unittest.equals(arg_update Mask));
2362
2363
2364 var h = {
2365 "content-type" : "application/json; charset=utf-8",
2366 };
2367 var resp = convert.JSON.encode(buildOperation());
2368 return new async.Future.value(stringResponse(200, h, resp));
2369 }), true);
2370 res.patch(arg_request, arg_projectId, arg_region, arg_clusterName, updateM ask: arg_updateMask).then(unittest.expectAsync(((api.Operation response) {
2371 checkOperation(response);
2372 })));
2373 });
2374
2375 });
2376
2377
2378 unittest.group("resource-ProjectsRegionsJobsResourceApi", () {
2379 unittest.test("method--cancel", () {
2380
2381 var mock = new HttpServerMock();
2382 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project s.regions.jobs;
2383 var arg_request = buildCancelJobRequest();
2384 var arg_projectId = "foo";
2385 var arg_region = "foo";
2386 var arg_jobId = "foo";
2387 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2388 var obj = new api.CancelJobRequest.fromJson(json);
2389 checkCancelJobRequest(obj);
2390
2391 var path = (req.url).path;
2392 var pathOffset = 0;
2393 var index;
2394 var subPart;
2395 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2396 pathOffset += 1;
2397 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2398 pathOffset += 12;
2399 index = path.indexOf("/regions/", pathOffset);
2400 unittest.expect(index >= 0, unittest.isTrue);
2401 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2402 pathOffset = index;
2403 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2404 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2405 pathOffset += 9;
2406 index = path.indexOf("/jobs/", pathOffset);
2407 unittest.expect(index >= 0, unittest.isTrue);
2408 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2409 pathOffset = index;
2410 unittest.expect(subPart, unittest.equals("$arg_region"));
2411 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
2412 pathOffset += 6;
2413 index = path.indexOf(":cancel", pathOffset);
2414 unittest.expect(index >= 0, unittest.isTrue);
2415 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2416 pathOffset = index;
2417 unittest.expect(subPart, unittest.equals("$arg_jobId"));
2418 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als(":cancel"));
2419 pathOffset += 7;
2420
2421 var query = (req.url).query;
2422 var queryOffset = 0;
2423 var queryMap = {};
2424 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2425 parseBool(n) {
2426 if (n == "true") return true;
2427 if (n == "false") return false;
2428 if (n == null) return null;
2429 throw new core.ArgumentError("Invalid boolean: $n");
2430 }
2431 if (query.length > 0) {
2432 for (var part in query.split("&")) {
2433 var keyvalue = part.split("=");
2434 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2435 }
2436 }
2437
2438
2439 var h = {
2440 "content-type" : "application/json; charset=utf-8",
2441 };
2442 var resp = convert.JSON.encode(buildJob());
2443 return new async.Future.value(stringResponse(200, h, resp));
2444 }), true);
2445 res.cancel(arg_request, arg_projectId, arg_region, arg_jobId).then(unittes t.expectAsync(((api.Job response) {
2446 checkJob(response);
2447 })));
2448 });
2449
2450 unittest.test("method--delete", () {
2451
2452 var mock = new HttpServerMock();
2453 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project s.regions.jobs;
2454 var arg_projectId = "foo";
2455 var arg_region = "foo";
2456 var arg_jobId = "foo";
2457 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2458 var path = (req.url).path;
2459 var pathOffset = 0;
2460 var index;
2461 var subPart;
2462 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2463 pathOffset += 1;
2464 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2465 pathOffset += 12;
2466 index = path.indexOf("/regions/", pathOffset);
2467 unittest.expect(index >= 0, unittest.isTrue);
2468 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2469 pathOffset = index;
2470 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2471 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2472 pathOffset += 9;
2473 index = path.indexOf("/jobs/", pathOffset);
2474 unittest.expect(index >= 0, unittest.isTrue);
2475 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2476 pathOffset = index;
2477 unittest.expect(subPart, unittest.equals("$arg_region"));
2478 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
2479 pathOffset += 6;
2480 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2481 pathOffset = path.length;
2482 unittest.expect(subPart, unittest.equals("$arg_jobId"));
2483
2484 var query = (req.url).query;
2485 var queryOffset = 0;
2486 var queryMap = {};
2487 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2488 parseBool(n) {
2489 if (n == "true") return true;
2490 if (n == "false") return false;
2491 if (n == null) return null;
2492 throw new core.ArgumentError("Invalid boolean: $n");
2493 }
2494 if (query.length > 0) {
2495 for (var part in query.split("&")) {
2496 var keyvalue = part.split("=");
2497 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2498 }
2499 }
2500
2501
2502 var h = {
2503 "content-type" : "application/json; charset=utf-8",
2504 };
2505 var resp = convert.JSON.encode(buildEmpty());
2506 return new async.Future.value(stringResponse(200, h, resp));
2507 }), true);
2508 res.delete(arg_projectId, arg_region, arg_jobId).then(unittest.expectAsync (((api.Empty response) {
2509 checkEmpty(response);
2510 })));
2511 });
2512
2513 unittest.test("method--get", () {
2514
2515 var mock = new HttpServerMock();
2516 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project s.regions.jobs;
2517 var arg_projectId = "foo";
2518 var arg_region = "foo";
2519 var arg_jobId = "foo";
2520 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2521 var path = (req.url).path;
2522 var pathOffset = 0;
2523 var index;
2524 var subPart;
2525 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2526 pathOffset += 1;
2527 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2528 pathOffset += 12;
2529 index = path.indexOf("/regions/", pathOffset);
2530 unittest.expect(index >= 0, unittest.isTrue);
2531 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2532 pathOffset = index;
2533 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2534 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2535 pathOffset += 9;
2536 index = path.indexOf("/jobs/", pathOffset);
2537 unittest.expect(index >= 0, unittest.isTrue);
2538 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2539 pathOffset = index;
2540 unittest.expect(subPart, unittest.equals("$arg_region"));
2541 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
2542 pathOffset += 6;
2543 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2544 pathOffset = path.length;
2545 unittest.expect(subPart, unittest.equals("$arg_jobId"));
2546
2547 var query = (req.url).query;
2548 var queryOffset = 0;
2549 var queryMap = {};
2550 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2551 parseBool(n) {
2552 if (n == "true") return true;
2553 if (n == "false") return false;
2554 if (n == null) return null;
2555 throw new core.ArgumentError("Invalid boolean: $n");
2556 }
2557 if (query.length > 0) {
2558 for (var part in query.split("&")) {
2559 var keyvalue = part.split("=");
2560 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2561 }
2562 }
2563
2564
2565 var h = {
2566 "content-type" : "application/json; charset=utf-8",
2567 };
2568 var resp = convert.JSON.encode(buildJob());
2569 return new async.Future.value(stringResponse(200, h, resp));
2570 }), true);
2571 res.get(arg_projectId, arg_region, arg_jobId).then(unittest.expectAsync((( api.Job response) {
2572 checkJob(response);
2573 })));
2574 });
2575
2576 unittest.test("method--list", () {
2577
2578 var mock = new HttpServerMock();
2579 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project s.regions.jobs;
2580 var arg_projectId = "foo";
2581 var arg_region = "foo";
2582 var arg_pageSize = 42;
2583 var arg_pageToken = "foo";
2584 var arg_clusterName = "foo";
2585 var arg_jobStateMatcher = "foo";
2586 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2587 var path = (req.url).path;
2588 var pathOffset = 0;
2589 var index;
2590 var subPart;
2591 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2592 pathOffset += 1;
2593 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2594 pathOffset += 12;
2595 index = path.indexOf("/regions/", pathOffset);
2596 unittest.expect(index >= 0, unittest.isTrue);
2597 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2598 pathOffset = index;
2599 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2600 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2601 pathOffset += 9;
2602 index = path.indexOf("/jobs", pathOffset);
2603 unittest.expect(index >= 0, unittest.isTrue);
2604 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2605 pathOffset = index;
2606 unittest.expect(subPart, unittest.equals("$arg_region"));
2607 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("/jobs"));
2608 pathOffset += 5;
2609
2610 var query = (req.url).query;
2611 var queryOffset = 0;
2612 var queryMap = {};
2613 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2614 parseBool(n) {
2615 if (n == "true") return true;
2616 if (n == "false") return false;
2617 if (n == null) return null;
2618 throw new core.ArgumentError("Invalid boolean: $n");
2619 }
2620 if (query.length > 0) {
2621 for (var part in query.split("&")) {
2622 var keyvalue = part.split("=");
2623 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2624 }
2625 }
2626 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2627 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2628 unittest.expect(queryMap["clusterName"].first, unittest.equals(arg_clust erName));
2629 unittest.expect(queryMap["jobStateMatcher"].first, unittest.equals(arg_j obStateMatcher));
2630
2631
2632 var h = {
2633 "content-type" : "application/json; charset=utf-8",
2634 };
2635 var resp = convert.JSON.encode(buildListJobsResponse());
2636 return new async.Future.value(stringResponse(200, h, resp));
2637 }), true);
2638 res.list(arg_projectId, arg_region, pageSize: arg_pageSize, pageToken: arg _pageToken, clusterName: arg_clusterName, jobStateMatcher: arg_jobStateMatcher). then(unittest.expectAsync(((api.ListJobsResponse response) {
2639 checkListJobsResponse(response);
2640 })));
2641 });
2642
2643 unittest.test("method--submit", () {
2644
2645 var mock = new HttpServerMock();
2646 api.ProjectsRegionsJobsResourceApi res = new api.DataprocApi(mock).project s.regions.jobs;
2647 var arg_request = buildSubmitJobRequest();
2648 var arg_projectId = "foo";
2649 var arg_region = "foo";
2650 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2651 var obj = new api.SubmitJobRequest.fromJson(json);
2652 checkSubmitJobRequest(obj);
2653
2654 var path = (req.url).path;
2655 var pathOffset = 0;
2656 var index;
2657 var subPart;
2658 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2659 pathOffset += 1;
2660 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/"));
2661 pathOffset += 12;
2662 index = path.indexOf("/regions/", pathOffset);
2663 unittest.expect(index >= 0, unittest.isTrue);
2664 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2665 pathOffset = index;
2666 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2667 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/regions/"));
2668 pathOffset += 9;
2669 index = path.indexOf("/jobs:submit", pathOffset);
2670 unittest.expect(index >= 0, unittest.isTrue);
2671 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2672 pathOffset = index;
2673 unittest.expect(subPart, unittest.equals("$arg_region"));
2674 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/jobs:submit"));
2675 pathOffset += 12;
2676
2677 var query = (req.url).query;
2678 var queryOffset = 0;
2679 var queryMap = {};
2680 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2681 parseBool(n) {
2682 if (n == "true") return true;
2683 if (n == "false") return false;
2684 if (n == null) return null;
2685 throw new core.ArgumentError("Invalid boolean: $n");
2686 }
2687 if (query.length > 0) {
2688 for (var part in query.split("&")) {
2689 var keyvalue = part.split("=");
2690 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2691 }
2692 }
2693
2694
2695 var h = {
2696 "content-type" : "application/json; charset=utf-8",
2697 };
2698 var resp = convert.JSON.encode(buildJob());
2699 return new async.Future.value(stringResponse(200, h, resp));
2700 }), true);
2701 res.submit(arg_request, arg_projectId, arg_region).then(unittest.expectAsy nc(((api.Job response) {
2702 checkJob(response);
2703 })));
2704 });
2705
2706 });
2707
2708
2709 unittest.group("resource-ProjectsRegionsOperationsResourceApi", () {
2710 unittest.test("method--cancel", () {
2711
2712 var mock = new HttpServerMock();
2713 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p rojects.regions.operations;
2714 var arg_name = "foo";
2715 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2716 var path = (req.url).path;
2717 var pathOffset = 0;
2718 var index;
2719 var subPart;
2720 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2721 pathOffset += 1;
2722 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
2723 pathOffset += 3;
2724 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2725
2726 var query = (req.url).query;
2727 var queryOffset = 0;
2728 var queryMap = {};
2729 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2730 parseBool(n) {
2731 if (n == "true") return true;
2732 if (n == "false") return false;
2733 if (n == null) return null;
2734 throw new core.ArgumentError("Invalid boolean: $n");
2735 }
2736 if (query.length > 0) {
2737 for (var part in query.split("&")) {
2738 var keyvalue = part.split("=");
2739 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2740 }
2741 }
2742
2743
2744 var h = {
2745 "content-type" : "application/json; charset=utf-8",
2746 };
2747 var resp = convert.JSON.encode(buildEmpty());
2748 return new async.Future.value(stringResponse(200, h, resp));
2749 }), true);
2750 res.cancel(arg_name).then(unittest.expectAsync(((api.Empty response) {
2751 checkEmpty(response);
2752 })));
2753 });
2754
2755 unittest.test("method--delete", () {
2756
2757 var mock = new HttpServerMock();
2758 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p rojects.regions.operations;
2759 var arg_name = "foo";
2760 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2761 var path = (req.url).path;
2762 var pathOffset = 0;
216 var index; 2763 var index;
217 var subPart; 2764 var subPart;
218 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2765 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
219 pathOffset += 1; 2766 pathOffset += 1;
220 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("v1/media/")); 2767 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
221 pathOffset += 9; 2768 pathOffset += 3;
222 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2769 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
223 2770
224 var query = (req.url).query; 2771 var query = (req.url).query;
225 var queryOffset = 0; 2772 var queryOffset = 0;
226 var queryMap = {}; 2773 var queryMap = {};
227 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2774 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
228 parseBool(n) { 2775 parseBool(n) {
229 if (n == "true") return true; 2776 if (n == "true") return true;
230 if (n == "false") return false; 2777 if (n == "false") return false;
231 if (n == null) return null; 2778 if (n == null) return null;
232 throw new core.ArgumentError("Invalid boolean: $n"); 2779 throw new core.ArgumentError("Invalid boolean: $n");
233 } 2780 }
234 if (query.length > 0) { 2781 if (query.length > 0) {
235 for (var part in query.split("&")) { 2782 for (var part in query.split("&")) {
236 var keyvalue = part.split("="); 2783 var keyvalue = part.split("=");
237 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2784 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
238 } 2785 }
239 } 2786 }
240 2787
241 2788
242 var h = { 2789 var h = {
243 "content-type" : "application/json; charset=utf-8", 2790 "content-type" : "application/json; charset=utf-8",
244 }; 2791 };
245 var resp = convert.JSON.encode(buildMedia()); 2792 var resp = convert.JSON.encode(buildEmpty());
246 return new async.Future.value(stringResponse(200, h, resp)); 2793 return new async.Future.value(stringResponse(200, h, resp));
247 }), true); 2794 }), true);
248 res.download(arg_resourceName).then(unittest.expectAsync(((api.Media respo nse) { 2795 res.delete(arg_name).then(unittest.expectAsync(((api.Empty response) {
249 checkMedia(response); 2796 checkEmpty(response);
250 }))); 2797 })));
251 }); 2798 });
252 2799
253 unittest.test("method--upload", () { 2800 unittest.test("method--get", () {
254 // TODO: Implement tests for media upload;
255 // TODO: Implement tests for media download;
256 2801
257 var mock = new HttpServerMock(); 2802 var mock = new HttpServerMock();
258 api.MediaResourceApi res = new api.DataprocApi(mock).media; 2803 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p rojects.regions.operations;
259 var arg_request = buildMedia(); 2804 var arg_name = "foo";
260 var arg_resourceName = "foo";
261 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2805 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
262 var obj = new api.Media.fromJson(json);
263 checkMedia(obj);
264
265 var path = (req.url).path; 2806 var path = (req.url).path;
266 var pathOffset = 0; 2807 var pathOffset = 0;
267 var index; 2808 var index;
268 var subPart; 2809 var subPart;
269 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2810 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
270 pathOffset += 1; 2811 pathOffset += 1;
271 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("v1/media/")); 2812 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
272 pathOffset += 9; 2813 pathOffset += 3;
273 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2814 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
274 2815
275 var query = (req.url).query; 2816 var query = (req.url).query;
2817 var queryOffset = 0;
2818 var queryMap = {};
2819 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2820 parseBool(n) {
2821 if (n == "true") return true;
2822 if (n == "false") return false;
2823 if (n == null) return null;
2824 throw new core.ArgumentError("Invalid boolean: $n");
2825 }
2826 if (query.length > 0) {
2827 for (var part in query.split("&")) {
2828 var keyvalue = part.split("=");
2829 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2830 }
2831 }
2832
2833
2834 var h = {
2835 "content-type" : "application/json; charset=utf-8",
2836 };
2837 var resp = convert.JSON.encode(buildOperation());
2838 return new async.Future.value(stringResponse(200, h, resp));
2839 }), true);
2840 res.get(arg_name).then(unittest.expectAsync(((api.Operation response) {
2841 checkOperation(response);
2842 })));
2843 });
2844
2845 unittest.test("method--list", () {
2846
2847 var mock = new HttpServerMock();
2848 api.ProjectsRegionsOperationsResourceApi res = new api.DataprocApi(mock).p rojects.regions.operations;
2849 var arg_name = "foo";
2850 var arg_filter = "foo";
2851 var arg_pageSize = 42;
2852 var arg_pageToken = "foo";
2853 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2854 var path = (req.url).path;
2855 var pathOffset = 0;
2856 var index;
2857 var subPart;
2858 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2859 pathOffset += 1;
2860 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/"));
2861 pathOffset += 3;
2862 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2863
2864 var query = (req.url).query;
276 var queryOffset = 0; 2865 var queryOffset = 0;
277 var queryMap = {}; 2866 var queryMap = {};
278 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2867 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
279 parseBool(n) { 2868 parseBool(n) {
280 if (n == "true") return true; 2869 if (n == "true") return true;
281 if (n == "false") return false; 2870 if (n == "false") return false;
282 if (n == null) return null; 2871 if (n == null) return null;
283 throw new core.ArgumentError("Invalid boolean: $n"); 2872 throw new core.ArgumentError("Invalid boolean: $n");
284 } 2873 }
285 if (query.length > 0) { 2874 if (query.length > 0) {
286 for (var part in query.split("&")) { 2875 for (var part in query.split("&")) {
287 var keyvalue = part.split("="); 2876 var keyvalue = part.split("=");
288 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2877 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
289 } 2878 }
290 } 2879 }
2880 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
2881 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2882 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
291 2883
292 2884
293 var h = { 2885 var h = {
294 "content-type" : "application/json; charset=utf-8", 2886 "content-type" : "application/json; charset=utf-8",
295 }; 2887 };
296 var resp = convert.JSON.encode(buildMedia()); 2888 var resp = convert.JSON.encode(buildListOperationsResponse());
297 return new async.Future.value(stringResponse(200, h, resp)); 2889 return new async.Future.value(stringResponse(200, h, resp));
298 }), true); 2890 }), true);
299 res.upload(arg_request, arg_resourceName).then(unittest.expectAsync(((api. Media response) { 2891 res.list(arg_name, filter: arg_filter, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListOperationsResponse response) {
300 checkMedia(response); 2892 checkListOperationsResponse(response);
301 }))); 2893 })));
302 }); 2894 });
303 2895
304 }); 2896 });
305 2897
306 2898
307 } 2899 }
308 2900
OLDNEW
« no previous file with comments | « generated/googleapis/test/customsearch/v1_test.dart ('k') | generated/googleapis/test/deploymentmanager/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698