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

Side by Side Diff: generated/googleapis_beta/test/dataflow/v1b3_test.dart

Issue 1296863002: Api-roll 22: 2015-08-17 (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis_beta.dataflow.v1b3.test; 1 library googleapis_beta.dataflow.v1b3.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 buildCounterApproximateProgress = 0;
55 buildApproximateProgress() {
56 var o = new api.ApproximateProgress();
57 buildCounterApproximateProgress++;
58 if (buildCounterApproximateProgress < 3) {
59 o.percentComplete = 42.0;
60 o.position = buildPosition();
61 o.remainingTime = "foo";
62 }
63 buildCounterApproximateProgress--;
64 return o;
65 }
66
67 checkApproximateProgress(api.ApproximateProgress o) {
68 buildCounterApproximateProgress++;
69 if (buildCounterApproximateProgress < 3) {
70 unittest.expect(o.percentComplete, unittest.equals(42.0));
71 checkPosition(o.position);
72 unittest.expect(o.remainingTime, unittest.equals('foo'));
73 }
74 buildCounterApproximateProgress--;
75 }
76
77 core.int buildCounterAutoscalingSettings = 0;
78 buildAutoscalingSettings() {
79 var o = new api.AutoscalingSettings();
80 buildCounterAutoscalingSettings++;
81 if (buildCounterAutoscalingSettings < 3) {
82 o.algorithm = "foo";
83 o.maxNumWorkers = 42;
84 }
85 buildCounterAutoscalingSettings--;
86 return o;
87 }
88
89 checkAutoscalingSettings(api.AutoscalingSettings o) {
90 buildCounterAutoscalingSettings++;
91 if (buildCounterAutoscalingSettings < 3) {
92 unittest.expect(o.algorithm, unittest.equals('foo'));
93 unittest.expect(o.maxNumWorkers, unittest.equals(42));
94 }
95 buildCounterAutoscalingSettings--;
96 }
97
98 buildUnnamed2387() {
99 var o = new core.List<api.StreamLocation>();
100 o.add(buildStreamLocation());
101 o.add(buildStreamLocation());
102 return o;
103 }
104
105 checkUnnamed2387(core.List<api.StreamLocation> o) {
106 unittest.expect(o, unittest.hasLength(2));
107 checkStreamLocation(o[0]);
108 checkStreamLocation(o[1]);
109 }
110
111 buildUnnamed2388() {
112 var o = new core.List<api.KeyRangeLocation>();
113 o.add(buildKeyRangeLocation());
114 o.add(buildKeyRangeLocation());
115 return o;
116 }
117
118 checkUnnamed2388(core.List<api.KeyRangeLocation> o) {
119 unittest.expect(o, unittest.hasLength(2));
120 checkKeyRangeLocation(o[0]);
121 checkKeyRangeLocation(o[1]);
122 }
123
124 buildUnnamed2389() {
125 var o = new core.List<api.StreamLocation>();
126 o.add(buildStreamLocation());
127 o.add(buildStreamLocation());
128 return o;
129 }
130
131 checkUnnamed2389(core.List<api.StreamLocation> o) {
132 unittest.expect(o, unittest.hasLength(2));
133 checkStreamLocation(o[0]);
134 checkStreamLocation(o[1]);
135 }
136
137 buildUnnamed2390() {
138 var o = new core.List<api.StateFamilyConfig>();
139 o.add(buildStateFamilyConfig());
140 o.add(buildStateFamilyConfig());
141 return o;
142 }
143
144 checkUnnamed2390(core.List<api.StateFamilyConfig> o) {
145 unittest.expect(o, unittest.hasLength(2));
146 checkStateFamilyConfig(o[0]);
147 checkStateFamilyConfig(o[1]);
148 }
149
150 core.int buildCounterComputationTopology = 0;
151 buildComputationTopology() {
152 var o = new api.ComputationTopology();
153 buildCounterComputationTopology++;
154 if (buildCounterComputationTopology < 3) {
155 o.computationId = "foo";
156 o.inputs = buildUnnamed2387();
157 o.keyRanges = buildUnnamed2388();
158 o.outputs = buildUnnamed2389();
159 o.stateFamilies = buildUnnamed2390();
160 o.systemStageName = "foo";
161 o.userStageName = "foo";
162 }
163 buildCounterComputationTopology--;
164 return o;
165 }
166
167 checkComputationTopology(api.ComputationTopology o) {
168 buildCounterComputationTopology++;
169 if (buildCounterComputationTopology < 3) {
170 unittest.expect(o.computationId, unittest.equals('foo'));
171 checkUnnamed2387(o.inputs);
172 checkUnnamed2388(o.keyRanges);
173 checkUnnamed2389(o.outputs);
174 checkUnnamed2390(o.stateFamilies);
175 unittest.expect(o.systemStageName, unittest.equals('foo'));
176 unittest.expect(o.userStageName, unittest.equals('foo'));
177 }
178 buildCounterComputationTopology--;
179 }
180
181 core.int buildCounterCustomSourceLocation = 0;
182 buildCustomSourceLocation() {
183 var o = new api.CustomSourceLocation();
184 buildCounterCustomSourceLocation++;
185 if (buildCounterCustomSourceLocation < 3) {
186 o.stateful = true;
187 }
188 buildCounterCustomSourceLocation--;
189 return o;
190 }
191
192 checkCustomSourceLocation(api.CustomSourceLocation o) {
193 buildCounterCustomSourceLocation++;
194 if (buildCounterCustomSourceLocation < 3) {
195 unittest.expect(o.stateful, unittest.isTrue);
196 }
197 buildCounterCustomSourceLocation--;
198 }
199
200 buildUnnamed2391() {
201 var o = new core.List<core.String>();
202 o.add("foo");
203 o.add("foo");
204 return o;
205 }
206
207 checkUnnamed2391(core.List<core.String> o) {
208 unittest.expect(o, unittest.hasLength(2));
209 unittest.expect(o[0], unittest.equals('foo'));
210 unittest.expect(o[1], unittest.equals('foo'));
211 }
212
213 core.int buildCounterDataDiskAssignment = 0;
214 buildDataDiskAssignment() {
215 var o = new api.DataDiskAssignment();
216 buildCounterDataDiskAssignment++;
217 if (buildCounterDataDiskAssignment < 3) {
218 o.dataDisks = buildUnnamed2391();
219 o.vmInstance = "foo";
220 }
221 buildCounterDataDiskAssignment--;
222 return o;
223 }
224
225 checkDataDiskAssignment(api.DataDiskAssignment o) {
226 buildCounterDataDiskAssignment++;
227 if (buildCounterDataDiskAssignment < 3) {
228 checkUnnamed2391(o.dataDisks);
229 unittest.expect(o.vmInstance, unittest.equals('foo'));
230 }
231 buildCounterDataDiskAssignment--;
232 }
233
234 core.int buildCounterDerivedSource = 0;
235 buildDerivedSource() {
236 var o = new api.DerivedSource();
237 buildCounterDerivedSource++;
238 if (buildCounterDerivedSource < 3) {
239 o.derivationMode = "foo";
240 o.source = buildSource();
241 }
242 buildCounterDerivedSource--;
243 return o;
244 }
245
246 checkDerivedSource(api.DerivedSource o) {
247 buildCounterDerivedSource++;
248 if (buildCounterDerivedSource < 3) {
249 unittest.expect(o.derivationMode, unittest.equals('foo'));
250 checkSource(o.source);
251 }
252 buildCounterDerivedSource--;
253 }
254
255 core.int buildCounterDisk = 0;
256 buildDisk() {
257 var o = new api.Disk();
258 buildCounterDisk++;
259 if (buildCounterDisk < 3) {
260 o.diskType = "foo";
261 o.mountPoint = "foo";
262 o.sizeGb = 42;
263 }
264 buildCounterDisk--;
265 return o;
266 }
267
268 checkDisk(api.Disk o) {
269 buildCounterDisk++;
270 if (buildCounterDisk < 3) {
271 unittest.expect(o.diskType, unittest.equals('foo'));
272 unittest.expect(o.mountPoint, unittest.equals('foo'));
273 unittest.expect(o.sizeGb, unittest.equals(42));
274 }
275 buildCounterDisk--;
276 }
277
278 core.int buildCounterDynamicSourceSplit = 0;
279 buildDynamicSourceSplit() {
280 var o = new api.DynamicSourceSplit();
281 buildCounterDynamicSourceSplit++;
282 if (buildCounterDynamicSourceSplit < 3) {
283 o.primary = buildDerivedSource();
284 o.residual = buildDerivedSource();
285 }
286 buildCounterDynamicSourceSplit--;
287 return o;
288 }
289
290 checkDynamicSourceSplit(api.DynamicSourceSplit o) {
291 buildCounterDynamicSourceSplit++;
292 if (buildCounterDynamicSourceSplit < 3) {
293 checkDerivedSource(o.primary);
294 checkDerivedSource(o.residual);
295 }
296 buildCounterDynamicSourceSplit--;
297 }
298
299 buildUnnamed2392() {
300 var o = new core.List<core.String>();
301 o.add("foo");
302 o.add("foo");
303 return o;
304 }
305
306 checkUnnamed2392(core.List<core.String> o) {
307 unittest.expect(o, unittest.hasLength(2));
308 unittest.expect(o[0], unittest.equals('foo'));
309 unittest.expect(o[1], unittest.equals('foo'));
310 }
311
312 buildUnnamed2393() {
313 var o = new core.Map<core.String, core.Object>();
314 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
315 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
316 return o;
317 }
318
319 checkUnnamed2393(core.Map<core.String, core.Object> o) {
320 unittest.expect(o, unittest.hasLength(2));
321 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'));
322 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'));
323 }
324
325 buildUnnamed2394() {
326 var o = new core.Map<core.String, core.Object>();
327 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
328 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
329 return o;
330 }
331
332 checkUnnamed2394(core.Map<core.String, core.Object> o) {
333 unittest.expect(o, unittest.hasLength(2));
334 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'));
335 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'));
336 }
337
338 buildUnnamed2395() {
339 var o = new core.Map<core.String, core.Object>();
340 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
341 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
342 return o;
343 }
344
345 checkUnnamed2395(core.Map<core.String, core.Object> o) {
346 unittest.expect(o, unittest.hasLength(2));
347 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'));
348 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'));
349 }
350
351 buildUnnamed2396() {
352 var o = new core.Map<core.String, core.Object>();
353 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
354 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
355 return o;
356 }
357
358 checkUnnamed2396(core.Map<core.String, core.Object> o) {
359 unittest.expect(o, unittest.hasLength(2));
360 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"], unittest.equals('foo'));
361 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"], unittest.equals('foo'));
362 }
363
364 buildUnnamed2397() {
365 var o = new core.List<api.WorkerPool>();
366 o.add(buildWorkerPool());
367 o.add(buildWorkerPool());
368 return o;
369 }
370
371 checkUnnamed2397(core.List<api.WorkerPool> o) {
372 unittest.expect(o, unittest.hasLength(2));
373 checkWorkerPool(o[0]);
374 checkWorkerPool(o[1]);
375 }
376
377 core.int buildCounterEnvironment = 0;
378 buildEnvironment() {
379 var o = new api.Environment();
380 buildCounterEnvironment++;
381 if (buildCounterEnvironment < 3) {
382 o.clusterManagerApiService = "foo";
383 o.dataset = "foo";
384 o.experiments = buildUnnamed2392();
385 o.internalExperiments = buildUnnamed2393();
386 o.sdkPipelineOptions = buildUnnamed2394();
387 o.tempStoragePrefix = "foo";
388 o.userAgent = buildUnnamed2395();
389 o.version = buildUnnamed2396();
390 o.workerPools = buildUnnamed2397();
391 }
392 buildCounterEnvironment--;
393 return o;
394 }
395
396 checkEnvironment(api.Environment o) {
397 buildCounterEnvironment++;
398 if (buildCounterEnvironment < 3) {
399 unittest.expect(o.clusterManagerApiService, unittest.equals('foo'));
400 unittest.expect(o.dataset, unittest.equals('foo'));
401 checkUnnamed2392(o.experiments);
402 checkUnnamed2393(o.internalExperiments);
403 checkUnnamed2394(o.sdkPipelineOptions);
404 unittest.expect(o.tempStoragePrefix, unittest.equals('foo'));
405 checkUnnamed2395(o.userAgent);
406 checkUnnamed2396(o.version);
407 checkUnnamed2397(o.workerPools);
408 }
409 buildCounterEnvironment--;
410 }
411
412 buildUnnamed2398() {
413 var o = new core.List<api.InstructionInput>();
414 o.add(buildInstructionInput());
415 o.add(buildInstructionInput());
416 return o;
417 }
418
419 checkUnnamed2398(core.List<api.InstructionInput> o) {
420 unittest.expect(o, unittest.hasLength(2));
421 checkInstructionInput(o[0]);
422 checkInstructionInput(o[1]);
423 }
424
425 core.int buildCounterFlattenInstruction = 0;
426 buildFlattenInstruction() {
427 var o = new api.FlattenInstruction();
428 buildCounterFlattenInstruction++;
429 if (buildCounterFlattenInstruction < 3) {
430 o.inputs = buildUnnamed2398();
431 }
432 buildCounterFlattenInstruction--;
433 return o;
434 }
435
436 checkFlattenInstruction(api.FlattenInstruction o) {
437 buildCounterFlattenInstruction++;
438 if (buildCounterFlattenInstruction < 3) {
439 checkUnnamed2398(o.inputs);
440 }
441 buildCounterFlattenInstruction--;
442 }
443
444 core.int buildCounterInstructionInput = 0;
445 buildInstructionInput() {
446 var o = new api.InstructionInput();
447 buildCounterInstructionInput++;
448 if (buildCounterInstructionInput < 3) {
449 o.outputNum = 42;
450 o.producerInstructionIndex = 42;
451 }
452 buildCounterInstructionInput--;
453 return o;
454 }
455
456 checkInstructionInput(api.InstructionInput o) {
457 buildCounterInstructionInput++;
458 if (buildCounterInstructionInput < 3) {
459 unittest.expect(o.outputNum, unittest.equals(42));
460 unittest.expect(o.producerInstructionIndex, unittest.equals(42));
461 }
462 buildCounterInstructionInput--;
463 }
464
465 buildUnnamed2399() {
466 var o = new core.Map<core.String, core.Object>();
467 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
468 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
469 return o;
470 }
471
472 checkUnnamed2399(core.Map<core.String, core.Object> o) {
473 unittest.expect(o, unittest.hasLength(2));
474 var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLengt h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"], unittest.equals('foo'));
475 var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLen gth(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest .expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["stri ng"], unittest.equals('foo'));
476 }
477
478 core.int buildCounterInstructionOutput = 0;
479 buildInstructionOutput() {
480 var o = new api.InstructionOutput();
481 buildCounterInstructionOutput++;
482 if (buildCounterInstructionOutput < 3) {
483 o.codec = buildUnnamed2399();
484 o.name = "foo";
485 }
486 buildCounterInstructionOutput--;
487 return o;
488 }
489
490 checkInstructionOutput(api.InstructionOutput o) {
491 buildCounterInstructionOutput++;
492 if (buildCounterInstructionOutput < 3) {
493 checkUnnamed2399(o.codec);
494 unittest.expect(o.name, unittest.equals('foo'));
495 }
496 buildCounterInstructionOutput--;
497 }
498
499 buildUnnamed2400() {
500 var o = new core.List<api.Step>();
501 o.add(buildStep());
502 o.add(buildStep());
503 return o;
504 }
505
506 checkUnnamed2400(core.List<api.Step> o) {
507 unittest.expect(o, unittest.hasLength(2));
508 checkStep(o[0]);
509 checkStep(o[1]);
510 }
511
512 buildUnnamed2401() {
513 var o = new core.Map<core.String, core.String>();
514 o["x"] = "foo";
515 o["y"] = "foo";
516 return o;
517 }
518
519 checkUnnamed2401(core.Map<core.String, core.String> o) {
520 unittest.expect(o, unittest.hasLength(2));
521 unittest.expect(o["x"], unittest.equals('foo'));
522 unittest.expect(o["y"], unittest.equals('foo'));
523 }
524
525 core.int buildCounterJob = 0;
526 buildJob() {
527 var o = new api.Job();
528 buildCounterJob++;
529 if (buildCounterJob < 3) {
530 o.clientRequestId = "foo";
531 o.createTime = "foo";
532 o.currentState = "foo";
533 o.currentStateTime = "foo";
534 o.environment = buildEnvironment();
535 o.executionInfo = buildJobExecutionInfo();
536 o.id = "foo";
537 o.name = "foo";
538 o.projectId = "foo";
539 o.replaceJobId = "foo";
540 o.replacedByJobId = "foo";
541 o.requestedState = "foo";
542 o.steps = buildUnnamed2400();
543 o.transformNameMapping = buildUnnamed2401();
544 o.type = "foo";
545 }
546 buildCounterJob--;
547 return o;
548 }
549
550 checkJob(api.Job o) {
551 buildCounterJob++;
552 if (buildCounterJob < 3) {
553 unittest.expect(o.clientRequestId, unittest.equals('foo'));
554 unittest.expect(o.createTime, unittest.equals('foo'));
555 unittest.expect(o.currentState, unittest.equals('foo'));
556 unittest.expect(o.currentStateTime, unittest.equals('foo'));
557 checkEnvironment(o.environment);
558 checkJobExecutionInfo(o.executionInfo);
559 unittest.expect(o.id, unittest.equals('foo'));
560 unittest.expect(o.name, unittest.equals('foo'));
561 unittest.expect(o.projectId, unittest.equals('foo'));
562 unittest.expect(o.replaceJobId, unittest.equals('foo'));
563 unittest.expect(o.replacedByJobId, unittest.equals('foo'));
564 unittest.expect(o.requestedState, unittest.equals('foo'));
565 checkUnnamed2400(o.steps);
566 checkUnnamed2401(o.transformNameMapping);
567 unittest.expect(o.type, unittest.equals('foo'));
568 }
569 buildCounterJob--;
570 }
571
572 buildUnnamed2402() {
573 var o = new core.Map<core.String, api.JobExecutionStageInfo>();
574 o["x"] = buildJobExecutionStageInfo();
575 o["y"] = buildJobExecutionStageInfo();
576 return o;
577 }
578
579 checkUnnamed2402(core.Map<core.String, api.JobExecutionStageInfo> o) {
580 unittest.expect(o, unittest.hasLength(2));
581 checkJobExecutionStageInfo(o["x"]);
582 checkJobExecutionStageInfo(o["y"]);
583 }
584
585 core.int buildCounterJobExecutionInfo = 0;
586 buildJobExecutionInfo() {
587 var o = new api.JobExecutionInfo();
588 buildCounterJobExecutionInfo++;
589 if (buildCounterJobExecutionInfo < 3) {
590 o.stages = buildUnnamed2402();
591 }
592 buildCounterJobExecutionInfo--;
593 return o;
594 }
595
596 checkJobExecutionInfo(api.JobExecutionInfo o) {
597 buildCounterJobExecutionInfo++;
598 if (buildCounterJobExecutionInfo < 3) {
599 checkUnnamed2402(o.stages);
600 }
601 buildCounterJobExecutionInfo--;
602 }
603
604 buildUnnamed2403() {
605 var o = new core.List<core.String>();
606 o.add("foo");
607 o.add("foo");
608 return o;
609 }
610
611 checkUnnamed2403(core.List<core.String> o) {
612 unittest.expect(o, unittest.hasLength(2));
613 unittest.expect(o[0], unittest.equals('foo'));
614 unittest.expect(o[1], unittest.equals('foo'));
615 }
616
617 core.int buildCounterJobExecutionStageInfo = 0;
618 buildJobExecutionStageInfo() {
619 var o = new api.JobExecutionStageInfo();
620 buildCounterJobExecutionStageInfo++;
621 if (buildCounterJobExecutionStageInfo < 3) {
622 o.stepName = buildUnnamed2403();
623 }
624 buildCounterJobExecutionStageInfo--;
625 return o;
626 }
627
628 checkJobExecutionStageInfo(api.JobExecutionStageInfo o) {
629 buildCounterJobExecutionStageInfo++;
630 if (buildCounterJobExecutionStageInfo < 3) {
631 checkUnnamed2403(o.stepName);
632 }
633 buildCounterJobExecutionStageInfo--;
634 }
635
636 core.int buildCounterJobMessage = 0;
637 buildJobMessage() {
638 var o = new api.JobMessage();
639 buildCounterJobMessage++;
640 if (buildCounterJobMessage < 3) {
641 o.id = "foo";
642 o.messageImportance = "foo";
643 o.messageText = "foo";
644 o.time = "foo";
645 }
646 buildCounterJobMessage--;
647 return o;
648 }
649
650 checkJobMessage(api.JobMessage o) {
651 buildCounterJobMessage++;
652 if (buildCounterJobMessage < 3) {
653 unittest.expect(o.id, unittest.equals('foo'));
654 unittest.expect(o.messageImportance, unittest.equals('foo'));
655 unittest.expect(o.messageText, unittest.equals('foo'));
656 unittest.expect(o.time, unittest.equals('foo'));
657 }
658 buildCounterJobMessage--;
659 }
660
661 buildUnnamed2404() {
662 var o = new core.List<api.MetricUpdate>();
663 o.add(buildMetricUpdate());
664 o.add(buildMetricUpdate());
665 return o;
666 }
667
668 checkUnnamed2404(core.List<api.MetricUpdate> o) {
669 unittest.expect(o, unittest.hasLength(2));
670 checkMetricUpdate(o[0]);
671 checkMetricUpdate(o[1]);
672 }
673
674 core.int buildCounterJobMetrics = 0;
675 buildJobMetrics() {
676 var o = new api.JobMetrics();
677 buildCounterJobMetrics++;
678 if (buildCounterJobMetrics < 3) {
679 o.metricTime = "foo";
680 o.metrics = buildUnnamed2404();
681 }
682 buildCounterJobMetrics--;
683 return o;
684 }
685
686 checkJobMetrics(api.JobMetrics o) {
687 buildCounterJobMetrics++;
688 if (buildCounterJobMetrics < 3) {
689 unittest.expect(o.metricTime, unittest.equals('foo'));
690 checkUnnamed2404(o.metrics);
691 }
692 buildCounterJobMetrics--;
693 }
694
695 core.int buildCounterKeyRangeDataDiskAssignment = 0;
696 buildKeyRangeDataDiskAssignment() {
697 var o = new api.KeyRangeDataDiskAssignment();
698 buildCounterKeyRangeDataDiskAssignment++;
699 if (buildCounterKeyRangeDataDiskAssignment < 3) {
700 o.dataDisk = "foo";
701 o.end = "foo";
702 o.start = "foo";
703 }
704 buildCounterKeyRangeDataDiskAssignment--;
705 return o;
706 }
707
708 checkKeyRangeDataDiskAssignment(api.KeyRangeDataDiskAssignment o) {
709 buildCounterKeyRangeDataDiskAssignment++;
710 if (buildCounterKeyRangeDataDiskAssignment < 3) {
711 unittest.expect(o.dataDisk, unittest.equals('foo'));
712 unittest.expect(o.end, unittest.equals('foo'));
713 unittest.expect(o.start, unittest.equals('foo'));
714 }
715 buildCounterKeyRangeDataDiskAssignment--;
716 }
717
718 core.int buildCounterKeyRangeLocation = 0;
719 buildKeyRangeLocation() {
720 var o = new api.KeyRangeLocation();
721 buildCounterKeyRangeLocation++;
722 if (buildCounterKeyRangeLocation < 3) {
723 o.dataDisk = "foo";
724 o.deliveryEndpoint = "foo";
725 o.end = "foo";
726 o.persistentDirectory = "foo";
727 o.start = "foo";
728 }
729 buildCounterKeyRangeLocation--;
730 return o;
731 }
732
733 checkKeyRangeLocation(api.KeyRangeLocation o) {
734 buildCounterKeyRangeLocation++;
735 if (buildCounterKeyRangeLocation < 3) {
736 unittest.expect(o.dataDisk, unittest.equals('foo'));
737 unittest.expect(o.deliveryEndpoint, unittest.equals('foo'));
738 unittest.expect(o.end, unittest.equals('foo'));
739 unittest.expect(o.persistentDirectory, unittest.equals('foo'));
740 unittest.expect(o.start, unittest.equals('foo'));
741 }
742 buildCounterKeyRangeLocation--;
743 }
744
745 buildUnnamed2405() {
746 var o = new core.List<core.String>();
747 o.add("foo");
748 o.add("foo");
749 return o;
750 }
751
752 checkUnnamed2405(core.List<core.String> o) {
753 unittest.expect(o, unittest.hasLength(2));
754 unittest.expect(o[0], unittest.equals('foo'));
755 unittest.expect(o[1], unittest.equals('foo'));
756 }
757
758 buildUnnamed2406() {
759 var o = new core.List<core.String>();
760 o.add("foo");
761 o.add("foo");
762 return o;
763 }
764
765 checkUnnamed2406(core.List<core.String> o) {
766 unittest.expect(o, unittest.hasLength(2));
767 unittest.expect(o[0], unittest.equals('foo'));
768 unittest.expect(o[1], unittest.equals('foo'));
769 }
770
771 core.int buildCounterLeaseWorkItemRequest = 0;
772 buildLeaseWorkItemRequest() {
773 var o = new api.LeaseWorkItemRequest();
774 buildCounterLeaseWorkItemRequest++;
775 if (buildCounterLeaseWorkItemRequest < 3) {
776 o.currentWorkerTime = "foo";
777 o.requestedLeaseDuration = "foo";
778 o.workItemTypes = buildUnnamed2405();
779 o.workerCapabilities = buildUnnamed2406();
780 o.workerId = "foo";
781 }
782 buildCounterLeaseWorkItemRequest--;
783 return o;
784 }
785
786 checkLeaseWorkItemRequest(api.LeaseWorkItemRequest o) {
787 buildCounterLeaseWorkItemRequest++;
788 if (buildCounterLeaseWorkItemRequest < 3) {
789 unittest.expect(o.currentWorkerTime, unittest.equals('foo'));
790 unittest.expect(o.requestedLeaseDuration, unittest.equals('foo'));
791 checkUnnamed2405(o.workItemTypes);
792 checkUnnamed2406(o.workerCapabilities);
793 unittest.expect(o.workerId, unittest.equals('foo'));
794 }
795 buildCounterLeaseWorkItemRequest--;
796 }
797
798 buildUnnamed2407() {
799 var o = new core.List<api.WorkItem>();
800 o.add(buildWorkItem());
801 o.add(buildWorkItem());
802 return o;
803 }
804
805 checkUnnamed2407(core.List<api.WorkItem> o) {
806 unittest.expect(o, unittest.hasLength(2));
807 checkWorkItem(o[0]);
808 checkWorkItem(o[1]);
809 }
810
811 core.int buildCounterLeaseWorkItemResponse = 0;
812 buildLeaseWorkItemResponse() {
813 var o = new api.LeaseWorkItemResponse();
814 buildCounterLeaseWorkItemResponse++;
815 if (buildCounterLeaseWorkItemResponse < 3) {
816 o.workItems = buildUnnamed2407();
817 }
818 buildCounterLeaseWorkItemResponse--;
819 return o;
820 }
821
822 checkLeaseWorkItemResponse(api.LeaseWorkItemResponse o) {
823 buildCounterLeaseWorkItemResponse++;
824 if (buildCounterLeaseWorkItemResponse < 3) {
825 checkUnnamed2407(o.workItems);
826 }
827 buildCounterLeaseWorkItemResponse--;
828 }
829
830 buildUnnamed2408() {
831 var o = new core.List<api.JobMessage>();
832 o.add(buildJobMessage());
833 o.add(buildJobMessage());
834 return o;
835 }
836
837 checkUnnamed2408(core.List<api.JobMessage> o) {
838 unittest.expect(o, unittest.hasLength(2));
839 checkJobMessage(o[0]);
840 checkJobMessage(o[1]);
841 }
842
843 core.int buildCounterListJobMessagesResponse = 0;
844 buildListJobMessagesResponse() {
845 var o = new api.ListJobMessagesResponse();
846 buildCounterListJobMessagesResponse++;
847 if (buildCounterListJobMessagesResponse < 3) {
848 o.jobMessages = buildUnnamed2408();
849 o.nextPageToken = "foo";
850 }
851 buildCounterListJobMessagesResponse--;
852 return o;
853 }
854
855 checkListJobMessagesResponse(api.ListJobMessagesResponse o) {
856 buildCounterListJobMessagesResponse++;
857 if (buildCounterListJobMessagesResponse < 3) {
858 checkUnnamed2408(o.jobMessages);
859 unittest.expect(o.nextPageToken, unittest.equals('foo'));
860 }
861 buildCounterListJobMessagesResponse--;
862 }
863
864 buildUnnamed2409() {
865 var o = new core.List<api.Job>();
866 o.add(buildJob());
867 o.add(buildJob());
868 return o;
869 }
870
871 checkUnnamed2409(core.List<api.Job> o) {
872 unittest.expect(o, unittest.hasLength(2));
873 checkJob(o[0]);
874 checkJob(o[1]);
875 }
876
877 core.int buildCounterListJobsResponse = 0;
878 buildListJobsResponse() {
879 var o = new api.ListJobsResponse();
880 buildCounterListJobsResponse++;
881 if (buildCounterListJobsResponse < 3) {
882 o.jobs = buildUnnamed2409();
883 o.nextPageToken = "foo";
884 }
885 buildCounterListJobsResponse--;
886 return o;
887 }
888
889 checkListJobsResponse(api.ListJobsResponse o) {
890 buildCounterListJobsResponse++;
891 if (buildCounterListJobsResponse < 3) {
892 checkUnnamed2409(o.jobs);
893 unittest.expect(o.nextPageToken, unittest.equals('foo'));
894 }
895 buildCounterListJobsResponse--;
896 }
897
898 buildUnnamed2410() {
899 var o = new core.List<api.ParallelInstruction>();
900 o.add(buildParallelInstruction());
901 o.add(buildParallelInstruction());
902 return o;
903 }
904
905 checkUnnamed2410(core.List<api.ParallelInstruction> o) {
906 unittest.expect(o, unittest.hasLength(2));
907 checkParallelInstruction(o[0]);
908 checkParallelInstruction(o[1]);
909 }
910
911 core.int buildCounterMapTask = 0;
912 buildMapTask() {
913 var o = new api.MapTask();
914 buildCounterMapTask++;
915 if (buildCounterMapTask < 3) {
916 o.instructions = buildUnnamed2410();
917 o.stageName = "foo";
918 o.systemName = "foo";
919 }
920 buildCounterMapTask--;
921 return o;
922 }
923
924 checkMapTask(api.MapTask o) {
925 buildCounterMapTask++;
926 if (buildCounterMapTask < 3) {
927 checkUnnamed2410(o.instructions);
928 unittest.expect(o.stageName, unittest.equals('foo'));
929 unittest.expect(o.systemName, unittest.equals('foo'));
930 }
931 buildCounterMapTask--;
932 }
933
934 buildUnnamed2411() {
935 var o = new core.Map<core.String, core.String>();
936 o["x"] = "foo";
937 o["y"] = "foo";
938 return o;
939 }
940
941 checkUnnamed2411(core.Map<core.String, core.String> o) {
942 unittest.expect(o, unittest.hasLength(2));
943 unittest.expect(o["x"], unittest.equals('foo'));
944 unittest.expect(o["y"], unittest.equals('foo'));
945 }
946
947 core.int buildCounterMetricStructuredName = 0;
948 buildMetricStructuredName() {
949 var o = new api.MetricStructuredName();
950 buildCounterMetricStructuredName++;
951 if (buildCounterMetricStructuredName < 3) {
952 o.context = buildUnnamed2411();
953 o.name = "foo";
954 o.origin = "foo";
955 }
956 buildCounterMetricStructuredName--;
957 return o;
958 }
959
960 checkMetricStructuredName(api.MetricStructuredName o) {
961 buildCounterMetricStructuredName++;
962 if (buildCounterMetricStructuredName < 3) {
963 checkUnnamed2411(o.context);
964 unittest.expect(o.name, unittest.equals('foo'));
965 unittest.expect(o.origin, unittest.equals('foo'));
966 }
967 buildCounterMetricStructuredName--;
968 }
969
970 core.int buildCounterMetricUpdate = 0;
971 buildMetricUpdate() {
972 var o = new api.MetricUpdate();
973 buildCounterMetricUpdate++;
974 if (buildCounterMetricUpdate < 3) {
975 o.cumulative = true;
976 o.internal = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
977 o.kind = "foo";
978 o.meanCount = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
979 o.meanSum = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
980 o.name = buildMetricStructuredName();
981 o.scalar = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
982 o.set = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
983 o.updateTime = "foo";
984 }
985 buildCounterMetricUpdate--;
986 return o;
987 }
988
989 checkMetricUpdate(api.MetricUpdate o) {
990 buildCounterMetricUpdate++;
991 if (buildCounterMetricUpdate < 3) {
992 unittest.expect(o.cumulative, unittest.isTrue);
993 var casted11 = (o.internal) as core.Map; unittest.expect(casted11, unittest. hasLength(3)); unittest.expect(casted11["list"], unittest.equals([1, 2, 3])); un ittest.expect(casted11["bool"], unittest.equals(true)); unittest.expect(casted11 ["string"], unittest.equals('foo'));
994 unittest.expect(o.kind, unittest.equals('foo'));
995 var casted12 = (o.meanCount) as core.Map; unittest.expect(casted12, unittest .hasLength(3)); unittest.expect(casted12["list"], unittest.equals([1, 2, 3])); u nittest.expect(casted12["bool"], unittest.equals(true)); unittest.expect(casted1 2["string"], unittest.equals('foo'));
996 var casted13 = (o.meanSum) as core.Map; unittest.expect(casted13, unittest.h asLength(3)); unittest.expect(casted13["list"], unittest.equals([1, 2, 3])); uni ttest.expect(casted13["bool"], unittest.equals(true)); unittest.expect(casted13[ "string"], unittest.equals('foo'));
997 checkMetricStructuredName(o.name);
998 var casted14 = (o.scalar) as core.Map; unittest.expect(casted14, unittest.ha sLength(3)); unittest.expect(casted14["list"], unittest.equals([1, 2, 3])); unit test.expect(casted14["bool"], unittest.equals(true)); unittest.expect(casted14[" string"], unittest.equals('foo'));
999 var casted15 = (o.set) as core.Map; unittest.expect(casted15, unittest.hasLe ngth(3)); unittest.expect(casted15["list"], unittest.equals([1, 2, 3])); unittes t.expect(casted15["bool"], unittest.equals(true)); unittest.expect(casted15["str ing"], unittest.equals('foo'));
1000 unittest.expect(o.updateTime, unittest.equals('foo'));
1001 }
1002 buildCounterMetricUpdate--;
1003 }
1004
1005 core.int buildCounterMountedDataDisk = 0;
1006 buildMountedDataDisk() {
1007 var o = new api.MountedDataDisk();
1008 buildCounterMountedDataDisk++;
1009 if (buildCounterMountedDataDisk < 3) {
1010 o.dataDisk = "foo";
1011 }
1012 buildCounterMountedDataDisk--;
1013 return o;
1014 }
1015
1016 checkMountedDataDisk(api.MountedDataDisk o) {
1017 buildCounterMountedDataDisk++;
1018 if (buildCounterMountedDataDisk < 3) {
1019 unittest.expect(o.dataDisk, unittest.equals('foo'));
1020 }
1021 buildCounterMountedDataDisk--;
1022 }
1023
1024 core.int buildCounterMultiOutputInfo = 0;
1025 buildMultiOutputInfo() {
1026 var o = new api.MultiOutputInfo();
1027 buildCounterMultiOutputInfo++;
1028 if (buildCounterMultiOutputInfo < 3) {
1029 o.tag = "foo";
1030 }
1031 buildCounterMultiOutputInfo--;
1032 return o;
1033 }
1034
1035 checkMultiOutputInfo(api.MultiOutputInfo o) {
1036 buildCounterMultiOutputInfo++;
1037 if (buildCounterMultiOutputInfo < 3) {
1038 unittest.expect(o.tag, unittest.equals('foo'));
1039 }
1040 buildCounterMultiOutputInfo--;
1041 }
1042
1043 core.int buildCounterPackage = 0;
1044 buildPackage() {
1045 var o = new api.Package();
1046 buildCounterPackage++;
1047 if (buildCounterPackage < 3) {
1048 o.location = "foo";
1049 o.name = "foo";
1050 }
1051 buildCounterPackage--;
1052 return o;
1053 }
1054
1055 checkPackage(api.Package o) {
1056 buildCounterPackage++;
1057 if (buildCounterPackage < 3) {
1058 unittest.expect(o.location, unittest.equals('foo'));
1059 unittest.expect(o.name, unittest.equals('foo'));
1060 }
1061 buildCounterPackage--;
1062 }
1063
1064 buildUnnamed2412() {
1065 var o = new core.List<api.MultiOutputInfo>();
1066 o.add(buildMultiOutputInfo());
1067 o.add(buildMultiOutputInfo());
1068 return o;
1069 }
1070
1071 checkUnnamed2412(core.List<api.MultiOutputInfo> o) {
1072 unittest.expect(o, unittest.hasLength(2));
1073 checkMultiOutputInfo(o[0]);
1074 checkMultiOutputInfo(o[1]);
1075 }
1076
1077 buildUnnamed2413() {
1078 var o = new core.List<api.SideInputInfo>();
1079 o.add(buildSideInputInfo());
1080 o.add(buildSideInputInfo());
1081 return o;
1082 }
1083
1084 checkUnnamed2413(core.List<api.SideInputInfo> o) {
1085 unittest.expect(o, unittest.hasLength(2));
1086 checkSideInputInfo(o[0]);
1087 checkSideInputInfo(o[1]);
1088 }
1089
1090 buildUnnamed2414() {
1091 var o = new core.Map<core.String, core.Object>();
1092 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1093 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1094 return o;
1095 }
1096
1097 checkUnnamed2414(core.Map<core.String, core.Object> o) {
1098 unittest.expect(o, unittest.hasLength(2));
1099 var casted16 = (o["x"]) as core.Map; unittest.expect(casted16, unittest.hasLen gth(3)); unittest.expect(casted16["list"], unittest.equals([1, 2, 3])); unittest .expect(casted16["bool"], unittest.equals(true)); unittest.expect(casted16["stri ng"], unittest.equals('foo'));
1100 var casted17 = (o["y"]) as core.Map; unittest.expect(casted17, unittest.hasLen gth(3)); unittest.expect(casted17["list"], unittest.equals([1, 2, 3])); unittest .expect(casted17["bool"], unittest.equals(true)); unittest.expect(casted17["stri ng"], unittest.equals('foo'));
1101 }
1102
1103 core.int buildCounterParDoInstruction = 0;
1104 buildParDoInstruction() {
1105 var o = new api.ParDoInstruction();
1106 buildCounterParDoInstruction++;
1107 if (buildCounterParDoInstruction < 3) {
1108 o.input = buildInstructionInput();
1109 o.multiOutputInfos = buildUnnamed2412();
1110 o.numOutputs = 42;
1111 o.sideInputs = buildUnnamed2413();
1112 o.userFn = buildUnnamed2414();
1113 }
1114 buildCounterParDoInstruction--;
1115 return o;
1116 }
1117
1118 checkParDoInstruction(api.ParDoInstruction o) {
1119 buildCounterParDoInstruction++;
1120 if (buildCounterParDoInstruction < 3) {
1121 checkInstructionInput(o.input);
1122 checkUnnamed2412(o.multiOutputInfos);
1123 unittest.expect(o.numOutputs, unittest.equals(42));
1124 checkUnnamed2413(o.sideInputs);
1125 checkUnnamed2414(o.userFn);
1126 }
1127 buildCounterParDoInstruction--;
1128 }
1129
1130 buildUnnamed2415() {
1131 var o = new core.List<api.InstructionOutput>();
1132 o.add(buildInstructionOutput());
1133 o.add(buildInstructionOutput());
1134 return o;
1135 }
1136
1137 checkUnnamed2415(core.List<api.InstructionOutput> o) {
1138 unittest.expect(o, unittest.hasLength(2));
1139 checkInstructionOutput(o[0]);
1140 checkInstructionOutput(o[1]);
1141 }
1142
1143 core.int buildCounterParallelInstruction = 0;
1144 buildParallelInstruction() {
1145 var o = new api.ParallelInstruction();
1146 buildCounterParallelInstruction++;
1147 if (buildCounterParallelInstruction < 3) {
1148 o.flatten = buildFlattenInstruction();
1149 o.name = "foo";
1150 o.outputs = buildUnnamed2415();
1151 o.parDo = buildParDoInstruction();
1152 o.partialGroupByKey = buildPartialGroupByKeyInstruction();
1153 o.read = buildReadInstruction();
1154 o.systemName = "foo";
1155 o.write = buildWriteInstruction();
1156 }
1157 buildCounterParallelInstruction--;
1158 return o;
1159 }
1160
1161 checkParallelInstruction(api.ParallelInstruction o) {
1162 buildCounterParallelInstruction++;
1163 if (buildCounterParallelInstruction < 3) {
1164 checkFlattenInstruction(o.flatten);
1165 unittest.expect(o.name, unittest.equals('foo'));
1166 checkUnnamed2415(o.outputs);
1167 checkParDoInstruction(o.parDo);
1168 checkPartialGroupByKeyInstruction(o.partialGroupByKey);
1169 checkReadInstruction(o.read);
1170 unittest.expect(o.systemName, unittest.equals('foo'));
1171 checkWriteInstruction(o.write);
1172 }
1173 buildCounterParallelInstruction--;
1174 }
1175
1176 buildUnnamed2416() {
1177 var o = new core.Map<core.String, core.Object>();
1178 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1179 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1180 return o;
1181 }
1182
1183 checkUnnamed2416(core.Map<core.String, core.Object> o) {
1184 unittest.expect(o, unittest.hasLength(2));
1185 var casted18 = (o["x"]) as core.Map; unittest.expect(casted18, unittest.hasLen gth(3)); unittest.expect(casted18["list"], unittest.equals([1, 2, 3])); unittest .expect(casted18["bool"], unittest.equals(true)); unittest.expect(casted18["stri ng"], unittest.equals('foo'));
1186 var casted19 = (o["y"]) as core.Map; unittest.expect(casted19, unittest.hasLen gth(3)); unittest.expect(casted19["list"], unittest.equals([1, 2, 3])); unittest .expect(casted19["bool"], unittest.equals(true)); unittest.expect(casted19["stri ng"], unittest.equals('foo'));
1187 }
1188
1189 buildUnnamed2417() {
1190 var o = new core.Map<core.String, core.Object>();
1191 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1192 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1193 return o;
1194 }
1195
1196 checkUnnamed2417(core.Map<core.String, core.Object> o) {
1197 unittest.expect(o, unittest.hasLength(2));
1198 var casted20 = (o["x"]) as core.Map; unittest.expect(casted20, unittest.hasLen gth(3)); unittest.expect(casted20["list"], unittest.equals([1, 2, 3])); unittest .expect(casted20["bool"], unittest.equals(true)); unittest.expect(casted20["stri ng"], unittest.equals('foo'));
1199 var casted21 = (o["y"]) as core.Map; unittest.expect(casted21, unittest.hasLen gth(3)); unittest.expect(casted21["list"], unittest.equals([1, 2, 3])); unittest .expect(casted21["bool"], unittest.equals(true)); unittest.expect(casted21["stri ng"], unittest.equals('foo'));
1200 }
1201
1202 core.int buildCounterPartialGroupByKeyInstruction = 0;
1203 buildPartialGroupByKeyInstruction() {
1204 var o = new api.PartialGroupByKeyInstruction();
1205 buildCounterPartialGroupByKeyInstruction++;
1206 if (buildCounterPartialGroupByKeyInstruction < 3) {
1207 o.input = buildInstructionInput();
1208 o.inputElementCodec = buildUnnamed2416();
1209 o.valueCombiningFn = buildUnnamed2417();
1210 }
1211 buildCounterPartialGroupByKeyInstruction--;
1212 return o;
1213 }
1214
1215 checkPartialGroupByKeyInstruction(api.PartialGroupByKeyInstruction o) {
1216 buildCounterPartialGroupByKeyInstruction++;
1217 if (buildCounterPartialGroupByKeyInstruction < 3) {
1218 checkInstructionInput(o.input);
1219 checkUnnamed2416(o.inputElementCodec);
1220 checkUnnamed2417(o.valueCombiningFn);
1221 }
1222 buildCounterPartialGroupByKeyInstruction--;
1223 }
1224
1225 core.int buildCounterPosition = 0;
1226 buildPosition() {
1227 var o = new api.Position();
1228 buildCounterPosition++;
1229 if (buildCounterPosition < 3) {
1230 o.byteOffset = "foo";
1231 o.end = true;
1232 o.key = "foo";
1233 o.recordIndex = "foo";
1234 o.shufflePosition = "foo";
1235 }
1236 buildCounterPosition--;
1237 return o;
1238 }
1239
1240 checkPosition(api.Position o) {
1241 buildCounterPosition++;
1242 if (buildCounterPosition < 3) {
1243 unittest.expect(o.byteOffset, unittest.equals('foo'));
1244 unittest.expect(o.end, unittest.isTrue);
1245 unittest.expect(o.key, unittest.equals('foo'));
1246 unittest.expect(o.recordIndex, unittest.equals('foo'));
1247 unittest.expect(o.shufflePosition, unittest.equals('foo'));
1248 }
1249 buildCounterPosition--;
1250 }
1251
1252 core.int buildCounterPubsubLocation = 0;
1253 buildPubsubLocation() {
1254 var o = new api.PubsubLocation();
1255 buildCounterPubsubLocation++;
1256 if (buildCounterPubsubLocation < 3) {
1257 o.dropLateData = true;
1258 o.idLabel = "foo";
1259 o.subscription = "foo";
1260 o.timestampLabel = "foo";
1261 o.topic = "foo";
1262 o.trackingSubscription = "foo";
1263 }
1264 buildCounterPubsubLocation--;
1265 return o;
1266 }
1267
1268 checkPubsubLocation(api.PubsubLocation o) {
1269 buildCounterPubsubLocation++;
1270 if (buildCounterPubsubLocation < 3) {
1271 unittest.expect(o.dropLateData, unittest.isTrue);
1272 unittest.expect(o.idLabel, unittest.equals('foo'));
1273 unittest.expect(o.subscription, unittest.equals('foo'));
1274 unittest.expect(o.timestampLabel, unittest.equals('foo'));
1275 unittest.expect(o.topic, unittest.equals('foo'));
1276 unittest.expect(o.trackingSubscription, unittest.equals('foo'));
1277 }
1278 buildCounterPubsubLocation--;
1279 }
1280
1281 core.int buildCounterReadInstruction = 0;
1282 buildReadInstruction() {
1283 var o = new api.ReadInstruction();
1284 buildCounterReadInstruction++;
1285 if (buildCounterReadInstruction < 3) {
1286 o.source = buildSource();
1287 }
1288 buildCounterReadInstruction--;
1289 return o;
1290 }
1291
1292 checkReadInstruction(api.ReadInstruction o) {
1293 buildCounterReadInstruction++;
1294 if (buildCounterReadInstruction < 3) {
1295 checkSource(o.source);
1296 }
1297 buildCounterReadInstruction--;
1298 }
1299
1300 buildUnnamed2418() {
1301 var o = new core.List<api.WorkItemStatus>();
1302 o.add(buildWorkItemStatus());
1303 o.add(buildWorkItemStatus());
1304 return o;
1305 }
1306
1307 checkUnnamed2418(core.List<api.WorkItemStatus> o) {
1308 unittest.expect(o, unittest.hasLength(2));
1309 checkWorkItemStatus(o[0]);
1310 checkWorkItemStatus(o[1]);
1311 }
1312
1313 core.int buildCounterReportWorkItemStatusRequest = 0;
1314 buildReportWorkItemStatusRequest() {
1315 var o = new api.ReportWorkItemStatusRequest();
1316 buildCounterReportWorkItemStatusRequest++;
1317 if (buildCounterReportWorkItemStatusRequest < 3) {
1318 o.currentWorkerTime = "foo";
1319 o.workItemStatuses = buildUnnamed2418();
1320 o.workerId = "foo";
1321 }
1322 buildCounterReportWorkItemStatusRequest--;
1323 return o;
1324 }
1325
1326 checkReportWorkItemStatusRequest(api.ReportWorkItemStatusRequest o) {
1327 buildCounterReportWorkItemStatusRequest++;
1328 if (buildCounterReportWorkItemStatusRequest < 3) {
1329 unittest.expect(o.currentWorkerTime, unittest.equals('foo'));
1330 checkUnnamed2418(o.workItemStatuses);
1331 unittest.expect(o.workerId, unittest.equals('foo'));
1332 }
1333 buildCounterReportWorkItemStatusRequest--;
1334 }
1335
1336 buildUnnamed2419() {
1337 var o = new core.List<api.WorkItemServiceState>();
1338 o.add(buildWorkItemServiceState());
1339 o.add(buildWorkItemServiceState());
1340 return o;
1341 }
1342
1343 checkUnnamed2419(core.List<api.WorkItemServiceState> o) {
1344 unittest.expect(o, unittest.hasLength(2));
1345 checkWorkItemServiceState(o[0]);
1346 checkWorkItemServiceState(o[1]);
1347 }
1348
1349 core.int buildCounterReportWorkItemStatusResponse = 0;
1350 buildReportWorkItemStatusResponse() {
1351 var o = new api.ReportWorkItemStatusResponse();
1352 buildCounterReportWorkItemStatusResponse++;
1353 if (buildCounterReportWorkItemStatusResponse < 3) {
1354 o.workItemServiceStates = buildUnnamed2419();
1355 }
1356 buildCounterReportWorkItemStatusResponse--;
1357 return o;
1358 }
1359
1360 checkReportWorkItemStatusResponse(api.ReportWorkItemStatusResponse o) {
1361 buildCounterReportWorkItemStatusResponse++;
1362 if (buildCounterReportWorkItemStatusResponse < 3) {
1363 checkUnnamed2419(o.workItemServiceStates);
1364 }
1365 buildCounterReportWorkItemStatusResponse--;
1366 }
1367
1368 buildUnnamed2420() {
1369 var o = new core.List<api.SideInputInfo>();
1370 o.add(buildSideInputInfo());
1371 o.add(buildSideInputInfo());
1372 return o;
1373 }
1374
1375 checkUnnamed2420(core.List<api.SideInputInfo> o) {
1376 unittest.expect(o, unittest.hasLength(2));
1377 checkSideInputInfo(o[0]);
1378 checkSideInputInfo(o[1]);
1379 }
1380
1381 buildUnnamed2421() {
1382 var o = new core.List<api.SeqMapTaskOutputInfo>();
1383 o.add(buildSeqMapTaskOutputInfo());
1384 o.add(buildSeqMapTaskOutputInfo());
1385 return o;
1386 }
1387
1388 checkUnnamed2421(core.List<api.SeqMapTaskOutputInfo> o) {
1389 unittest.expect(o, unittest.hasLength(2));
1390 checkSeqMapTaskOutputInfo(o[0]);
1391 checkSeqMapTaskOutputInfo(o[1]);
1392 }
1393
1394 buildUnnamed2422() {
1395 var o = new core.Map<core.String, core.Object>();
1396 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1397 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1398 return o;
1399 }
1400
1401 checkUnnamed2422(core.Map<core.String, core.Object> o) {
1402 unittest.expect(o, unittest.hasLength(2));
1403 var casted22 = (o["x"]) as core.Map; unittest.expect(casted22, unittest.hasLen gth(3)); unittest.expect(casted22["list"], unittest.equals([1, 2, 3])); unittest .expect(casted22["bool"], unittest.equals(true)); unittest.expect(casted22["stri ng"], unittest.equals('foo'));
1404 var casted23 = (o["y"]) as core.Map; unittest.expect(casted23, unittest.hasLen gth(3)); unittest.expect(casted23["list"], unittest.equals([1, 2, 3])); unittest .expect(casted23["bool"], unittest.equals(true)); unittest.expect(casted23["stri ng"], unittest.equals('foo'));
1405 }
1406
1407 core.int buildCounterSeqMapTask = 0;
1408 buildSeqMapTask() {
1409 var o = new api.SeqMapTask();
1410 buildCounterSeqMapTask++;
1411 if (buildCounterSeqMapTask < 3) {
1412 o.inputs = buildUnnamed2420();
1413 o.name = "foo";
1414 o.outputInfos = buildUnnamed2421();
1415 o.stageName = "foo";
1416 o.systemName = "foo";
1417 o.userFn = buildUnnamed2422();
1418 }
1419 buildCounterSeqMapTask--;
1420 return o;
1421 }
1422
1423 checkSeqMapTask(api.SeqMapTask o) {
1424 buildCounterSeqMapTask++;
1425 if (buildCounterSeqMapTask < 3) {
1426 checkUnnamed2420(o.inputs);
1427 unittest.expect(o.name, unittest.equals('foo'));
1428 checkUnnamed2421(o.outputInfos);
1429 unittest.expect(o.stageName, unittest.equals('foo'));
1430 unittest.expect(o.systemName, unittest.equals('foo'));
1431 checkUnnamed2422(o.userFn);
1432 }
1433 buildCounterSeqMapTask--;
1434 }
1435
1436 core.int buildCounterSeqMapTaskOutputInfo = 0;
1437 buildSeqMapTaskOutputInfo() {
1438 var o = new api.SeqMapTaskOutputInfo();
1439 buildCounterSeqMapTaskOutputInfo++;
1440 if (buildCounterSeqMapTaskOutputInfo < 3) {
1441 o.sink = buildSink();
1442 o.tag = "foo";
1443 }
1444 buildCounterSeqMapTaskOutputInfo--;
1445 return o;
1446 }
1447
1448 checkSeqMapTaskOutputInfo(api.SeqMapTaskOutputInfo o) {
1449 buildCounterSeqMapTaskOutputInfo++;
1450 if (buildCounterSeqMapTaskOutputInfo < 3) {
1451 checkSink(o.sink);
1452 unittest.expect(o.tag, unittest.equals('foo'));
1453 }
1454 buildCounterSeqMapTaskOutputInfo--;
1455 }
1456
1457 core.int buildCounterShellTask = 0;
1458 buildShellTask() {
1459 var o = new api.ShellTask();
1460 buildCounterShellTask++;
1461 if (buildCounterShellTask < 3) {
1462 o.command = "foo";
1463 o.exitCode = 42;
1464 }
1465 buildCounterShellTask--;
1466 return o;
1467 }
1468
1469 checkShellTask(api.ShellTask o) {
1470 buildCounterShellTask++;
1471 if (buildCounterShellTask < 3) {
1472 unittest.expect(o.command, unittest.equals('foo'));
1473 unittest.expect(o.exitCode, unittest.equals(42));
1474 }
1475 buildCounterShellTask--;
1476 }
1477
1478 buildUnnamed2423() {
1479 var o = new core.Map<core.String, core.Object>();
1480 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1481 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1482 return o;
1483 }
1484
1485 checkUnnamed2423(core.Map<core.String, core.Object> o) {
1486 unittest.expect(o, unittest.hasLength(2));
1487 var casted24 = (o["x"]) as core.Map; unittest.expect(casted24, unittest.hasLen gth(3)); unittest.expect(casted24["list"], unittest.equals([1, 2, 3])); unittest .expect(casted24["bool"], unittest.equals(true)); unittest.expect(casted24["stri ng"], unittest.equals('foo'));
1488 var casted25 = (o["y"]) as core.Map; unittest.expect(casted25, unittest.hasLen gth(3)); unittest.expect(casted25["list"], unittest.equals([1, 2, 3])); unittest .expect(casted25["bool"], unittest.equals(true)); unittest.expect(casted25["stri ng"], unittest.equals('foo'));
1489 }
1490
1491 buildUnnamed2424() {
1492 var o = new core.List<api.Source>();
1493 o.add(buildSource());
1494 o.add(buildSource());
1495 return o;
1496 }
1497
1498 checkUnnamed2424(core.List<api.Source> o) {
1499 unittest.expect(o, unittest.hasLength(2));
1500 checkSource(o[0]);
1501 checkSource(o[1]);
1502 }
1503
1504 core.int buildCounterSideInputInfo = 0;
1505 buildSideInputInfo() {
1506 var o = new api.SideInputInfo();
1507 buildCounterSideInputInfo++;
1508 if (buildCounterSideInputInfo < 3) {
1509 o.kind = buildUnnamed2423();
1510 o.sources = buildUnnamed2424();
1511 o.tag = "foo";
1512 }
1513 buildCounterSideInputInfo--;
1514 return o;
1515 }
1516
1517 checkSideInputInfo(api.SideInputInfo o) {
1518 buildCounterSideInputInfo++;
1519 if (buildCounterSideInputInfo < 3) {
1520 checkUnnamed2423(o.kind);
1521 checkUnnamed2424(o.sources);
1522 unittest.expect(o.tag, unittest.equals('foo'));
1523 }
1524 buildCounterSideInputInfo--;
1525 }
1526
1527 buildUnnamed2425() {
1528 var o = new core.Map<core.String, core.Object>();
1529 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1530 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1531 return o;
1532 }
1533
1534 checkUnnamed2425(core.Map<core.String, core.Object> o) {
1535 unittest.expect(o, unittest.hasLength(2));
1536 var casted26 = (o["x"]) as core.Map; unittest.expect(casted26, unittest.hasLen gth(3)); unittest.expect(casted26["list"], unittest.equals([1, 2, 3])); unittest .expect(casted26["bool"], unittest.equals(true)); unittest.expect(casted26["stri ng"], unittest.equals('foo'));
1537 var casted27 = (o["y"]) as core.Map; unittest.expect(casted27, unittest.hasLen gth(3)); unittest.expect(casted27["list"], unittest.equals([1, 2, 3])); unittest .expect(casted27["bool"], unittest.equals(true)); unittest.expect(casted27["stri ng"], unittest.equals('foo'));
1538 }
1539
1540 buildUnnamed2426() {
1541 var o = new core.Map<core.String, core.Object>();
1542 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1543 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1544 return o;
1545 }
1546
1547 checkUnnamed2426(core.Map<core.String, core.Object> o) {
1548 unittest.expect(o, unittest.hasLength(2));
1549 var casted28 = (o["x"]) as core.Map; unittest.expect(casted28, unittest.hasLen gth(3)); unittest.expect(casted28["list"], unittest.equals([1, 2, 3])); unittest .expect(casted28["bool"], unittest.equals(true)); unittest.expect(casted28["stri ng"], unittest.equals('foo'));
1550 var casted29 = (o["y"]) as core.Map; unittest.expect(casted29, unittest.hasLen gth(3)); unittest.expect(casted29["list"], unittest.equals([1, 2, 3])); unittest .expect(casted29["bool"], unittest.equals(true)); unittest.expect(casted29["stri ng"], unittest.equals('foo'));
1551 }
1552
1553 core.int buildCounterSink = 0;
1554 buildSink() {
1555 var o = new api.Sink();
1556 buildCounterSink++;
1557 if (buildCounterSink < 3) {
1558 o.codec = buildUnnamed2425();
1559 o.spec = buildUnnamed2426();
1560 }
1561 buildCounterSink--;
1562 return o;
1563 }
1564
1565 checkSink(api.Sink o) {
1566 buildCounterSink++;
1567 if (buildCounterSink < 3) {
1568 checkUnnamed2425(o.codec);
1569 checkUnnamed2426(o.spec);
1570 }
1571 buildCounterSink--;
1572 }
1573
1574 buildUnnamed2427() {
1575 var o = new core.Map<core.String, core.Object>();
1576 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1577 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1578 return o;
1579 }
1580
1581 checkUnnamed2427(core.Map<core.String, core.Object> o) {
1582 unittest.expect(o, unittest.hasLength(2));
1583 var casted30 = (o["x"]) as core.Map; unittest.expect(casted30, unittest.hasLen gth(3)); unittest.expect(casted30["list"], unittest.equals([1, 2, 3])); unittest .expect(casted30["bool"], unittest.equals(true)); unittest.expect(casted30["stri ng"], unittest.equals('foo'));
1584 var casted31 = (o["y"]) as core.Map; unittest.expect(casted31, unittest.hasLen gth(3)); unittest.expect(casted31["list"], unittest.equals([1, 2, 3])); unittest .expect(casted31["bool"], unittest.equals(true)); unittest.expect(casted31["stri ng"], unittest.equals('foo'));
1585 }
1586
1587 buildUnnamed2428() {
1588 var o = new core.List<core.Map<core.String, core.Object>>();
1589 o.add(buildUnnamed2427());
1590 o.add(buildUnnamed2427());
1591 return o;
1592 }
1593
1594 checkUnnamed2428(core.List<core.Map<core.String, core.Object>> o) {
1595 unittest.expect(o, unittest.hasLength(2));
1596 checkUnnamed2427(o[0]);
1597 checkUnnamed2427(o[1]);
1598 }
1599
1600 buildUnnamed2429() {
1601 var o = new core.Map<core.String, core.Object>();
1602 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1603 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1604 return o;
1605 }
1606
1607 checkUnnamed2429(core.Map<core.String, core.Object> o) {
1608 unittest.expect(o, unittest.hasLength(2));
1609 var casted32 = (o["x"]) as core.Map; unittest.expect(casted32, unittest.hasLen gth(3)); unittest.expect(casted32["list"], unittest.equals([1, 2, 3])); unittest .expect(casted32["bool"], unittest.equals(true)); unittest.expect(casted32["stri ng"], unittest.equals('foo'));
1610 var casted33 = (o["y"]) as core.Map; unittest.expect(casted33, unittest.hasLen gth(3)); unittest.expect(casted33["list"], unittest.equals([1, 2, 3])); unittest .expect(casted33["bool"], unittest.equals(true)); unittest.expect(casted33["stri ng"], unittest.equals('foo'));
1611 }
1612
1613 buildUnnamed2430() {
1614 var o = new core.Map<core.String, core.Object>();
1615 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1616 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1617 return o;
1618 }
1619
1620 checkUnnamed2430(core.Map<core.String, core.Object> o) {
1621 unittest.expect(o, unittest.hasLength(2));
1622 var casted34 = (o["x"]) as core.Map; unittest.expect(casted34, unittest.hasLen gth(3)); unittest.expect(casted34["list"], unittest.equals([1, 2, 3])); unittest .expect(casted34["bool"], unittest.equals(true)); unittest.expect(casted34["stri ng"], unittest.equals('foo'));
1623 var casted35 = (o["y"]) as core.Map; unittest.expect(casted35, unittest.hasLen gth(3)); unittest.expect(casted35["list"], unittest.equals([1, 2, 3])); unittest .expect(casted35["bool"], unittest.equals(true)); unittest.expect(casted35["stri ng"], unittest.equals('foo'));
1624 }
1625
1626 core.int buildCounterSource = 0;
1627 buildSource() {
1628 var o = new api.Source();
1629 buildCounterSource++;
1630 if (buildCounterSource < 3) {
1631 o.baseSpecs = buildUnnamed2428();
1632 o.codec = buildUnnamed2429();
1633 o.doesNotNeedSplitting = true;
1634 o.metadata = buildSourceMetadata();
1635 o.spec = buildUnnamed2430();
1636 }
1637 buildCounterSource--;
1638 return o;
1639 }
1640
1641 checkSource(api.Source o) {
1642 buildCounterSource++;
1643 if (buildCounterSource < 3) {
1644 checkUnnamed2428(o.baseSpecs);
1645 checkUnnamed2429(o.codec);
1646 unittest.expect(o.doesNotNeedSplitting, unittest.isTrue);
1647 checkSourceMetadata(o.metadata);
1648 checkUnnamed2430(o.spec);
1649 }
1650 buildCounterSource--;
1651 }
1652
1653 core.int buildCounterSourceFork = 0;
1654 buildSourceFork() {
1655 var o = new api.SourceFork();
1656 buildCounterSourceFork++;
1657 if (buildCounterSourceFork < 3) {
1658 o.primary = buildSourceSplitShard();
1659 o.primarySource = buildDerivedSource();
1660 o.residual = buildSourceSplitShard();
1661 o.residualSource = buildDerivedSource();
1662 }
1663 buildCounterSourceFork--;
1664 return o;
1665 }
1666
1667 checkSourceFork(api.SourceFork o) {
1668 buildCounterSourceFork++;
1669 if (buildCounterSourceFork < 3) {
1670 checkSourceSplitShard(o.primary);
1671 checkDerivedSource(o.primarySource);
1672 checkSourceSplitShard(o.residual);
1673 checkDerivedSource(o.residualSource);
1674 }
1675 buildCounterSourceFork--;
1676 }
1677
1678 core.int buildCounterSourceGetMetadataRequest = 0;
1679 buildSourceGetMetadataRequest() {
1680 var o = new api.SourceGetMetadataRequest();
1681 buildCounterSourceGetMetadataRequest++;
1682 if (buildCounterSourceGetMetadataRequest < 3) {
1683 o.source = buildSource();
1684 }
1685 buildCounterSourceGetMetadataRequest--;
1686 return o;
1687 }
1688
1689 checkSourceGetMetadataRequest(api.SourceGetMetadataRequest o) {
1690 buildCounterSourceGetMetadataRequest++;
1691 if (buildCounterSourceGetMetadataRequest < 3) {
1692 checkSource(o.source);
1693 }
1694 buildCounterSourceGetMetadataRequest--;
1695 }
1696
1697 core.int buildCounterSourceGetMetadataResponse = 0;
1698 buildSourceGetMetadataResponse() {
1699 var o = new api.SourceGetMetadataResponse();
1700 buildCounterSourceGetMetadataResponse++;
1701 if (buildCounterSourceGetMetadataResponse < 3) {
1702 o.metadata = buildSourceMetadata();
1703 }
1704 buildCounterSourceGetMetadataResponse--;
1705 return o;
1706 }
1707
1708 checkSourceGetMetadataResponse(api.SourceGetMetadataResponse o) {
1709 buildCounterSourceGetMetadataResponse++;
1710 if (buildCounterSourceGetMetadataResponse < 3) {
1711 checkSourceMetadata(o.metadata);
1712 }
1713 buildCounterSourceGetMetadataResponse--;
1714 }
1715
1716 core.int buildCounterSourceMetadata = 0;
1717 buildSourceMetadata() {
1718 var o = new api.SourceMetadata();
1719 buildCounterSourceMetadata++;
1720 if (buildCounterSourceMetadata < 3) {
1721 o.estimatedSizeBytes = "foo";
1722 o.infinite = true;
1723 o.producesSortedKeys = true;
1724 }
1725 buildCounterSourceMetadata--;
1726 return o;
1727 }
1728
1729 checkSourceMetadata(api.SourceMetadata o) {
1730 buildCounterSourceMetadata++;
1731 if (buildCounterSourceMetadata < 3) {
1732 unittest.expect(o.estimatedSizeBytes, unittest.equals('foo'));
1733 unittest.expect(o.infinite, unittest.isTrue);
1734 unittest.expect(o.producesSortedKeys, unittest.isTrue);
1735 }
1736 buildCounterSourceMetadata--;
1737 }
1738
1739 core.int buildCounterSourceOperationRequest = 0;
1740 buildSourceOperationRequest() {
1741 var o = new api.SourceOperationRequest();
1742 buildCounterSourceOperationRequest++;
1743 if (buildCounterSourceOperationRequest < 3) {
1744 o.getMetadata = buildSourceGetMetadataRequest();
1745 o.split = buildSourceSplitRequest();
1746 }
1747 buildCounterSourceOperationRequest--;
1748 return o;
1749 }
1750
1751 checkSourceOperationRequest(api.SourceOperationRequest o) {
1752 buildCounterSourceOperationRequest++;
1753 if (buildCounterSourceOperationRequest < 3) {
1754 checkSourceGetMetadataRequest(o.getMetadata);
1755 checkSourceSplitRequest(o.split);
1756 }
1757 buildCounterSourceOperationRequest--;
1758 }
1759
1760 core.int buildCounterSourceOperationResponse = 0;
1761 buildSourceOperationResponse() {
1762 var o = new api.SourceOperationResponse();
1763 buildCounterSourceOperationResponse++;
1764 if (buildCounterSourceOperationResponse < 3) {
1765 o.getMetadata = buildSourceGetMetadataResponse();
1766 o.split = buildSourceSplitResponse();
1767 }
1768 buildCounterSourceOperationResponse--;
1769 return o;
1770 }
1771
1772 checkSourceOperationResponse(api.SourceOperationResponse o) {
1773 buildCounterSourceOperationResponse++;
1774 if (buildCounterSourceOperationResponse < 3) {
1775 checkSourceGetMetadataResponse(o.getMetadata);
1776 checkSourceSplitResponse(o.split);
1777 }
1778 buildCounterSourceOperationResponse--;
1779 }
1780
1781 core.int buildCounterSourceSplitOptions = 0;
1782 buildSourceSplitOptions() {
1783 var o = new api.SourceSplitOptions();
1784 buildCounterSourceSplitOptions++;
1785 if (buildCounterSourceSplitOptions < 3) {
1786 o.desiredBundleSizeBytes = "foo";
1787 o.desiredShardSizeBytes = "foo";
1788 }
1789 buildCounterSourceSplitOptions--;
1790 return o;
1791 }
1792
1793 checkSourceSplitOptions(api.SourceSplitOptions o) {
1794 buildCounterSourceSplitOptions++;
1795 if (buildCounterSourceSplitOptions < 3) {
1796 unittest.expect(o.desiredBundleSizeBytes, unittest.equals('foo'));
1797 unittest.expect(o.desiredShardSizeBytes, unittest.equals('foo'));
1798 }
1799 buildCounterSourceSplitOptions--;
1800 }
1801
1802 core.int buildCounterSourceSplitRequest = 0;
1803 buildSourceSplitRequest() {
1804 var o = new api.SourceSplitRequest();
1805 buildCounterSourceSplitRequest++;
1806 if (buildCounterSourceSplitRequest < 3) {
1807 o.options = buildSourceSplitOptions();
1808 o.source = buildSource();
1809 }
1810 buildCounterSourceSplitRequest--;
1811 return o;
1812 }
1813
1814 checkSourceSplitRequest(api.SourceSplitRequest o) {
1815 buildCounterSourceSplitRequest++;
1816 if (buildCounterSourceSplitRequest < 3) {
1817 checkSourceSplitOptions(o.options);
1818 checkSource(o.source);
1819 }
1820 buildCounterSourceSplitRequest--;
1821 }
1822
1823 buildUnnamed2431() {
1824 var o = new core.List<api.DerivedSource>();
1825 o.add(buildDerivedSource());
1826 o.add(buildDerivedSource());
1827 return o;
1828 }
1829
1830 checkUnnamed2431(core.List<api.DerivedSource> o) {
1831 unittest.expect(o, unittest.hasLength(2));
1832 checkDerivedSource(o[0]);
1833 checkDerivedSource(o[1]);
1834 }
1835
1836 buildUnnamed2432() {
1837 var o = new core.List<api.SourceSplitShard>();
1838 o.add(buildSourceSplitShard());
1839 o.add(buildSourceSplitShard());
1840 return o;
1841 }
1842
1843 checkUnnamed2432(core.List<api.SourceSplitShard> o) {
1844 unittest.expect(o, unittest.hasLength(2));
1845 checkSourceSplitShard(o[0]);
1846 checkSourceSplitShard(o[1]);
1847 }
1848
1849 core.int buildCounterSourceSplitResponse = 0;
1850 buildSourceSplitResponse() {
1851 var o = new api.SourceSplitResponse();
1852 buildCounterSourceSplitResponse++;
1853 if (buildCounterSourceSplitResponse < 3) {
1854 o.bundles = buildUnnamed2431();
1855 o.outcome = "foo";
1856 o.shards = buildUnnamed2432();
1857 }
1858 buildCounterSourceSplitResponse--;
1859 return o;
1860 }
1861
1862 checkSourceSplitResponse(api.SourceSplitResponse o) {
1863 buildCounterSourceSplitResponse++;
1864 if (buildCounterSourceSplitResponse < 3) {
1865 checkUnnamed2431(o.bundles);
1866 unittest.expect(o.outcome, unittest.equals('foo'));
1867 checkUnnamed2432(o.shards);
1868 }
1869 buildCounterSourceSplitResponse--;
1870 }
1871
1872 core.int buildCounterSourceSplitShard = 0;
1873 buildSourceSplitShard() {
1874 var o = new api.SourceSplitShard();
1875 buildCounterSourceSplitShard++;
1876 if (buildCounterSourceSplitShard < 3) {
1877 o.derivationMode = "foo";
1878 o.source = buildSource();
1879 }
1880 buildCounterSourceSplitShard--;
1881 return o;
1882 }
1883
1884 checkSourceSplitShard(api.SourceSplitShard o) {
1885 buildCounterSourceSplitShard++;
1886 if (buildCounterSourceSplitShard < 3) {
1887 unittest.expect(o.derivationMode, unittest.equals('foo'));
1888 checkSource(o.source);
1889 }
1890 buildCounterSourceSplitShard--;
1891 }
1892
1893 core.int buildCounterStateFamilyConfig = 0;
1894 buildStateFamilyConfig() {
1895 var o = new api.StateFamilyConfig();
1896 buildCounterStateFamilyConfig++;
1897 if (buildCounterStateFamilyConfig < 3) {
1898 o.isRead = true;
1899 o.stateFamily = "foo";
1900 }
1901 buildCounterStateFamilyConfig--;
1902 return o;
1903 }
1904
1905 checkStateFamilyConfig(api.StateFamilyConfig o) {
1906 buildCounterStateFamilyConfig++;
1907 if (buildCounterStateFamilyConfig < 3) {
1908 unittest.expect(o.isRead, unittest.isTrue);
1909 unittest.expect(o.stateFamily, unittest.equals('foo'));
1910 }
1911 buildCounterStateFamilyConfig--;
1912 }
1913
1914 buildUnnamed2433() {
1915 var o = new core.Map<core.String, core.Object>();
1916 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1917 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1918 return o;
1919 }
1920
1921 checkUnnamed2433(core.Map<core.String, core.Object> o) {
1922 unittest.expect(o, unittest.hasLength(2));
1923 var casted36 = (o["x"]) as core.Map; unittest.expect(casted36, unittest.hasLen gth(3)); unittest.expect(casted36["list"], unittest.equals([1, 2, 3])); unittest .expect(casted36["bool"], unittest.equals(true)); unittest.expect(casted36["stri ng"], unittest.equals('foo'));
1924 var casted37 = (o["y"]) as core.Map; unittest.expect(casted37, unittest.hasLen gth(3)); unittest.expect(casted37["list"], unittest.equals([1, 2, 3])); unittest .expect(casted37["bool"], unittest.equals(true)); unittest.expect(casted37["stri ng"], unittest.equals('foo'));
1925 }
1926
1927 buildUnnamed2434() {
1928 var o = new core.List<core.Map<core.String, core.Object>>();
1929 o.add(buildUnnamed2433());
1930 o.add(buildUnnamed2433());
1931 return o;
1932 }
1933
1934 checkUnnamed2434(core.List<core.Map<core.String, core.Object>> o) {
1935 unittest.expect(o, unittest.hasLength(2));
1936 checkUnnamed2433(o[0]);
1937 checkUnnamed2433(o[1]);
1938 }
1939
1940 core.int buildCounterStatus = 0;
1941 buildStatus() {
1942 var o = new api.Status();
1943 buildCounterStatus++;
1944 if (buildCounterStatus < 3) {
1945 o.code = 42;
1946 o.details = buildUnnamed2434();
1947 o.message = "foo";
1948 }
1949 buildCounterStatus--;
1950 return o;
1951 }
1952
1953 checkStatus(api.Status o) {
1954 buildCounterStatus++;
1955 if (buildCounterStatus < 3) {
1956 unittest.expect(o.code, unittest.equals(42));
1957 checkUnnamed2434(o.details);
1958 unittest.expect(o.message, unittest.equals('foo'));
1959 }
1960 buildCounterStatus--;
1961 }
1962
1963 buildUnnamed2435() {
1964 var o = new core.Map<core.String, core.Object>();
1965 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1966 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
1967 return o;
1968 }
1969
1970 checkUnnamed2435(core.Map<core.String, core.Object> o) {
1971 unittest.expect(o, unittest.hasLength(2));
1972 var casted38 = (o["x"]) as core.Map; unittest.expect(casted38, unittest.hasLen gth(3)); unittest.expect(casted38["list"], unittest.equals([1, 2, 3])); unittest .expect(casted38["bool"], unittest.equals(true)); unittest.expect(casted38["stri ng"], unittest.equals('foo'));
1973 var casted39 = (o["y"]) as core.Map; unittest.expect(casted39, unittest.hasLen gth(3)); unittest.expect(casted39["list"], unittest.equals([1, 2, 3])); unittest .expect(casted39["bool"], unittest.equals(true)); unittest.expect(casted39["stri ng"], unittest.equals('foo'));
1974 }
1975
1976 core.int buildCounterStep = 0;
1977 buildStep() {
1978 var o = new api.Step();
1979 buildCounterStep++;
1980 if (buildCounterStep < 3) {
1981 o.kind = "foo";
1982 o.name = "foo";
1983 o.properties = buildUnnamed2435();
1984 }
1985 buildCounterStep--;
1986 return o;
1987 }
1988
1989 checkStep(api.Step o) {
1990 buildCounterStep++;
1991 if (buildCounterStep < 3) {
1992 unittest.expect(o.kind, unittest.equals('foo'));
1993 unittest.expect(o.name, unittest.equals('foo'));
1994 checkUnnamed2435(o.properties);
1995 }
1996 buildCounterStep--;
1997 }
1998
1999 core.int buildCounterStreamLocation = 0;
2000 buildStreamLocation() {
2001 var o = new api.StreamLocation();
2002 buildCounterStreamLocation++;
2003 if (buildCounterStreamLocation < 3) {
2004 o.customSourceLocation = buildCustomSourceLocation();
2005 o.pubsubLocation = buildPubsubLocation();
2006 o.sideInputLocation = buildStreamingSideInputLocation();
2007 o.streamingStageLocation = buildStreamingStageLocation();
2008 }
2009 buildCounterStreamLocation--;
2010 return o;
2011 }
2012
2013 checkStreamLocation(api.StreamLocation o) {
2014 buildCounterStreamLocation++;
2015 if (buildCounterStreamLocation < 3) {
2016 checkCustomSourceLocation(o.customSourceLocation);
2017 checkPubsubLocation(o.pubsubLocation);
2018 checkStreamingSideInputLocation(o.sideInputLocation);
2019 checkStreamingStageLocation(o.streamingStageLocation);
2020 }
2021 buildCounterStreamLocation--;
2022 }
2023
2024 buildUnnamed2436() {
2025 var o = new core.List<api.KeyRangeDataDiskAssignment>();
2026 o.add(buildKeyRangeDataDiskAssignment());
2027 o.add(buildKeyRangeDataDiskAssignment());
2028 return o;
2029 }
2030
2031 checkUnnamed2436(core.List<api.KeyRangeDataDiskAssignment> o) {
2032 unittest.expect(o, unittest.hasLength(2));
2033 checkKeyRangeDataDiskAssignment(o[0]);
2034 checkKeyRangeDataDiskAssignment(o[1]);
2035 }
2036
2037 core.int buildCounterStreamingComputationRanges = 0;
2038 buildStreamingComputationRanges() {
2039 var o = new api.StreamingComputationRanges();
2040 buildCounterStreamingComputationRanges++;
2041 if (buildCounterStreamingComputationRanges < 3) {
2042 o.computationId = "foo";
2043 o.rangeAssignments = buildUnnamed2436();
2044 }
2045 buildCounterStreamingComputationRanges--;
2046 return o;
2047 }
2048
2049 checkStreamingComputationRanges(api.StreamingComputationRanges o) {
2050 buildCounterStreamingComputationRanges++;
2051 if (buildCounterStreamingComputationRanges < 3) {
2052 unittest.expect(o.computationId, unittest.equals('foo'));
2053 checkUnnamed2436(o.rangeAssignments);
2054 }
2055 buildCounterStreamingComputationRanges--;
2056 }
2057
2058 buildUnnamed2437() {
2059 var o = new core.List<api.StreamingComputationRanges>();
2060 o.add(buildStreamingComputationRanges());
2061 o.add(buildStreamingComputationRanges());
2062 return o;
2063 }
2064
2065 checkUnnamed2437(core.List<api.StreamingComputationRanges> o) {
2066 unittest.expect(o, unittest.hasLength(2));
2067 checkStreamingComputationRanges(o[0]);
2068 checkStreamingComputationRanges(o[1]);
2069 }
2070
2071 buildUnnamed2438() {
2072 var o = new core.List<api.MountedDataDisk>();
2073 o.add(buildMountedDataDisk());
2074 o.add(buildMountedDataDisk());
2075 return o;
2076 }
2077
2078 checkUnnamed2438(core.List<api.MountedDataDisk> o) {
2079 unittest.expect(o, unittest.hasLength(2));
2080 checkMountedDataDisk(o[0]);
2081 checkMountedDataDisk(o[1]);
2082 }
2083
2084 core.int buildCounterStreamingComputationTask = 0;
2085 buildStreamingComputationTask() {
2086 var o = new api.StreamingComputationTask();
2087 buildCounterStreamingComputationTask++;
2088 if (buildCounterStreamingComputationTask < 3) {
2089 o.computationRanges = buildUnnamed2437();
2090 o.dataDisks = buildUnnamed2438();
2091 o.taskType = "foo";
2092 }
2093 buildCounterStreamingComputationTask--;
2094 return o;
2095 }
2096
2097 checkStreamingComputationTask(api.StreamingComputationTask o) {
2098 buildCounterStreamingComputationTask++;
2099 if (buildCounterStreamingComputationTask < 3) {
2100 checkUnnamed2437(o.computationRanges);
2101 checkUnnamed2438(o.dataDisks);
2102 unittest.expect(o.taskType, unittest.equals('foo'));
2103 }
2104 buildCounterStreamingComputationTask--;
2105 }
2106
2107 core.int buildCounterStreamingSetupTask = 0;
2108 buildStreamingSetupTask() {
2109 var o = new api.StreamingSetupTask();
2110 buildCounterStreamingSetupTask++;
2111 if (buildCounterStreamingSetupTask < 3) {
2112 o.receiveWorkPort = 42;
2113 o.streamingComputationTopology = buildTopologyConfig();
2114 o.workerHarnessPort = 42;
2115 }
2116 buildCounterStreamingSetupTask--;
2117 return o;
2118 }
2119
2120 checkStreamingSetupTask(api.StreamingSetupTask o) {
2121 buildCounterStreamingSetupTask++;
2122 if (buildCounterStreamingSetupTask < 3) {
2123 unittest.expect(o.receiveWorkPort, unittest.equals(42));
2124 checkTopologyConfig(o.streamingComputationTopology);
2125 unittest.expect(o.workerHarnessPort, unittest.equals(42));
2126 }
2127 buildCounterStreamingSetupTask--;
2128 }
2129
2130 core.int buildCounterStreamingSideInputLocation = 0;
2131 buildStreamingSideInputLocation() {
2132 var o = new api.StreamingSideInputLocation();
2133 buildCounterStreamingSideInputLocation++;
2134 if (buildCounterStreamingSideInputLocation < 3) {
2135 o.stateFamily = "foo";
2136 o.tag = "foo";
2137 }
2138 buildCounterStreamingSideInputLocation--;
2139 return o;
2140 }
2141
2142 checkStreamingSideInputLocation(api.StreamingSideInputLocation o) {
2143 buildCounterStreamingSideInputLocation++;
2144 if (buildCounterStreamingSideInputLocation < 3) {
2145 unittest.expect(o.stateFamily, unittest.equals('foo'));
2146 unittest.expect(o.tag, unittest.equals('foo'));
2147 }
2148 buildCounterStreamingSideInputLocation--;
2149 }
2150
2151 core.int buildCounterStreamingStageLocation = 0;
2152 buildStreamingStageLocation() {
2153 var o = new api.StreamingStageLocation();
2154 buildCounterStreamingStageLocation++;
2155 if (buildCounterStreamingStageLocation < 3) {
2156 o.streamId = "foo";
2157 }
2158 buildCounterStreamingStageLocation--;
2159 return o;
2160 }
2161
2162 checkStreamingStageLocation(api.StreamingStageLocation o) {
2163 buildCounterStreamingStageLocation++;
2164 if (buildCounterStreamingStageLocation < 3) {
2165 unittest.expect(o.streamId, unittest.equals('foo'));
2166 }
2167 buildCounterStreamingStageLocation--;
2168 }
2169
2170 buildUnnamed2439() {
2171 var o = new core.List<core.String>();
2172 o.add("foo");
2173 o.add("foo");
2174 return o;
2175 }
2176
2177 checkUnnamed2439(core.List<core.String> o) {
2178 unittest.expect(o, unittest.hasLength(2));
2179 unittest.expect(o[0], unittest.equals('foo'));
2180 unittest.expect(o[1], unittest.equals('foo'));
2181 }
2182
2183 core.int buildCounterTaskRunnerSettings = 0;
2184 buildTaskRunnerSettings() {
2185 var o = new api.TaskRunnerSettings();
2186 buildCounterTaskRunnerSettings++;
2187 if (buildCounterTaskRunnerSettings < 3) {
2188 o.alsologtostderr = true;
2189 o.baseTaskDir = "foo";
2190 o.baseUrl = "foo";
2191 o.commandlinesFileName = "foo";
2192 o.continueOnException = true;
2193 o.dataflowApiVersion = "foo";
2194 o.harnessCommand = "foo";
2195 o.languageHint = "foo";
2196 o.logDir = "foo";
2197 o.logToSerialconsole = true;
2198 o.logUploadLocation = "foo";
2199 o.oauthScopes = buildUnnamed2439();
2200 o.parallelWorkerSettings = buildWorkerSettings();
2201 o.streamingWorkerMainClass = "foo";
2202 o.taskGroup = "foo";
2203 o.taskUser = "foo";
2204 o.tempStoragePrefix = "foo";
2205 o.vmId = "foo";
2206 o.workflowFileName = "foo";
2207 }
2208 buildCounterTaskRunnerSettings--;
2209 return o;
2210 }
2211
2212 checkTaskRunnerSettings(api.TaskRunnerSettings o) {
2213 buildCounterTaskRunnerSettings++;
2214 if (buildCounterTaskRunnerSettings < 3) {
2215 unittest.expect(o.alsologtostderr, unittest.isTrue);
2216 unittest.expect(o.baseTaskDir, unittest.equals('foo'));
2217 unittest.expect(o.baseUrl, unittest.equals('foo'));
2218 unittest.expect(o.commandlinesFileName, unittest.equals('foo'));
2219 unittest.expect(o.continueOnException, unittest.isTrue);
2220 unittest.expect(o.dataflowApiVersion, unittest.equals('foo'));
2221 unittest.expect(o.harnessCommand, unittest.equals('foo'));
2222 unittest.expect(o.languageHint, unittest.equals('foo'));
2223 unittest.expect(o.logDir, unittest.equals('foo'));
2224 unittest.expect(o.logToSerialconsole, unittest.isTrue);
2225 unittest.expect(o.logUploadLocation, unittest.equals('foo'));
2226 checkUnnamed2439(o.oauthScopes);
2227 checkWorkerSettings(o.parallelWorkerSettings);
2228 unittest.expect(o.streamingWorkerMainClass, unittest.equals('foo'));
2229 unittest.expect(o.taskGroup, unittest.equals('foo'));
2230 unittest.expect(o.taskUser, unittest.equals('foo'));
2231 unittest.expect(o.tempStoragePrefix, unittest.equals('foo'));
2232 unittest.expect(o.vmId, unittest.equals('foo'));
2233 unittest.expect(o.workflowFileName, unittest.equals('foo'));
2234 }
2235 buildCounterTaskRunnerSettings--;
2236 }
2237
2238 buildUnnamed2440() {
2239 var o = new core.List<api.ComputationTopology>();
2240 o.add(buildComputationTopology());
2241 o.add(buildComputationTopology());
2242 return o;
2243 }
2244
2245 checkUnnamed2440(core.List<api.ComputationTopology> o) {
2246 unittest.expect(o, unittest.hasLength(2));
2247 checkComputationTopology(o[0]);
2248 checkComputationTopology(o[1]);
2249 }
2250
2251 buildUnnamed2441() {
2252 var o = new core.List<api.DataDiskAssignment>();
2253 o.add(buildDataDiskAssignment());
2254 o.add(buildDataDiskAssignment());
2255 return o;
2256 }
2257
2258 checkUnnamed2441(core.List<api.DataDiskAssignment> o) {
2259 unittest.expect(o, unittest.hasLength(2));
2260 checkDataDiskAssignment(o[0]);
2261 checkDataDiskAssignment(o[1]);
2262 }
2263
2264 buildUnnamed2442() {
2265 var o = new core.Map<core.String, core.String>();
2266 o["x"] = "foo";
2267 o["y"] = "foo";
2268 return o;
2269 }
2270
2271 checkUnnamed2442(core.Map<core.String, core.String> o) {
2272 unittest.expect(o, unittest.hasLength(2));
2273 unittest.expect(o["x"], unittest.equals('foo'));
2274 unittest.expect(o["y"], unittest.equals('foo'));
2275 }
2276
2277 core.int buildCounterTopologyConfig = 0;
2278 buildTopologyConfig() {
2279 var o = new api.TopologyConfig();
2280 buildCounterTopologyConfig++;
2281 if (buildCounterTopologyConfig < 3) {
2282 o.computations = buildUnnamed2440();
2283 o.dataDiskAssignments = buildUnnamed2441();
2284 o.userStageToComputationNameMap = buildUnnamed2442();
2285 }
2286 buildCounterTopologyConfig--;
2287 return o;
2288 }
2289
2290 checkTopologyConfig(api.TopologyConfig o) {
2291 buildCounterTopologyConfig++;
2292 if (buildCounterTopologyConfig < 3) {
2293 checkUnnamed2440(o.computations);
2294 checkUnnamed2441(o.dataDiskAssignments);
2295 checkUnnamed2442(o.userStageToComputationNameMap);
2296 }
2297 buildCounterTopologyConfig--;
2298 }
2299
2300 buildUnnamed2443() {
2301 var o = new core.List<api.Package>();
2302 o.add(buildPackage());
2303 o.add(buildPackage());
2304 return o;
2305 }
2306
2307 checkUnnamed2443(core.List<api.Package> o) {
2308 unittest.expect(o, unittest.hasLength(2));
2309 checkPackage(o[0]);
2310 checkPackage(o[1]);
2311 }
2312
2313 core.int buildCounterWorkItem = 0;
2314 buildWorkItem() {
2315 var o = new api.WorkItem();
2316 buildCounterWorkItem++;
2317 if (buildCounterWorkItem < 3) {
2318 o.configuration = "foo";
2319 o.id = "foo";
2320 o.initialReportIndex = "foo";
2321 o.jobId = "foo";
2322 o.leaseExpireTime = "foo";
2323 o.mapTask = buildMapTask();
2324 o.packages = buildUnnamed2443();
2325 o.projectId = "foo";
2326 o.reportStatusInterval = "foo";
2327 o.seqMapTask = buildSeqMapTask();
2328 o.shellTask = buildShellTask();
2329 o.sourceOperationTask = buildSourceOperationRequest();
2330 o.streamingComputationTask = buildStreamingComputationTask();
2331 o.streamingSetupTask = buildStreamingSetupTask();
2332 }
2333 buildCounterWorkItem--;
2334 return o;
2335 }
2336
2337 checkWorkItem(api.WorkItem o) {
2338 buildCounterWorkItem++;
2339 if (buildCounterWorkItem < 3) {
2340 unittest.expect(o.configuration, unittest.equals('foo'));
2341 unittest.expect(o.id, unittest.equals('foo'));
2342 unittest.expect(o.initialReportIndex, unittest.equals('foo'));
2343 unittest.expect(o.jobId, unittest.equals('foo'));
2344 unittest.expect(o.leaseExpireTime, unittest.equals('foo'));
2345 checkMapTask(o.mapTask);
2346 checkUnnamed2443(o.packages);
2347 unittest.expect(o.projectId, unittest.equals('foo'));
2348 unittest.expect(o.reportStatusInterval, unittest.equals('foo'));
2349 checkSeqMapTask(o.seqMapTask);
2350 checkShellTask(o.shellTask);
2351 checkSourceOperationRequest(o.sourceOperationTask);
2352 checkStreamingComputationTask(o.streamingComputationTask);
2353 checkStreamingSetupTask(o.streamingSetupTask);
2354 }
2355 buildCounterWorkItem--;
2356 }
2357
2358 buildUnnamed2444() {
2359 var o = new core.Map<core.String, core.Object>();
2360 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
2361 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
2362 return o;
2363 }
2364
2365 checkUnnamed2444(core.Map<core.String, core.Object> o) {
2366 unittest.expect(o, unittest.hasLength(2));
2367 var casted40 = (o["x"]) as core.Map; unittest.expect(casted40, unittest.hasLen gth(3)); unittest.expect(casted40["list"], unittest.equals([1, 2, 3])); unittest .expect(casted40["bool"], unittest.equals(true)); unittest.expect(casted40["stri ng"], unittest.equals('foo'));
2368 var casted41 = (o["y"]) as core.Map; unittest.expect(casted41, unittest.hasLen gth(3)); unittest.expect(casted41["list"], unittest.equals([1, 2, 3])); unittest .expect(casted41["bool"], unittest.equals(true)); unittest.expect(casted41["stri ng"], unittest.equals('foo'));
2369 }
2370
2371 core.int buildCounterWorkItemServiceState = 0;
2372 buildWorkItemServiceState() {
2373 var o = new api.WorkItemServiceState();
2374 buildCounterWorkItemServiceState++;
2375 if (buildCounterWorkItemServiceState < 3) {
2376 o.harnessData = buildUnnamed2444();
2377 o.leaseExpireTime = "foo";
2378 o.nextReportIndex = "foo";
2379 o.reportStatusInterval = "foo";
2380 o.suggestedStopPoint = buildApproximateProgress();
2381 o.suggestedStopPosition = buildPosition();
2382 }
2383 buildCounterWorkItemServiceState--;
2384 return o;
2385 }
2386
2387 checkWorkItemServiceState(api.WorkItemServiceState o) {
2388 buildCounterWorkItemServiceState++;
2389 if (buildCounterWorkItemServiceState < 3) {
2390 checkUnnamed2444(o.harnessData);
2391 unittest.expect(o.leaseExpireTime, unittest.equals('foo'));
2392 unittest.expect(o.nextReportIndex, unittest.equals('foo'));
2393 unittest.expect(o.reportStatusInterval, unittest.equals('foo'));
2394 checkApproximateProgress(o.suggestedStopPoint);
2395 checkPosition(o.suggestedStopPosition);
2396 }
2397 buildCounterWorkItemServiceState--;
2398 }
2399
2400 buildUnnamed2445() {
2401 var o = new core.List<api.Status>();
2402 o.add(buildStatus());
2403 o.add(buildStatus());
2404 return o;
2405 }
2406
2407 checkUnnamed2445(core.List<api.Status> o) {
2408 unittest.expect(o, unittest.hasLength(2));
2409 checkStatus(o[0]);
2410 checkStatus(o[1]);
2411 }
2412
2413 buildUnnamed2446() {
2414 var o = new core.List<api.MetricUpdate>();
2415 o.add(buildMetricUpdate());
2416 o.add(buildMetricUpdate());
2417 return o;
2418 }
2419
2420 checkUnnamed2446(core.List<api.MetricUpdate> o) {
2421 unittest.expect(o, unittest.hasLength(2));
2422 checkMetricUpdate(o[0]);
2423 checkMetricUpdate(o[1]);
2424 }
2425
2426 core.int buildCounterWorkItemStatus = 0;
2427 buildWorkItemStatus() {
2428 var o = new api.WorkItemStatus();
2429 buildCounterWorkItemStatus++;
2430 if (buildCounterWorkItemStatus < 3) {
2431 o.completed = true;
2432 o.dynamicSourceSplit = buildDynamicSourceSplit();
2433 o.errors = buildUnnamed2445();
2434 o.metricUpdates = buildUnnamed2446();
2435 o.progress = buildApproximateProgress();
2436 o.reportIndex = "foo";
2437 o.requestedLeaseDuration = "foo";
2438 o.sourceFork = buildSourceFork();
2439 o.sourceOperationResponse = buildSourceOperationResponse();
2440 o.stopPosition = buildPosition();
2441 o.workItemId = "foo";
2442 }
2443 buildCounterWorkItemStatus--;
2444 return o;
2445 }
2446
2447 checkWorkItemStatus(api.WorkItemStatus o) {
2448 buildCounterWorkItemStatus++;
2449 if (buildCounterWorkItemStatus < 3) {
2450 unittest.expect(o.completed, unittest.isTrue);
2451 checkDynamicSourceSplit(o.dynamicSourceSplit);
2452 checkUnnamed2445(o.errors);
2453 checkUnnamed2446(o.metricUpdates);
2454 checkApproximateProgress(o.progress);
2455 unittest.expect(o.reportIndex, unittest.equals('foo'));
2456 unittest.expect(o.requestedLeaseDuration, unittest.equals('foo'));
2457 checkSourceFork(o.sourceFork);
2458 checkSourceOperationResponse(o.sourceOperationResponse);
2459 checkPosition(o.stopPosition);
2460 unittest.expect(o.workItemId, unittest.equals('foo'));
2461 }
2462 buildCounterWorkItemStatus--;
2463 }
2464
2465 buildUnnamed2447() {
2466 var o = new core.List<api.Disk>();
2467 o.add(buildDisk());
2468 o.add(buildDisk());
2469 return o;
2470 }
2471
2472 checkUnnamed2447(core.List<api.Disk> o) {
2473 unittest.expect(o, unittest.hasLength(2));
2474 checkDisk(o[0]);
2475 checkDisk(o[1]);
2476 }
2477
2478 buildUnnamed2448() {
2479 var o = new core.Map<core.String, core.String>();
2480 o["x"] = "foo";
2481 o["y"] = "foo";
2482 return o;
2483 }
2484
2485 checkUnnamed2448(core.Map<core.String, core.String> o) {
2486 unittest.expect(o, unittest.hasLength(2));
2487 unittest.expect(o["x"], unittest.equals('foo'));
2488 unittest.expect(o["y"], unittest.equals('foo'));
2489 }
2490
2491 buildUnnamed2449() {
2492 var o = new core.List<api.Package>();
2493 o.add(buildPackage());
2494 o.add(buildPackage());
2495 return o;
2496 }
2497
2498 checkUnnamed2449(core.List<api.Package> o) {
2499 unittest.expect(o, unittest.hasLength(2));
2500 checkPackage(o[0]);
2501 checkPackage(o[1]);
2502 }
2503
2504 buildUnnamed2450() {
2505 var o = new core.Map<core.String, core.Object>();
2506 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
2507 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'};
2508 return o;
2509 }
2510
2511 checkUnnamed2450(core.Map<core.String, core.Object> o) {
2512 unittest.expect(o, unittest.hasLength(2));
2513 var casted42 = (o["x"]) as core.Map; unittest.expect(casted42, unittest.hasLen gth(3)); unittest.expect(casted42["list"], unittest.equals([1, 2, 3])); unittest .expect(casted42["bool"], unittest.equals(true)); unittest.expect(casted42["stri ng"], unittest.equals('foo'));
2514 var casted43 = (o["y"]) as core.Map; unittest.expect(casted43, unittest.hasLen gth(3)); unittest.expect(casted43["list"], unittest.equals([1, 2, 3])); unittest .expect(casted43["bool"], unittest.equals(true)); unittest.expect(casted43["stri ng"], unittest.equals('foo'));
2515 }
2516
2517 core.int buildCounterWorkerPool = 0;
2518 buildWorkerPool() {
2519 var o = new api.WorkerPool();
2520 buildCounterWorkerPool++;
2521 if (buildCounterWorkerPool < 3) {
2522 o.autoscalingSettings = buildAutoscalingSettings();
2523 o.dataDisks = buildUnnamed2447();
2524 o.defaultPackageSet = "foo";
2525 o.diskSizeGb = 42;
2526 o.diskSourceImage = "foo";
2527 o.diskType = "foo";
2528 o.kind = "foo";
2529 o.machineType = "foo";
2530 o.metadata = buildUnnamed2448();
2531 o.network = "foo";
2532 o.numWorkers = 42;
2533 o.onHostMaintenance = "foo";
2534 o.packages = buildUnnamed2449();
2535 o.poolArgs = buildUnnamed2450();
2536 o.taskrunnerSettings = buildTaskRunnerSettings();
2537 o.teardownPolicy = "foo";
2538 o.zone = "foo";
2539 }
2540 buildCounterWorkerPool--;
2541 return o;
2542 }
2543
2544 checkWorkerPool(api.WorkerPool o) {
2545 buildCounterWorkerPool++;
2546 if (buildCounterWorkerPool < 3) {
2547 checkAutoscalingSettings(o.autoscalingSettings);
2548 checkUnnamed2447(o.dataDisks);
2549 unittest.expect(o.defaultPackageSet, unittest.equals('foo'));
2550 unittest.expect(o.diskSizeGb, unittest.equals(42));
2551 unittest.expect(o.diskSourceImage, unittest.equals('foo'));
2552 unittest.expect(o.diskType, unittest.equals('foo'));
2553 unittest.expect(o.kind, unittest.equals('foo'));
2554 unittest.expect(o.machineType, unittest.equals('foo'));
2555 checkUnnamed2448(o.metadata);
2556 unittest.expect(o.network, unittest.equals('foo'));
2557 unittest.expect(o.numWorkers, unittest.equals(42));
2558 unittest.expect(o.onHostMaintenance, unittest.equals('foo'));
2559 checkUnnamed2449(o.packages);
2560 checkUnnamed2450(o.poolArgs);
2561 checkTaskRunnerSettings(o.taskrunnerSettings);
2562 unittest.expect(o.teardownPolicy, unittest.equals('foo'));
2563 unittest.expect(o.zone, unittest.equals('foo'));
2564 }
2565 buildCounterWorkerPool--;
2566 }
2567
2568 core.int buildCounterWorkerSettings = 0;
2569 buildWorkerSettings() {
2570 var o = new api.WorkerSettings();
2571 buildCounterWorkerSettings++;
2572 if (buildCounterWorkerSettings < 3) {
2573 o.baseUrl = "foo";
2574 o.reportingEnabled = true;
2575 o.servicePath = "foo";
2576 o.shuffleServicePath = "foo";
2577 o.tempStoragePrefix = "foo";
2578 o.workerId = "foo";
2579 }
2580 buildCounterWorkerSettings--;
2581 return o;
2582 }
2583
2584 checkWorkerSettings(api.WorkerSettings o) {
2585 buildCounterWorkerSettings++;
2586 if (buildCounterWorkerSettings < 3) {
2587 unittest.expect(o.baseUrl, unittest.equals('foo'));
2588 unittest.expect(o.reportingEnabled, unittest.isTrue);
2589 unittest.expect(o.servicePath, unittest.equals('foo'));
2590 unittest.expect(o.shuffleServicePath, unittest.equals('foo'));
2591 unittest.expect(o.tempStoragePrefix, unittest.equals('foo'));
2592 unittest.expect(o.workerId, unittest.equals('foo'));
2593 }
2594 buildCounterWorkerSettings--;
2595 }
2596
2597 core.int buildCounterWriteInstruction = 0;
2598 buildWriteInstruction() {
2599 var o = new api.WriteInstruction();
2600 buildCounterWriteInstruction++;
2601 if (buildCounterWriteInstruction < 3) {
2602 o.input = buildInstructionInput();
2603 o.sink = buildSink();
2604 }
2605 buildCounterWriteInstruction--;
2606 return o;
2607 }
2608
2609 checkWriteInstruction(api.WriteInstruction o) {
2610 buildCounterWriteInstruction++;
2611 if (buildCounterWriteInstruction < 3) {
2612 checkInstructionInput(o.input);
2613 checkSink(o.sink);
2614 }
2615 buildCounterWriteInstruction--;
2616 }
2617
54 2618
55 main() { 2619 main() {
56 } 2620 unittest.group("obj-schema-ApproximateProgress", () {
57 2621 unittest.test("to-json--from-json", () {
2622 var o = buildApproximateProgress();
2623 var od = new api.ApproximateProgress.fromJson(o.toJson());
2624 checkApproximateProgress(od);
2625 });
2626 });
2627
2628
2629 unittest.group("obj-schema-AutoscalingSettings", () {
2630 unittest.test("to-json--from-json", () {
2631 var o = buildAutoscalingSettings();
2632 var od = new api.AutoscalingSettings.fromJson(o.toJson());
2633 checkAutoscalingSettings(od);
2634 });
2635 });
2636
2637
2638 unittest.group("obj-schema-ComputationTopology", () {
2639 unittest.test("to-json--from-json", () {
2640 var o = buildComputationTopology();
2641 var od = new api.ComputationTopology.fromJson(o.toJson());
2642 checkComputationTopology(od);
2643 });
2644 });
2645
2646
2647 unittest.group("obj-schema-CustomSourceLocation", () {
2648 unittest.test("to-json--from-json", () {
2649 var o = buildCustomSourceLocation();
2650 var od = new api.CustomSourceLocation.fromJson(o.toJson());
2651 checkCustomSourceLocation(od);
2652 });
2653 });
2654
2655
2656 unittest.group("obj-schema-DataDiskAssignment", () {
2657 unittest.test("to-json--from-json", () {
2658 var o = buildDataDiskAssignment();
2659 var od = new api.DataDiskAssignment.fromJson(o.toJson());
2660 checkDataDiskAssignment(od);
2661 });
2662 });
2663
2664
2665 unittest.group("obj-schema-DerivedSource", () {
2666 unittest.test("to-json--from-json", () {
2667 var o = buildDerivedSource();
2668 var od = new api.DerivedSource.fromJson(o.toJson());
2669 checkDerivedSource(od);
2670 });
2671 });
2672
2673
2674 unittest.group("obj-schema-Disk", () {
2675 unittest.test("to-json--from-json", () {
2676 var o = buildDisk();
2677 var od = new api.Disk.fromJson(o.toJson());
2678 checkDisk(od);
2679 });
2680 });
2681
2682
2683 unittest.group("obj-schema-DynamicSourceSplit", () {
2684 unittest.test("to-json--from-json", () {
2685 var o = buildDynamicSourceSplit();
2686 var od = new api.DynamicSourceSplit.fromJson(o.toJson());
2687 checkDynamicSourceSplit(od);
2688 });
2689 });
2690
2691
2692 unittest.group("obj-schema-Environment", () {
2693 unittest.test("to-json--from-json", () {
2694 var o = buildEnvironment();
2695 var od = new api.Environment.fromJson(o.toJson());
2696 checkEnvironment(od);
2697 });
2698 });
2699
2700
2701 unittest.group("obj-schema-FlattenInstruction", () {
2702 unittest.test("to-json--from-json", () {
2703 var o = buildFlattenInstruction();
2704 var od = new api.FlattenInstruction.fromJson(o.toJson());
2705 checkFlattenInstruction(od);
2706 });
2707 });
2708
2709
2710 unittest.group("obj-schema-InstructionInput", () {
2711 unittest.test("to-json--from-json", () {
2712 var o = buildInstructionInput();
2713 var od = new api.InstructionInput.fromJson(o.toJson());
2714 checkInstructionInput(od);
2715 });
2716 });
2717
2718
2719 unittest.group("obj-schema-InstructionOutput", () {
2720 unittest.test("to-json--from-json", () {
2721 var o = buildInstructionOutput();
2722 var od = new api.InstructionOutput.fromJson(o.toJson());
2723 checkInstructionOutput(od);
2724 });
2725 });
2726
2727
2728 unittest.group("obj-schema-Job", () {
2729 unittest.test("to-json--from-json", () {
2730 var o = buildJob();
2731 var od = new api.Job.fromJson(o.toJson());
2732 checkJob(od);
2733 });
2734 });
2735
2736
2737 unittest.group("obj-schema-JobExecutionInfo", () {
2738 unittest.test("to-json--from-json", () {
2739 var o = buildJobExecutionInfo();
2740 var od = new api.JobExecutionInfo.fromJson(o.toJson());
2741 checkJobExecutionInfo(od);
2742 });
2743 });
2744
2745
2746 unittest.group("obj-schema-JobExecutionStageInfo", () {
2747 unittest.test("to-json--from-json", () {
2748 var o = buildJobExecutionStageInfo();
2749 var od = new api.JobExecutionStageInfo.fromJson(o.toJson());
2750 checkJobExecutionStageInfo(od);
2751 });
2752 });
2753
2754
2755 unittest.group("obj-schema-JobMessage", () {
2756 unittest.test("to-json--from-json", () {
2757 var o = buildJobMessage();
2758 var od = new api.JobMessage.fromJson(o.toJson());
2759 checkJobMessage(od);
2760 });
2761 });
2762
2763
2764 unittest.group("obj-schema-JobMetrics", () {
2765 unittest.test("to-json--from-json", () {
2766 var o = buildJobMetrics();
2767 var od = new api.JobMetrics.fromJson(o.toJson());
2768 checkJobMetrics(od);
2769 });
2770 });
2771
2772
2773 unittest.group("obj-schema-KeyRangeDataDiskAssignment", () {
2774 unittest.test("to-json--from-json", () {
2775 var o = buildKeyRangeDataDiskAssignment();
2776 var od = new api.KeyRangeDataDiskAssignment.fromJson(o.toJson());
2777 checkKeyRangeDataDiskAssignment(od);
2778 });
2779 });
2780
2781
2782 unittest.group("obj-schema-KeyRangeLocation", () {
2783 unittest.test("to-json--from-json", () {
2784 var o = buildKeyRangeLocation();
2785 var od = new api.KeyRangeLocation.fromJson(o.toJson());
2786 checkKeyRangeLocation(od);
2787 });
2788 });
2789
2790
2791 unittest.group("obj-schema-LeaseWorkItemRequest", () {
2792 unittest.test("to-json--from-json", () {
2793 var o = buildLeaseWorkItemRequest();
2794 var od = new api.LeaseWorkItemRequest.fromJson(o.toJson());
2795 checkLeaseWorkItemRequest(od);
2796 });
2797 });
2798
2799
2800 unittest.group("obj-schema-LeaseWorkItemResponse", () {
2801 unittest.test("to-json--from-json", () {
2802 var o = buildLeaseWorkItemResponse();
2803 var od = new api.LeaseWorkItemResponse.fromJson(o.toJson());
2804 checkLeaseWorkItemResponse(od);
2805 });
2806 });
2807
2808
2809 unittest.group("obj-schema-ListJobMessagesResponse", () {
2810 unittest.test("to-json--from-json", () {
2811 var o = buildListJobMessagesResponse();
2812 var od = new api.ListJobMessagesResponse.fromJson(o.toJson());
2813 checkListJobMessagesResponse(od);
2814 });
2815 });
2816
2817
2818 unittest.group("obj-schema-ListJobsResponse", () {
2819 unittest.test("to-json--from-json", () {
2820 var o = buildListJobsResponse();
2821 var od = new api.ListJobsResponse.fromJson(o.toJson());
2822 checkListJobsResponse(od);
2823 });
2824 });
2825
2826
2827 unittest.group("obj-schema-MapTask", () {
2828 unittest.test("to-json--from-json", () {
2829 var o = buildMapTask();
2830 var od = new api.MapTask.fromJson(o.toJson());
2831 checkMapTask(od);
2832 });
2833 });
2834
2835
2836 unittest.group("obj-schema-MetricStructuredName", () {
2837 unittest.test("to-json--from-json", () {
2838 var o = buildMetricStructuredName();
2839 var od = new api.MetricStructuredName.fromJson(o.toJson());
2840 checkMetricStructuredName(od);
2841 });
2842 });
2843
2844
2845 unittest.group("obj-schema-MetricUpdate", () {
2846 unittest.test("to-json--from-json", () {
2847 var o = buildMetricUpdate();
2848 var od = new api.MetricUpdate.fromJson(o.toJson());
2849 checkMetricUpdate(od);
2850 });
2851 });
2852
2853
2854 unittest.group("obj-schema-MountedDataDisk", () {
2855 unittest.test("to-json--from-json", () {
2856 var o = buildMountedDataDisk();
2857 var od = new api.MountedDataDisk.fromJson(o.toJson());
2858 checkMountedDataDisk(od);
2859 });
2860 });
2861
2862
2863 unittest.group("obj-schema-MultiOutputInfo", () {
2864 unittest.test("to-json--from-json", () {
2865 var o = buildMultiOutputInfo();
2866 var od = new api.MultiOutputInfo.fromJson(o.toJson());
2867 checkMultiOutputInfo(od);
2868 });
2869 });
2870
2871
2872 unittest.group("obj-schema-Package", () {
2873 unittest.test("to-json--from-json", () {
2874 var o = buildPackage();
2875 var od = new api.Package.fromJson(o.toJson());
2876 checkPackage(od);
2877 });
2878 });
2879
2880
2881 unittest.group("obj-schema-ParDoInstruction", () {
2882 unittest.test("to-json--from-json", () {
2883 var o = buildParDoInstruction();
2884 var od = new api.ParDoInstruction.fromJson(o.toJson());
2885 checkParDoInstruction(od);
2886 });
2887 });
2888
2889
2890 unittest.group("obj-schema-ParallelInstruction", () {
2891 unittest.test("to-json--from-json", () {
2892 var o = buildParallelInstruction();
2893 var od = new api.ParallelInstruction.fromJson(o.toJson());
2894 checkParallelInstruction(od);
2895 });
2896 });
2897
2898
2899 unittest.group("obj-schema-PartialGroupByKeyInstruction", () {
2900 unittest.test("to-json--from-json", () {
2901 var o = buildPartialGroupByKeyInstruction();
2902 var od = new api.PartialGroupByKeyInstruction.fromJson(o.toJson());
2903 checkPartialGroupByKeyInstruction(od);
2904 });
2905 });
2906
2907
2908 unittest.group("obj-schema-Position", () {
2909 unittest.test("to-json--from-json", () {
2910 var o = buildPosition();
2911 var od = new api.Position.fromJson(o.toJson());
2912 checkPosition(od);
2913 });
2914 });
2915
2916
2917 unittest.group("obj-schema-PubsubLocation", () {
2918 unittest.test("to-json--from-json", () {
2919 var o = buildPubsubLocation();
2920 var od = new api.PubsubLocation.fromJson(o.toJson());
2921 checkPubsubLocation(od);
2922 });
2923 });
2924
2925
2926 unittest.group("obj-schema-ReadInstruction", () {
2927 unittest.test("to-json--from-json", () {
2928 var o = buildReadInstruction();
2929 var od = new api.ReadInstruction.fromJson(o.toJson());
2930 checkReadInstruction(od);
2931 });
2932 });
2933
2934
2935 unittest.group("obj-schema-ReportWorkItemStatusRequest", () {
2936 unittest.test("to-json--from-json", () {
2937 var o = buildReportWorkItemStatusRequest();
2938 var od = new api.ReportWorkItemStatusRequest.fromJson(o.toJson());
2939 checkReportWorkItemStatusRequest(od);
2940 });
2941 });
2942
2943
2944 unittest.group("obj-schema-ReportWorkItemStatusResponse", () {
2945 unittest.test("to-json--from-json", () {
2946 var o = buildReportWorkItemStatusResponse();
2947 var od = new api.ReportWorkItemStatusResponse.fromJson(o.toJson());
2948 checkReportWorkItemStatusResponse(od);
2949 });
2950 });
2951
2952
2953 unittest.group("obj-schema-SeqMapTask", () {
2954 unittest.test("to-json--from-json", () {
2955 var o = buildSeqMapTask();
2956 var od = new api.SeqMapTask.fromJson(o.toJson());
2957 checkSeqMapTask(od);
2958 });
2959 });
2960
2961
2962 unittest.group("obj-schema-SeqMapTaskOutputInfo", () {
2963 unittest.test("to-json--from-json", () {
2964 var o = buildSeqMapTaskOutputInfo();
2965 var od = new api.SeqMapTaskOutputInfo.fromJson(o.toJson());
2966 checkSeqMapTaskOutputInfo(od);
2967 });
2968 });
2969
2970
2971 unittest.group("obj-schema-ShellTask", () {
2972 unittest.test("to-json--from-json", () {
2973 var o = buildShellTask();
2974 var od = new api.ShellTask.fromJson(o.toJson());
2975 checkShellTask(od);
2976 });
2977 });
2978
2979
2980 unittest.group("obj-schema-SideInputInfo", () {
2981 unittest.test("to-json--from-json", () {
2982 var o = buildSideInputInfo();
2983 var od = new api.SideInputInfo.fromJson(o.toJson());
2984 checkSideInputInfo(od);
2985 });
2986 });
2987
2988
2989 unittest.group("obj-schema-Sink", () {
2990 unittest.test("to-json--from-json", () {
2991 var o = buildSink();
2992 var od = new api.Sink.fromJson(o.toJson());
2993 checkSink(od);
2994 });
2995 });
2996
2997
2998 unittest.group("obj-schema-Source", () {
2999 unittest.test("to-json--from-json", () {
3000 var o = buildSource();
3001 var od = new api.Source.fromJson(o.toJson());
3002 checkSource(od);
3003 });
3004 });
3005
3006
3007 unittest.group("obj-schema-SourceFork", () {
3008 unittest.test("to-json--from-json", () {
3009 var o = buildSourceFork();
3010 var od = new api.SourceFork.fromJson(o.toJson());
3011 checkSourceFork(od);
3012 });
3013 });
3014
3015
3016 unittest.group("obj-schema-SourceGetMetadataRequest", () {
3017 unittest.test("to-json--from-json", () {
3018 var o = buildSourceGetMetadataRequest();
3019 var od = new api.SourceGetMetadataRequest.fromJson(o.toJson());
3020 checkSourceGetMetadataRequest(od);
3021 });
3022 });
3023
3024
3025 unittest.group("obj-schema-SourceGetMetadataResponse", () {
3026 unittest.test("to-json--from-json", () {
3027 var o = buildSourceGetMetadataResponse();
3028 var od = new api.SourceGetMetadataResponse.fromJson(o.toJson());
3029 checkSourceGetMetadataResponse(od);
3030 });
3031 });
3032
3033
3034 unittest.group("obj-schema-SourceMetadata", () {
3035 unittest.test("to-json--from-json", () {
3036 var o = buildSourceMetadata();
3037 var od = new api.SourceMetadata.fromJson(o.toJson());
3038 checkSourceMetadata(od);
3039 });
3040 });
3041
3042
3043 unittest.group("obj-schema-SourceOperationRequest", () {
3044 unittest.test("to-json--from-json", () {
3045 var o = buildSourceOperationRequest();
3046 var od = new api.SourceOperationRequest.fromJson(o.toJson());
3047 checkSourceOperationRequest(od);
3048 });
3049 });
3050
3051
3052 unittest.group("obj-schema-SourceOperationResponse", () {
3053 unittest.test("to-json--from-json", () {
3054 var o = buildSourceOperationResponse();
3055 var od = new api.SourceOperationResponse.fromJson(o.toJson());
3056 checkSourceOperationResponse(od);
3057 });
3058 });
3059
3060
3061 unittest.group("obj-schema-SourceSplitOptions", () {
3062 unittest.test("to-json--from-json", () {
3063 var o = buildSourceSplitOptions();
3064 var od = new api.SourceSplitOptions.fromJson(o.toJson());
3065 checkSourceSplitOptions(od);
3066 });
3067 });
3068
3069
3070 unittest.group("obj-schema-SourceSplitRequest", () {
3071 unittest.test("to-json--from-json", () {
3072 var o = buildSourceSplitRequest();
3073 var od = new api.SourceSplitRequest.fromJson(o.toJson());
3074 checkSourceSplitRequest(od);
3075 });
3076 });
3077
3078
3079 unittest.group("obj-schema-SourceSplitResponse", () {
3080 unittest.test("to-json--from-json", () {
3081 var o = buildSourceSplitResponse();
3082 var od = new api.SourceSplitResponse.fromJson(o.toJson());
3083 checkSourceSplitResponse(od);
3084 });
3085 });
3086
3087
3088 unittest.group("obj-schema-SourceSplitShard", () {
3089 unittest.test("to-json--from-json", () {
3090 var o = buildSourceSplitShard();
3091 var od = new api.SourceSplitShard.fromJson(o.toJson());
3092 checkSourceSplitShard(od);
3093 });
3094 });
3095
3096
3097 unittest.group("obj-schema-StateFamilyConfig", () {
3098 unittest.test("to-json--from-json", () {
3099 var o = buildStateFamilyConfig();
3100 var od = new api.StateFamilyConfig.fromJson(o.toJson());
3101 checkStateFamilyConfig(od);
3102 });
3103 });
3104
3105
3106 unittest.group("obj-schema-Status", () {
3107 unittest.test("to-json--from-json", () {
3108 var o = buildStatus();
3109 var od = new api.Status.fromJson(o.toJson());
3110 checkStatus(od);
3111 });
3112 });
3113
3114
3115 unittest.group("obj-schema-Step", () {
3116 unittest.test("to-json--from-json", () {
3117 var o = buildStep();
3118 var od = new api.Step.fromJson(o.toJson());
3119 checkStep(od);
3120 });
3121 });
3122
3123
3124 unittest.group("obj-schema-StreamLocation", () {
3125 unittest.test("to-json--from-json", () {
3126 var o = buildStreamLocation();
3127 var od = new api.StreamLocation.fromJson(o.toJson());
3128 checkStreamLocation(od);
3129 });
3130 });
3131
3132
3133 unittest.group("obj-schema-StreamingComputationRanges", () {
3134 unittest.test("to-json--from-json", () {
3135 var o = buildStreamingComputationRanges();
3136 var od = new api.StreamingComputationRanges.fromJson(o.toJson());
3137 checkStreamingComputationRanges(od);
3138 });
3139 });
3140
3141
3142 unittest.group("obj-schema-StreamingComputationTask", () {
3143 unittest.test("to-json--from-json", () {
3144 var o = buildStreamingComputationTask();
3145 var od = new api.StreamingComputationTask.fromJson(o.toJson());
3146 checkStreamingComputationTask(od);
3147 });
3148 });
3149
3150
3151 unittest.group("obj-schema-StreamingSetupTask", () {
3152 unittest.test("to-json--from-json", () {
3153 var o = buildStreamingSetupTask();
3154 var od = new api.StreamingSetupTask.fromJson(o.toJson());
3155 checkStreamingSetupTask(od);
3156 });
3157 });
3158
3159
3160 unittest.group("obj-schema-StreamingSideInputLocation", () {
3161 unittest.test("to-json--from-json", () {
3162 var o = buildStreamingSideInputLocation();
3163 var od = new api.StreamingSideInputLocation.fromJson(o.toJson());
3164 checkStreamingSideInputLocation(od);
3165 });
3166 });
3167
3168
3169 unittest.group("obj-schema-StreamingStageLocation", () {
3170 unittest.test("to-json--from-json", () {
3171 var o = buildStreamingStageLocation();
3172 var od = new api.StreamingStageLocation.fromJson(o.toJson());
3173 checkStreamingStageLocation(od);
3174 });
3175 });
3176
3177
3178 unittest.group("obj-schema-TaskRunnerSettings", () {
3179 unittest.test("to-json--from-json", () {
3180 var o = buildTaskRunnerSettings();
3181 var od = new api.TaskRunnerSettings.fromJson(o.toJson());
3182 checkTaskRunnerSettings(od);
3183 });
3184 });
3185
3186
3187 unittest.group("obj-schema-TopologyConfig", () {
3188 unittest.test("to-json--from-json", () {
3189 var o = buildTopologyConfig();
3190 var od = new api.TopologyConfig.fromJson(o.toJson());
3191 checkTopologyConfig(od);
3192 });
3193 });
3194
3195
3196 unittest.group("obj-schema-WorkItem", () {
3197 unittest.test("to-json--from-json", () {
3198 var o = buildWorkItem();
3199 var od = new api.WorkItem.fromJson(o.toJson());
3200 checkWorkItem(od);
3201 });
3202 });
3203
3204
3205 unittest.group("obj-schema-WorkItemServiceState", () {
3206 unittest.test("to-json--from-json", () {
3207 var o = buildWorkItemServiceState();
3208 var od = new api.WorkItemServiceState.fromJson(o.toJson());
3209 checkWorkItemServiceState(od);
3210 });
3211 });
3212
3213
3214 unittest.group("obj-schema-WorkItemStatus", () {
3215 unittest.test("to-json--from-json", () {
3216 var o = buildWorkItemStatus();
3217 var od = new api.WorkItemStatus.fromJson(o.toJson());
3218 checkWorkItemStatus(od);
3219 });
3220 });
3221
3222
3223 unittest.group("obj-schema-WorkerPool", () {
3224 unittest.test("to-json--from-json", () {
3225 var o = buildWorkerPool();
3226 var od = new api.WorkerPool.fromJson(o.toJson());
3227 checkWorkerPool(od);
3228 });
3229 });
3230
3231
3232 unittest.group("obj-schema-WorkerSettings", () {
3233 unittest.test("to-json--from-json", () {
3234 var o = buildWorkerSettings();
3235 var od = new api.WorkerSettings.fromJson(o.toJson());
3236 checkWorkerSettings(od);
3237 });
3238 });
3239
3240
3241 unittest.group("obj-schema-WriteInstruction", () {
3242 unittest.test("to-json--from-json", () {
3243 var o = buildWriteInstruction();
3244 var od = new api.WriteInstruction.fromJson(o.toJson());
3245 checkWriteInstruction(od);
3246 });
3247 });
3248
3249
3250 unittest.group("resource-ProjectsJobsResourceApi", () {
3251 unittest.test("method--create", () {
3252
3253 var mock = new HttpServerMock();
3254 api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs;
3255 var arg_request = buildJob();
3256 var arg_projectId = "foo";
3257 var arg_view = "foo";
3258 var arg_replaceJobId = "foo";
3259 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3260 var obj = new api.Job.fromJson(json);
3261 checkJob(obj);
3262
3263 var path = (req.url).path;
3264 var pathOffset = 0;
3265 var index;
3266 var subPart;
3267 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3268 pathOffset += 1;
3269 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3270 pathOffset += 14;
3271 index = path.indexOf("/jobs", pathOffset);
3272 unittest.expect(index >= 0, unittest.isTrue);
3273 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3274 pathOffset = index;
3275 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3276 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("/jobs"));
3277 pathOffset += 5;
3278
3279 var query = (req.url).query;
3280 var queryOffset = 0;
3281 var queryMap = {};
3282 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3283 parseBool(n) {
3284 if (n == "true") return true;
3285 if (n == "false") return false;
3286 if (n == null) return null;
3287 throw new core.ArgumentError("Invalid boolean: $n");
3288 }
3289 if (query.length > 0) {
3290 for (var part in query.split("&")) {
3291 var keyvalue = part.split("=");
3292 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3293 }
3294 }
3295 unittest.expect(queryMap["view"].first, unittest.equals(arg_view));
3296 unittest.expect(queryMap["replaceJobId"].first, unittest.equals(arg_repl aceJobId));
3297
3298
3299 var h = {
3300 "content-type" : "application/json; charset=utf-8",
3301 };
3302 var resp = convert.JSON.encode(buildJob());
3303 return new async.Future.value(stringResponse(200, h, resp));
3304 }), true);
3305 res.create(arg_request, arg_projectId, view: arg_view, replaceJobId: arg_r eplaceJobId).then(unittest.expectAsync(((api.Job response) {
3306 checkJob(response);
3307 })));
3308 });
3309
3310 unittest.test("method--get", () {
3311
3312 var mock = new HttpServerMock();
3313 api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs;
3314 var arg_projectId = "foo";
3315 var arg_jobId = "foo";
3316 var arg_view = "foo";
3317 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3318 var path = (req.url).path;
3319 var pathOffset = 0;
3320 var index;
3321 var subPart;
3322 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3323 pathOffset += 1;
3324 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3325 pathOffset += 14;
3326 index = path.indexOf("/jobs/", pathOffset);
3327 unittest.expect(index >= 0, unittest.isTrue);
3328 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3329 pathOffset = index;
3330 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3331 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
3332 pathOffset += 6;
3333 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3334 pathOffset = path.length;
3335 unittest.expect(subPart, unittest.equals("$arg_jobId"));
3336
3337 var query = (req.url).query;
3338 var queryOffset = 0;
3339 var queryMap = {};
3340 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3341 parseBool(n) {
3342 if (n == "true") return true;
3343 if (n == "false") return false;
3344 if (n == null) return null;
3345 throw new core.ArgumentError("Invalid boolean: $n");
3346 }
3347 if (query.length > 0) {
3348 for (var part in query.split("&")) {
3349 var keyvalue = part.split("=");
3350 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3351 }
3352 }
3353 unittest.expect(queryMap["view"].first, unittest.equals(arg_view));
3354
3355
3356 var h = {
3357 "content-type" : "application/json; charset=utf-8",
3358 };
3359 var resp = convert.JSON.encode(buildJob());
3360 return new async.Future.value(stringResponse(200, h, resp));
3361 }), true);
3362 res.get(arg_projectId, arg_jobId, view: arg_view).then(unittest.expectAsyn c(((api.Job response) {
3363 checkJob(response);
3364 })));
3365 });
3366
3367 unittest.test("method--getMetrics", () {
3368
3369 var mock = new HttpServerMock();
3370 api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs;
3371 var arg_projectId = "foo";
3372 var arg_jobId = "foo";
3373 var arg_startTime = "foo";
3374 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3375 var path = (req.url).path;
3376 var pathOffset = 0;
3377 var index;
3378 var subPart;
3379 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3380 pathOffset += 1;
3381 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3382 pathOffset += 14;
3383 index = path.indexOf("/jobs/", pathOffset);
3384 unittest.expect(index >= 0, unittest.isTrue);
3385 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3386 pathOffset = index;
3387 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3388 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
3389 pathOffset += 6;
3390 index = path.indexOf("/metrics", pathOffset);
3391 unittest.expect(index >= 0, unittest.isTrue);
3392 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3393 pathOffset = index;
3394 unittest.expect(subPart, unittest.equals("$arg_jobId"));
3395 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("/metrics"));
3396 pathOffset += 8;
3397
3398 var query = (req.url).query;
3399 var queryOffset = 0;
3400 var queryMap = {};
3401 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3402 parseBool(n) {
3403 if (n == "true") return true;
3404 if (n == "false") return false;
3405 if (n == null) return null;
3406 throw new core.ArgumentError("Invalid boolean: $n");
3407 }
3408 if (query.length > 0) {
3409 for (var part in query.split("&")) {
3410 var keyvalue = part.split("=");
3411 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3412 }
3413 }
3414 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi me));
3415
3416
3417 var h = {
3418 "content-type" : "application/json; charset=utf-8",
3419 };
3420 var resp = convert.JSON.encode(buildJobMetrics());
3421 return new async.Future.value(stringResponse(200, h, resp));
3422 }), true);
3423 res.getMetrics(arg_projectId, arg_jobId, startTime: arg_startTime).then(un ittest.expectAsync(((api.JobMetrics response) {
3424 checkJobMetrics(response);
3425 })));
3426 });
3427
3428 unittest.test("method--list", () {
3429
3430 var mock = new HttpServerMock();
3431 api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs;
3432 var arg_projectId = "foo";
3433 var arg_view = "foo";
3434 var arg_pageSize = 42;
3435 var arg_pageToken = "foo";
3436 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3437 var path = (req.url).path;
3438 var pathOffset = 0;
3439 var index;
3440 var subPart;
3441 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3442 pathOffset += 1;
3443 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3444 pathOffset += 14;
3445 index = path.indexOf("/jobs", pathOffset);
3446 unittest.expect(index >= 0, unittest.isTrue);
3447 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3448 pathOffset = index;
3449 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3450 unittest.expect(path.substring(pathOffset, pathOffset + 5), unittest.equ als("/jobs"));
3451 pathOffset += 5;
3452
3453 var query = (req.url).query;
3454 var queryOffset = 0;
3455 var queryMap = {};
3456 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3457 parseBool(n) {
3458 if (n == "true") return true;
3459 if (n == "false") return false;
3460 if (n == null) return null;
3461 throw new core.ArgumentError("Invalid boolean: $n");
3462 }
3463 if (query.length > 0) {
3464 for (var part in query.split("&")) {
3465 var keyvalue = part.split("=");
3466 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3467 }
3468 }
3469 unittest.expect(queryMap["view"].first, unittest.equals(arg_view));
3470 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3471 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3472
3473
3474 var h = {
3475 "content-type" : "application/json; charset=utf-8",
3476 };
3477 var resp = convert.JSON.encode(buildListJobsResponse());
3478 return new async.Future.value(stringResponse(200, h, resp));
3479 }), true);
3480 res.list(arg_projectId, view: arg_view, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ListJobsResponse response) {
3481 checkListJobsResponse(response);
3482 })));
3483 });
3484
3485 unittest.test("method--update", () {
3486
3487 var mock = new HttpServerMock();
3488 api.ProjectsJobsResourceApi res = new api.DataflowApi(mock).projects.jobs;
3489 var arg_request = buildJob();
3490 var arg_projectId = "foo";
3491 var arg_jobId = "foo";
3492 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3493 var obj = new api.Job.fromJson(json);
3494 checkJob(obj);
3495
3496 var path = (req.url).path;
3497 var pathOffset = 0;
3498 var index;
3499 var subPart;
3500 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3501 pathOffset += 1;
3502 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3503 pathOffset += 14;
3504 index = path.indexOf("/jobs/", pathOffset);
3505 unittest.expect(index >= 0, unittest.isTrue);
3506 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3507 pathOffset = index;
3508 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3509 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
3510 pathOffset += 6;
3511 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3512 pathOffset = path.length;
3513 unittest.expect(subPart, unittest.equals("$arg_jobId"));
3514
3515 var query = (req.url).query;
3516 var queryOffset = 0;
3517 var queryMap = {};
3518 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3519 parseBool(n) {
3520 if (n == "true") return true;
3521 if (n == "false") return false;
3522 if (n == null) return null;
3523 throw new core.ArgumentError("Invalid boolean: $n");
3524 }
3525 if (query.length > 0) {
3526 for (var part in query.split("&")) {
3527 var keyvalue = part.split("=");
3528 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3529 }
3530 }
3531
3532
3533 var h = {
3534 "content-type" : "application/json; charset=utf-8",
3535 };
3536 var resp = convert.JSON.encode(buildJob());
3537 return new async.Future.value(stringResponse(200, h, resp));
3538 }), true);
3539 res.update(arg_request, arg_projectId, arg_jobId).then(unittest.expectAsyn c(((api.Job response) {
3540 checkJob(response);
3541 })));
3542 });
3543
3544 });
3545
3546
3547 unittest.group("resource-ProjectsJobsMessagesResourceApi", () {
3548 unittest.test("method--list", () {
3549
3550 var mock = new HttpServerMock();
3551 api.ProjectsJobsMessagesResourceApi res = new api.DataflowApi(mock).projec ts.jobs.messages;
3552 var arg_projectId = "foo";
3553 var arg_jobId = "foo";
3554 var arg_minimumImportance = "foo";
3555 var arg_pageSize = 42;
3556 var arg_pageToken = "foo";
3557 var arg_startTime = "foo";
3558 var arg_endTime = "foo";
3559 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3560 var path = (req.url).path;
3561 var pathOffset = 0;
3562 var index;
3563 var subPart;
3564 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3565 pathOffset += 1;
3566 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3567 pathOffset += 14;
3568 index = path.indexOf("/jobs/", pathOffset);
3569 unittest.expect(index >= 0, unittest.isTrue);
3570 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3571 pathOffset = index;
3572 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3573 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
3574 pathOffset += 6;
3575 index = path.indexOf("/messages", pathOffset);
3576 unittest.expect(index >= 0, unittest.isTrue);
3577 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3578 pathOffset = index;
3579 unittest.expect(subPart, unittest.equals("$arg_jobId"));
3580 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/messages"));
3581 pathOffset += 9;
3582
3583 var query = (req.url).query;
3584 var queryOffset = 0;
3585 var queryMap = {};
3586 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3587 parseBool(n) {
3588 if (n == "true") return true;
3589 if (n == "false") return false;
3590 if (n == null) return null;
3591 throw new core.ArgumentError("Invalid boolean: $n");
3592 }
3593 if (query.length > 0) {
3594 for (var part in query.split("&")) {
3595 var keyvalue = part.split("=");
3596 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3597 }
3598 }
3599 unittest.expect(queryMap["minimumImportance"].first, unittest.equals(arg _minimumImportance));
3600 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3601 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3602 unittest.expect(queryMap["startTime"].first, unittest.equals(arg_startTi me));
3603 unittest.expect(queryMap["endTime"].first, unittest.equals(arg_endTime)) ;
3604
3605
3606 var h = {
3607 "content-type" : "application/json; charset=utf-8",
3608 };
3609 var resp = convert.JSON.encode(buildListJobMessagesResponse());
3610 return new async.Future.value(stringResponse(200, h, resp));
3611 }), true);
3612 res.list(arg_projectId, arg_jobId, minimumImportance: arg_minimumImportanc e, pageSize: arg_pageSize, pageToken: arg_pageToken, startTime: arg_startTime, e ndTime: arg_endTime).then(unittest.expectAsync(((api.ListJobMessagesResponse res ponse) {
3613 checkListJobMessagesResponse(response);
3614 })));
3615 });
3616
3617 });
3618
3619
3620 unittest.group("resource-ProjectsJobsWorkItemsResourceApi", () {
3621 unittest.test("method--lease", () {
3622
3623 var mock = new HttpServerMock();
3624 api.ProjectsJobsWorkItemsResourceApi res = new api.DataflowApi(mock).proje cts.jobs.workItems;
3625 var arg_request = buildLeaseWorkItemRequest();
3626 var arg_projectId = "foo";
3627 var arg_jobId = "foo";
3628 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3629 var obj = new api.LeaseWorkItemRequest.fromJson(json);
3630 checkLeaseWorkItemRequest(obj);
3631
3632 var path = (req.url).path;
3633 var pathOffset = 0;
3634 var index;
3635 var subPart;
3636 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3637 pathOffset += 1;
3638 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3639 pathOffset += 14;
3640 index = path.indexOf("/jobs/", pathOffset);
3641 unittest.expect(index >= 0, unittest.isTrue);
3642 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3643 pathOffset = index;
3644 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3645 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
3646 pathOffset += 6;
3647 index = path.indexOf("/workItems:lease", pathOffset);
3648 unittest.expect(index >= 0, unittest.isTrue);
3649 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3650 pathOffset = index;
3651 unittest.expect(subPart, unittest.equals("$arg_jobId"));
3652 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("/workItems:lease"));
3653 pathOffset += 16;
3654
3655 var query = (req.url).query;
3656 var queryOffset = 0;
3657 var queryMap = {};
3658 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3659 parseBool(n) {
3660 if (n == "true") return true;
3661 if (n == "false") return false;
3662 if (n == null) return null;
3663 throw new core.ArgumentError("Invalid boolean: $n");
3664 }
3665 if (query.length > 0) {
3666 for (var part in query.split("&")) {
3667 var keyvalue = part.split("=");
3668 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3669 }
3670 }
3671
3672
3673 var h = {
3674 "content-type" : "application/json; charset=utf-8",
3675 };
3676 var resp = convert.JSON.encode(buildLeaseWorkItemResponse());
3677 return new async.Future.value(stringResponse(200, h, resp));
3678 }), true);
3679 res.lease(arg_request, arg_projectId, arg_jobId).then(unittest.expectAsync (((api.LeaseWorkItemResponse response) {
3680 checkLeaseWorkItemResponse(response);
3681 })));
3682 });
3683
3684 unittest.test("method--reportStatus", () {
3685
3686 var mock = new HttpServerMock();
3687 api.ProjectsJobsWorkItemsResourceApi res = new api.DataflowApi(mock).proje cts.jobs.workItems;
3688 var arg_request = buildReportWorkItemStatusRequest();
3689 var arg_projectId = "foo";
3690 var arg_jobId = "foo";
3691 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
3692 var obj = new api.ReportWorkItemStatusRequest.fromJson(json);
3693 checkReportWorkItemStatusRequest(obj);
3694
3695 var path = (req.url).path;
3696 var pathOffset = 0;
3697 var index;
3698 var subPart;
3699 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3700 pathOffset += 1;
3701 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("v1b3/projects/"));
3702 pathOffset += 14;
3703 index = path.indexOf("/jobs/", pathOffset);
3704 unittest.expect(index >= 0, unittest.isTrue);
3705 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3706 pathOffset = index;
3707 unittest.expect(subPart, unittest.equals("$arg_projectId"));
3708 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("/jobs/"));
3709 pathOffset += 6;
3710 index = path.indexOf("/workItems:reportStatus", pathOffset);
3711 unittest.expect(index >= 0, unittest.isTrue);
3712 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3713 pathOffset = index;
3714 unittest.expect(subPart, unittest.equals("$arg_jobId"));
3715 unittest.expect(path.substring(pathOffset, pathOffset + 23), unittest.eq uals("/workItems:reportStatus"));
3716 pathOffset += 23;
3717
3718 var query = (req.url).query;
3719 var queryOffset = 0;
3720 var queryMap = {};
3721 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3722 parseBool(n) {
3723 if (n == "true") return true;
3724 if (n == "false") return false;
3725 if (n == null) return null;
3726 throw new core.ArgumentError("Invalid boolean: $n");
3727 }
3728 if (query.length > 0) {
3729 for (var part in query.split("&")) {
3730 var keyvalue = part.split("=");
3731 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3732 }
3733 }
3734
3735
3736 var h = {
3737 "content-type" : "application/json; charset=utf-8",
3738 };
3739 var resp = convert.JSON.encode(buildReportWorkItemStatusResponse());
3740 return new async.Future.value(stringResponse(200, h, resp));
3741 }), true);
3742 res.reportStatus(arg_request, arg_projectId, arg_jobId).then(unittest.expe ctAsync(((api.ReportWorkItemStatusResponse response) {
3743 checkReportWorkItemStatusResponse(response);
3744 })));
3745 });
3746
3747 });
3748
3749
3750 }
3751
OLDNEW
« no previous file with comments | « generated/googleapis_beta/test/container/v1beta1_test.dart ('k') | generated/googleapis_beta/test/datastore/v1beta2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698