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

Side by Side Diff: generated/googleapis/test/youtube/v3.dart

Issue 559053002: Generate 0.1.0 version of googleapis/googleapis_beta (Closed) Base URL: git@github.com:dart-lang/googleapis.git@master
Patch Set: Created 6 years, 3 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
(Empty)
1 library googleapis.youtube.v3.test;
2
3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async;
6 import "dart:convert" as convert;
7
8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest;
11 import 'package:googleapis/common/common.dart' as common;
12 import 'package:googleapis/src/common_internal.dart' as common_internal;
13 import '../common/common_internal_test.dart' as common_test;
14
15 import 'package:googleapis/youtube/v3.dart' as api;
16
17
18
19 buildUnnamed341() {
20 var o = new core.List<core.String>();
21 o.add("foo");
22 o.add("foo");
23 return o;
24 }
25
26 checkUnnamed341(core.List<core.String> o) {
27 unittest.expect(o, unittest.hasLength(2));
28 unittest.expect(o[0], unittest.equals('foo'));
29 unittest.expect(o[1], unittest.equals('foo'));
30 }
31
32 core.int buildCounterAccessPolicy = 0;
33 buildAccessPolicy() {
34 var o = new api.AccessPolicy();
35 buildCounterAccessPolicy++;
36 if (buildCounterAccessPolicy < 3) {
37 o.allowed = true;
38 o.exception = buildUnnamed341();
39 }
40 buildCounterAccessPolicy--;
41 return o;
42 }
43
44 checkAccessPolicy(api.AccessPolicy o) {
45 buildCounterAccessPolicy++;
46 if (buildCounterAccessPolicy < 3) {
47 unittest.expect(o.allowed, unittest.isTrue);
48 checkUnnamed341(o.exception);
49 }
50 buildCounterAccessPolicy--;
51 }
52
53 core.int buildCounterActivity = 0;
54 buildActivity() {
55 var o = new api.Activity();
56 buildCounterActivity++;
57 if (buildCounterActivity < 3) {
58 o.contentDetails = buildActivityContentDetails();
59 o.etag = "foo";
60 o.id = "foo";
61 o.kind = "foo";
62 o.snippet = buildActivitySnippet();
63 }
64 buildCounterActivity--;
65 return o;
66 }
67
68 checkActivity(api.Activity o) {
69 buildCounterActivity++;
70 if (buildCounterActivity < 3) {
71 checkActivityContentDetails(o.contentDetails);
72 unittest.expect(o.etag, unittest.equals('foo'));
73 unittest.expect(o.id, unittest.equals('foo'));
74 unittest.expect(o.kind, unittest.equals('foo'));
75 checkActivitySnippet(o.snippet);
76 }
77 buildCounterActivity--;
78 }
79
80 core.int buildCounterActivityContentDetails = 0;
81 buildActivityContentDetails() {
82 var o = new api.ActivityContentDetails();
83 buildCounterActivityContentDetails++;
84 if (buildCounterActivityContentDetails < 3) {
85 o.bulletin = buildActivityContentDetailsBulletin();
86 o.channelItem = buildActivityContentDetailsChannelItem();
87 o.comment = buildActivityContentDetailsComment();
88 o.favorite = buildActivityContentDetailsFavorite();
89 o.like = buildActivityContentDetailsLike();
90 o.playlistItem = buildActivityContentDetailsPlaylistItem();
91 o.promotedItem = buildActivityContentDetailsPromotedItem();
92 o.recommendation = buildActivityContentDetailsRecommendation();
93 o.social = buildActivityContentDetailsSocial();
94 o.subscription = buildActivityContentDetailsSubscription();
95 o.upload = buildActivityContentDetailsUpload();
96 }
97 buildCounterActivityContentDetails--;
98 return o;
99 }
100
101 checkActivityContentDetails(api.ActivityContentDetails o) {
102 buildCounterActivityContentDetails++;
103 if (buildCounterActivityContentDetails < 3) {
104 checkActivityContentDetailsBulletin(o.bulletin);
105 checkActivityContentDetailsChannelItem(o.channelItem);
106 checkActivityContentDetailsComment(o.comment);
107 checkActivityContentDetailsFavorite(o.favorite);
108 checkActivityContentDetailsLike(o.like);
109 checkActivityContentDetailsPlaylistItem(o.playlistItem);
110 checkActivityContentDetailsPromotedItem(o.promotedItem);
111 checkActivityContentDetailsRecommendation(o.recommendation);
112 checkActivityContentDetailsSocial(o.social);
113 checkActivityContentDetailsSubscription(o.subscription);
114 checkActivityContentDetailsUpload(o.upload);
115 }
116 buildCounterActivityContentDetails--;
117 }
118
119 core.int buildCounterActivityContentDetailsBulletin = 0;
120 buildActivityContentDetailsBulletin() {
121 var o = new api.ActivityContentDetailsBulletin();
122 buildCounterActivityContentDetailsBulletin++;
123 if (buildCounterActivityContentDetailsBulletin < 3) {
124 o.resourceId = buildResourceId();
125 }
126 buildCounterActivityContentDetailsBulletin--;
127 return o;
128 }
129
130 checkActivityContentDetailsBulletin(api.ActivityContentDetailsBulletin o) {
131 buildCounterActivityContentDetailsBulletin++;
132 if (buildCounterActivityContentDetailsBulletin < 3) {
133 checkResourceId(o.resourceId);
134 }
135 buildCounterActivityContentDetailsBulletin--;
136 }
137
138 core.int buildCounterActivityContentDetailsChannelItem = 0;
139 buildActivityContentDetailsChannelItem() {
140 var o = new api.ActivityContentDetailsChannelItem();
141 buildCounterActivityContentDetailsChannelItem++;
142 if (buildCounterActivityContentDetailsChannelItem < 3) {
143 o.resourceId = buildResourceId();
144 }
145 buildCounterActivityContentDetailsChannelItem--;
146 return o;
147 }
148
149 checkActivityContentDetailsChannelItem(api.ActivityContentDetailsChannelItem o) {
150 buildCounterActivityContentDetailsChannelItem++;
151 if (buildCounterActivityContentDetailsChannelItem < 3) {
152 checkResourceId(o.resourceId);
153 }
154 buildCounterActivityContentDetailsChannelItem--;
155 }
156
157 core.int buildCounterActivityContentDetailsComment = 0;
158 buildActivityContentDetailsComment() {
159 var o = new api.ActivityContentDetailsComment();
160 buildCounterActivityContentDetailsComment++;
161 if (buildCounterActivityContentDetailsComment < 3) {
162 o.resourceId = buildResourceId();
163 }
164 buildCounterActivityContentDetailsComment--;
165 return o;
166 }
167
168 checkActivityContentDetailsComment(api.ActivityContentDetailsComment o) {
169 buildCounterActivityContentDetailsComment++;
170 if (buildCounterActivityContentDetailsComment < 3) {
171 checkResourceId(o.resourceId);
172 }
173 buildCounterActivityContentDetailsComment--;
174 }
175
176 core.int buildCounterActivityContentDetailsFavorite = 0;
177 buildActivityContentDetailsFavorite() {
178 var o = new api.ActivityContentDetailsFavorite();
179 buildCounterActivityContentDetailsFavorite++;
180 if (buildCounterActivityContentDetailsFavorite < 3) {
181 o.resourceId = buildResourceId();
182 }
183 buildCounterActivityContentDetailsFavorite--;
184 return o;
185 }
186
187 checkActivityContentDetailsFavorite(api.ActivityContentDetailsFavorite o) {
188 buildCounterActivityContentDetailsFavorite++;
189 if (buildCounterActivityContentDetailsFavorite < 3) {
190 checkResourceId(o.resourceId);
191 }
192 buildCounterActivityContentDetailsFavorite--;
193 }
194
195 core.int buildCounterActivityContentDetailsLike = 0;
196 buildActivityContentDetailsLike() {
197 var o = new api.ActivityContentDetailsLike();
198 buildCounterActivityContentDetailsLike++;
199 if (buildCounterActivityContentDetailsLike < 3) {
200 o.resourceId = buildResourceId();
201 }
202 buildCounterActivityContentDetailsLike--;
203 return o;
204 }
205
206 checkActivityContentDetailsLike(api.ActivityContentDetailsLike o) {
207 buildCounterActivityContentDetailsLike++;
208 if (buildCounterActivityContentDetailsLike < 3) {
209 checkResourceId(o.resourceId);
210 }
211 buildCounterActivityContentDetailsLike--;
212 }
213
214 core.int buildCounterActivityContentDetailsPlaylistItem = 0;
215 buildActivityContentDetailsPlaylistItem() {
216 var o = new api.ActivityContentDetailsPlaylistItem();
217 buildCounterActivityContentDetailsPlaylistItem++;
218 if (buildCounterActivityContentDetailsPlaylistItem < 3) {
219 o.playlistId = "foo";
220 o.playlistItemId = "foo";
221 o.resourceId = buildResourceId();
222 }
223 buildCounterActivityContentDetailsPlaylistItem--;
224 return o;
225 }
226
227 checkActivityContentDetailsPlaylistItem(api.ActivityContentDetailsPlaylistItem o ) {
228 buildCounterActivityContentDetailsPlaylistItem++;
229 if (buildCounterActivityContentDetailsPlaylistItem < 3) {
230 unittest.expect(o.playlistId, unittest.equals('foo'));
231 unittest.expect(o.playlistItemId, unittest.equals('foo'));
232 checkResourceId(o.resourceId);
233 }
234 buildCounterActivityContentDetailsPlaylistItem--;
235 }
236
237 buildUnnamed342() {
238 var o = new core.List<core.String>();
239 o.add("foo");
240 o.add("foo");
241 return o;
242 }
243
244 checkUnnamed342(core.List<core.String> o) {
245 unittest.expect(o, unittest.hasLength(2));
246 unittest.expect(o[0], unittest.equals('foo'));
247 unittest.expect(o[1], unittest.equals('foo'));
248 }
249
250 buildUnnamed343() {
251 var o = new core.List<core.String>();
252 o.add("foo");
253 o.add("foo");
254 return o;
255 }
256
257 checkUnnamed343(core.List<core.String> o) {
258 unittest.expect(o, unittest.hasLength(2));
259 unittest.expect(o[0], unittest.equals('foo'));
260 unittest.expect(o[1], unittest.equals('foo'));
261 }
262
263 core.int buildCounterActivityContentDetailsPromotedItem = 0;
264 buildActivityContentDetailsPromotedItem() {
265 var o = new api.ActivityContentDetailsPromotedItem();
266 buildCounterActivityContentDetailsPromotedItem++;
267 if (buildCounterActivityContentDetailsPromotedItem < 3) {
268 o.adTag = "foo";
269 o.clickTrackingUrl = "foo";
270 o.creativeViewUrl = "foo";
271 o.ctaType = "foo";
272 o.customCtaButtonText = "foo";
273 o.descriptionText = "foo";
274 o.destinationUrl = "foo";
275 o.forecastingUrl = buildUnnamed342();
276 o.impressionUrl = buildUnnamed343();
277 o.videoId = "foo";
278 }
279 buildCounterActivityContentDetailsPromotedItem--;
280 return o;
281 }
282
283 checkActivityContentDetailsPromotedItem(api.ActivityContentDetailsPromotedItem o ) {
284 buildCounterActivityContentDetailsPromotedItem++;
285 if (buildCounterActivityContentDetailsPromotedItem < 3) {
286 unittest.expect(o.adTag, unittest.equals('foo'));
287 unittest.expect(o.clickTrackingUrl, unittest.equals('foo'));
288 unittest.expect(o.creativeViewUrl, unittest.equals('foo'));
289 unittest.expect(o.ctaType, unittest.equals('foo'));
290 unittest.expect(o.customCtaButtonText, unittest.equals('foo'));
291 unittest.expect(o.descriptionText, unittest.equals('foo'));
292 unittest.expect(o.destinationUrl, unittest.equals('foo'));
293 checkUnnamed342(o.forecastingUrl);
294 checkUnnamed343(o.impressionUrl);
295 unittest.expect(o.videoId, unittest.equals('foo'));
296 }
297 buildCounterActivityContentDetailsPromotedItem--;
298 }
299
300 core.int buildCounterActivityContentDetailsRecommendation = 0;
301 buildActivityContentDetailsRecommendation() {
302 var o = new api.ActivityContentDetailsRecommendation();
303 buildCounterActivityContentDetailsRecommendation++;
304 if (buildCounterActivityContentDetailsRecommendation < 3) {
305 o.reason = "foo";
306 o.resourceId = buildResourceId();
307 o.seedResourceId = buildResourceId();
308 }
309 buildCounterActivityContentDetailsRecommendation--;
310 return o;
311 }
312
313 checkActivityContentDetailsRecommendation(api.ActivityContentDetailsRecommendati on o) {
314 buildCounterActivityContentDetailsRecommendation++;
315 if (buildCounterActivityContentDetailsRecommendation < 3) {
316 unittest.expect(o.reason, unittest.equals('foo'));
317 checkResourceId(o.resourceId);
318 checkResourceId(o.seedResourceId);
319 }
320 buildCounterActivityContentDetailsRecommendation--;
321 }
322
323 core.int buildCounterActivityContentDetailsSocial = 0;
324 buildActivityContentDetailsSocial() {
325 var o = new api.ActivityContentDetailsSocial();
326 buildCounterActivityContentDetailsSocial++;
327 if (buildCounterActivityContentDetailsSocial < 3) {
328 o.author = "foo";
329 o.imageUrl = "foo";
330 o.referenceUrl = "foo";
331 o.resourceId = buildResourceId();
332 o.type = "foo";
333 }
334 buildCounterActivityContentDetailsSocial--;
335 return o;
336 }
337
338 checkActivityContentDetailsSocial(api.ActivityContentDetailsSocial o) {
339 buildCounterActivityContentDetailsSocial++;
340 if (buildCounterActivityContentDetailsSocial < 3) {
341 unittest.expect(o.author, unittest.equals('foo'));
342 unittest.expect(o.imageUrl, unittest.equals('foo'));
343 unittest.expect(o.referenceUrl, unittest.equals('foo'));
344 checkResourceId(o.resourceId);
345 unittest.expect(o.type, unittest.equals('foo'));
346 }
347 buildCounterActivityContentDetailsSocial--;
348 }
349
350 core.int buildCounterActivityContentDetailsSubscription = 0;
351 buildActivityContentDetailsSubscription() {
352 var o = new api.ActivityContentDetailsSubscription();
353 buildCounterActivityContentDetailsSubscription++;
354 if (buildCounterActivityContentDetailsSubscription < 3) {
355 o.resourceId = buildResourceId();
356 }
357 buildCounterActivityContentDetailsSubscription--;
358 return o;
359 }
360
361 checkActivityContentDetailsSubscription(api.ActivityContentDetailsSubscription o ) {
362 buildCounterActivityContentDetailsSubscription++;
363 if (buildCounterActivityContentDetailsSubscription < 3) {
364 checkResourceId(o.resourceId);
365 }
366 buildCounterActivityContentDetailsSubscription--;
367 }
368
369 core.int buildCounterActivityContentDetailsUpload = 0;
370 buildActivityContentDetailsUpload() {
371 var o = new api.ActivityContentDetailsUpload();
372 buildCounterActivityContentDetailsUpload++;
373 if (buildCounterActivityContentDetailsUpload < 3) {
374 o.videoId = "foo";
375 }
376 buildCounterActivityContentDetailsUpload--;
377 return o;
378 }
379
380 checkActivityContentDetailsUpload(api.ActivityContentDetailsUpload o) {
381 buildCounterActivityContentDetailsUpload++;
382 if (buildCounterActivityContentDetailsUpload < 3) {
383 unittest.expect(o.videoId, unittest.equals('foo'));
384 }
385 buildCounterActivityContentDetailsUpload--;
386 }
387
388 buildUnnamed344() {
389 var o = new core.List<api.Activity>();
390 o.add(buildActivity());
391 o.add(buildActivity());
392 return o;
393 }
394
395 checkUnnamed344(core.List<api.Activity> o) {
396 unittest.expect(o, unittest.hasLength(2));
397 checkActivity(o[0]);
398 checkActivity(o[1]);
399 }
400
401 core.int buildCounterActivityListResponse = 0;
402 buildActivityListResponse() {
403 var o = new api.ActivityListResponse();
404 buildCounterActivityListResponse++;
405 if (buildCounterActivityListResponse < 3) {
406 o.etag = "foo";
407 o.eventId = "foo";
408 o.items = buildUnnamed344();
409 o.kind = "foo";
410 o.nextPageToken = "foo";
411 o.pageInfo = buildPageInfo();
412 o.prevPageToken = "foo";
413 o.tokenPagination = buildTokenPagination();
414 o.visitorId = "foo";
415 }
416 buildCounterActivityListResponse--;
417 return o;
418 }
419
420 checkActivityListResponse(api.ActivityListResponse o) {
421 buildCounterActivityListResponse++;
422 if (buildCounterActivityListResponse < 3) {
423 unittest.expect(o.etag, unittest.equals('foo'));
424 unittest.expect(o.eventId, unittest.equals('foo'));
425 checkUnnamed344(o.items);
426 unittest.expect(o.kind, unittest.equals('foo'));
427 unittest.expect(o.nextPageToken, unittest.equals('foo'));
428 checkPageInfo(o.pageInfo);
429 unittest.expect(o.prevPageToken, unittest.equals('foo'));
430 checkTokenPagination(o.tokenPagination);
431 unittest.expect(o.visitorId, unittest.equals('foo'));
432 }
433 buildCounterActivityListResponse--;
434 }
435
436 core.int buildCounterActivitySnippet = 0;
437 buildActivitySnippet() {
438 var o = new api.ActivitySnippet();
439 buildCounterActivitySnippet++;
440 if (buildCounterActivitySnippet < 3) {
441 o.channelId = "foo";
442 o.channelTitle = "foo";
443 o.description = "foo";
444 o.groupId = "foo";
445 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
446 o.thumbnails = buildThumbnailDetails();
447 o.title = "foo";
448 o.type = "foo";
449 }
450 buildCounterActivitySnippet--;
451 return o;
452 }
453
454 checkActivitySnippet(api.ActivitySnippet o) {
455 buildCounterActivitySnippet++;
456 if (buildCounterActivitySnippet < 3) {
457 unittest.expect(o.channelId, unittest.equals('foo'));
458 unittest.expect(o.channelTitle, unittest.equals('foo'));
459 unittest.expect(o.description, unittest.equals('foo'));
460 unittest.expect(o.groupId, unittest.equals('foo'));
461 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
462 checkThumbnailDetails(o.thumbnails);
463 unittest.expect(o.title, unittest.equals('foo'));
464 unittest.expect(o.type, unittest.equals('foo'));
465 }
466 buildCounterActivitySnippet--;
467 }
468
469 core.int buildCounterCdnSettings = 0;
470 buildCdnSettings() {
471 var o = new api.CdnSettings();
472 buildCounterCdnSettings++;
473 if (buildCounterCdnSettings < 3) {
474 o.format = "foo";
475 o.ingestionInfo = buildIngestionInfo();
476 o.ingestionType = "foo";
477 }
478 buildCounterCdnSettings--;
479 return o;
480 }
481
482 checkCdnSettings(api.CdnSettings o) {
483 buildCounterCdnSettings++;
484 if (buildCounterCdnSettings < 3) {
485 unittest.expect(o.format, unittest.equals('foo'));
486 checkIngestionInfo(o.ingestionInfo);
487 unittest.expect(o.ingestionType, unittest.equals('foo'));
488 }
489 buildCounterCdnSettings--;
490 }
491
492 core.int buildCounterChannel = 0;
493 buildChannel() {
494 var o = new api.Channel();
495 buildCounterChannel++;
496 if (buildCounterChannel < 3) {
497 o.auditDetails = buildChannelAuditDetails();
498 o.brandingSettings = buildChannelBrandingSettings();
499 o.contentDetails = buildChannelContentDetails();
500 o.contentOwnerDetails = buildChannelContentOwnerDetails();
501 o.conversionPings = buildChannelConversionPings();
502 o.etag = "foo";
503 o.id = "foo";
504 o.invideoPromotion = buildInvideoPromotion();
505 o.kind = "foo";
506 o.snippet = buildChannelSnippet();
507 o.statistics = buildChannelStatistics();
508 o.status = buildChannelStatus();
509 o.topicDetails = buildChannelTopicDetails();
510 }
511 buildCounterChannel--;
512 return o;
513 }
514
515 checkChannel(api.Channel o) {
516 buildCounterChannel++;
517 if (buildCounterChannel < 3) {
518 checkChannelAuditDetails(o.auditDetails);
519 checkChannelBrandingSettings(o.brandingSettings);
520 checkChannelContentDetails(o.contentDetails);
521 checkChannelContentOwnerDetails(o.contentOwnerDetails);
522 checkChannelConversionPings(o.conversionPings);
523 unittest.expect(o.etag, unittest.equals('foo'));
524 unittest.expect(o.id, unittest.equals('foo'));
525 checkInvideoPromotion(o.invideoPromotion);
526 unittest.expect(o.kind, unittest.equals('foo'));
527 checkChannelSnippet(o.snippet);
528 checkChannelStatistics(o.statistics);
529 checkChannelStatus(o.status);
530 checkChannelTopicDetails(o.topicDetails);
531 }
532 buildCounterChannel--;
533 }
534
535 core.int buildCounterChannelAuditDetails = 0;
536 buildChannelAuditDetails() {
537 var o = new api.ChannelAuditDetails();
538 buildCounterChannelAuditDetails++;
539 if (buildCounterChannelAuditDetails < 3) {
540 o.communityGuidelinesGoodStanding = true;
541 o.contentIdClaimsGoodStanding = true;
542 o.copyrightStrikesGoodStanding = true;
543 o.overallGoodStanding = true;
544 }
545 buildCounterChannelAuditDetails--;
546 return o;
547 }
548
549 checkChannelAuditDetails(api.ChannelAuditDetails o) {
550 buildCounterChannelAuditDetails++;
551 if (buildCounterChannelAuditDetails < 3) {
552 unittest.expect(o.communityGuidelinesGoodStanding, unittest.isTrue);
553 unittest.expect(o.contentIdClaimsGoodStanding, unittest.isTrue);
554 unittest.expect(o.copyrightStrikesGoodStanding, unittest.isTrue);
555 unittest.expect(o.overallGoodStanding, unittest.isTrue);
556 }
557 buildCounterChannelAuditDetails--;
558 }
559
560 core.int buildCounterChannelBannerResource = 0;
561 buildChannelBannerResource() {
562 var o = new api.ChannelBannerResource();
563 buildCounterChannelBannerResource++;
564 if (buildCounterChannelBannerResource < 3) {
565 o.etag = "foo";
566 o.kind = "foo";
567 o.url = "foo";
568 }
569 buildCounterChannelBannerResource--;
570 return o;
571 }
572
573 checkChannelBannerResource(api.ChannelBannerResource o) {
574 buildCounterChannelBannerResource++;
575 if (buildCounterChannelBannerResource < 3) {
576 unittest.expect(o.etag, unittest.equals('foo'));
577 unittest.expect(o.kind, unittest.equals('foo'));
578 unittest.expect(o.url, unittest.equals('foo'));
579 }
580 buildCounterChannelBannerResource--;
581 }
582
583 buildUnnamed345() {
584 var o = new core.List<api.PropertyValue>();
585 o.add(buildPropertyValue());
586 o.add(buildPropertyValue());
587 return o;
588 }
589
590 checkUnnamed345(core.List<api.PropertyValue> o) {
591 unittest.expect(o, unittest.hasLength(2));
592 checkPropertyValue(o[0]);
593 checkPropertyValue(o[1]);
594 }
595
596 core.int buildCounterChannelBrandingSettings = 0;
597 buildChannelBrandingSettings() {
598 var o = new api.ChannelBrandingSettings();
599 buildCounterChannelBrandingSettings++;
600 if (buildCounterChannelBrandingSettings < 3) {
601 o.channel = buildChannelSettings();
602 o.hints = buildUnnamed345();
603 o.image = buildImageSettings();
604 o.watch = buildWatchSettings();
605 }
606 buildCounterChannelBrandingSettings--;
607 return o;
608 }
609
610 checkChannelBrandingSettings(api.ChannelBrandingSettings o) {
611 buildCounterChannelBrandingSettings++;
612 if (buildCounterChannelBrandingSettings < 3) {
613 checkChannelSettings(o.channel);
614 checkUnnamed345(o.hints);
615 checkImageSettings(o.image);
616 checkWatchSettings(o.watch);
617 }
618 buildCounterChannelBrandingSettings--;
619 }
620
621 core.int buildCounterChannelContentDetailsRelatedPlaylists = 0;
622 buildChannelContentDetailsRelatedPlaylists() {
623 var o = new api.ChannelContentDetailsRelatedPlaylists();
624 buildCounterChannelContentDetailsRelatedPlaylists++;
625 if (buildCounterChannelContentDetailsRelatedPlaylists < 3) {
626 o.favorites = "foo";
627 o.likes = "foo";
628 o.uploads = "foo";
629 o.watchHistory = "foo";
630 o.watchLater = "foo";
631 }
632 buildCounterChannelContentDetailsRelatedPlaylists--;
633 return o;
634 }
635
636 checkChannelContentDetailsRelatedPlaylists(api.ChannelContentDetailsRelatedPlayl ists o) {
637 buildCounterChannelContentDetailsRelatedPlaylists++;
638 if (buildCounterChannelContentDetailsRelatedPlaylists < 3) {
639 unittest.expect(o.favorites, unittest.equals('foo'));
640 unittest.expect(o.likes, unittest.equals('foo'));
641 unittest.expect(o.uploads, unittest.equals('foo'));
642 unittest.expect(o.watchHistory, unittest.equals('foo'));
643 unittest.expect(o.watchLater, unittest.equals('foo'));
644 }
645 buildCounterChannelContentDetailsRelatedPlaylists--;
646 }
647
648 core.int buildCounterChannelContentDetails = 0;
649 buildChannelContentDetails() {
650 var o = new api.ChannelContentDetails();
651 buildCounterChannelContentDetails++;
652 if (buildCounterChannelContentDetails < 3) {
653 o.googlePlusUserId = "foo";
654 o.relatedPlaylists = buildChannelContentDetailsRelatedPlaylists();
655 }
656 buildCounterChannelContentDetails--;
657 return o;
658 }
659
660 checkChannelContentDetails(api.ChannelContentDetails o) {
661 buildCounterChannelContentDetails++;
662 if (buildCounterChannelContentDetails < 3) {
663 unittest.expect(o.googlePlusUserId, unittest.equals('foo'));
664 checkChannelContentDetailsRelatedPlaylists(o.relatedPlaylists);
665 }
666 buildCounterChannelContentDetails--;
667 }
668
669 core.int buildCounterChannelContentOwnerDetails = 0;
670 buildChannelContentOwnerDetails() {
671 var o = new api.ChannelContentOwnerDetails();
672 buildCounterChannelContentOwnerDetails++;
673 if (buildCounterChannelContentOwnerDetails < 3) {
674 o.contentOwner = "foo";
675 o.timeLinked = core.DateTime.parse("2002-02-27T14:01:02");
676 }
677 buildCounterChannelContentOwnerDetails--;
678 return o;
679 }
680
681 checkChannelContentOwnerDetails(api.ChannelContentOwnerDetails o) {
682 buildCounterChannelContentOwnerDetails++;
683 if (buildCounterChannelContentOwnerDetails < 3) {
684 unittest.expect(o.contentOwner, unittest.equals('foo'));
685 unittest.expect(o.timeLinked, unittest.equals(core.DateTime.parse("2002-02-2 7T14:01:02")));
686 }
687 buildCounterChannelContentOwnerDetails--;
688 }
689
690 core.int buildCounterChannelConversionPing = 0;
691 buildChannelConversionPing() {
692 var o = new api.ChannelConversionPing();
693 buildCounterChannelConversionPing++;
694 if (buildCounterChannelConversionPing < 3) {
695 o.context = "foo";
696 o.conversionUrl = "foo";
697 }
698 buildCounterChannelConversionPing--;
699 return o;
700 }
701
702 checkChannelConversionPing(api.ChannelConversionPing o) {
703 buildCounterChannelConversionPing++;
704 if (buildCounterChannelConversionPing < 3) {
705 unittest.expect(o.context, unittest.equals('foo'));
706 unittest.expect(o.conversionUrl, unittest.equals('foo'));
707 }
708 buildCounterChannelConversionPing--;
709 }
710
711 buildUnnamed346() {
712 var o = new core.List<api.ChannelConversionPing>();
713 o.add(buildChannelConversionPing());
714 o.add(buildChannelConversionPing());
715 return o;
716 }
717
718 checkUnnamed346(core.List<api.ChannelConversionPing> o) {
719 unittest.expect(o, unittest.hasLength(2));
720 checkChannelConversionPing(o[0]);
721 checkChannelConversionPing(o[1]);
722 }
723
724 core.int buildCounterChannelConversionPings = 0;
725 buildChannelConversionPings() {
726 var o = new api.ChannelConversionPings();
727 buildCounterChannelConversionPings++;
728 if (buildCounterChannelConversionPings < 3) {
729 o.pings = buildUnnamed346();
730 }
731 buildCounterChannelConversionPings--;
732 return o;
733 }
734
735 checkChannelConversionPings(api.ChannelConversionPings o) {
736 buildCounterChannelConversionPings++;
737 if (buildCounterChannelConversionPings < 3) {
738 checkUnnamed346(o.pings);
739 }
740 buildCounterChannelConversionPings--;
741 }
742
743 buildUnnamed347() {
744 var o = new core.List<api.Channel>();
745 o.add(buildChannel());
746 o.add(buildChannel());
747 return o;
748 }
749
750 checkUnnamed347(core.List<api.Channel> o) {
751 unittest.expect(o, unittest.hasLength(2));
752 checkChannel(o[0]);
753 checkChannel(o[1]);
754 }
755
756 core.int buildCounterChannelListResponse = 0;
757 buildChannelListResponse() {
758 var o = new api.ChannelListResponse();
759 buildCounterChannelListResponse++;
760 if (buildCounterChannelListResponse < 3) {
761 o.etag = "foo";
762 o.eventId = "foo";
763 o.items = buildUnnamed347();
764 o.kind = "foo";
765 o.nextPageToken = "foo";
766 o.pageInfo = buildPageInfo();
767 o.prevPageToken = "foo";
768 o.tokenPagination = buildTokenPagination();
769 o.visitorId = "foo";
770 }
771 buildCounterChannelListResponse--;
772 return o;
773 }
774
775 checkChannelListResponse(api.ChannelListResponse o) {
776 buildCounterChannelListResponse++;
777 if (buildCounterChannelListResponse < 3) {
778 unittest.expect(o.etag, unittest.equals('foo'));
779 unittest.expect(o.eventId, unittest.equals('foo'));
780 checkUnnamed347(o.items);
781 unittest.expect(o.kind, unittest.equals('foo'));
782 unittest.expect(o.nextPageToken, unittest.equals('foo'));
783 checkPageInfo(o.pageInfo);
784 unittest.expect(o.prevPageToken, unittest.equals('foo'));
785 checkTokenPagination(o.tokenPagination);
786 unittest.expect(o.visitorId, unittest.equals('foo'));
787 }
788 buildCounterChannelListResponse--;
789 }
790
791 core.int buildCounterChannelSection = 0;
792 buildChannelSection() {
793 var o = new api.ChannelSection();
794 buildCounterChannelSection++;
795 if (buildCounterChannelSection < 3) {
796 o.contentDetails = buildChannelSectionContentDetails();
797 o.etag = "foo";
798 o.id = "foo";
799 o.kind = "foo";
800 o.snippet = buildChannelSectionSnippet();
801 }
802 buildCounterChannelSection--;
803 return o;
804 }
805
806 checkChannelSection(api.ChannelSection o) {
807 buildCounterChannelSection++;
808 if (buildCounterChannelSection < 3) {
809 checkChannelSectionContentDetails(o.contentDetails);
810 unittest.expect(o.etag, unittest.equals('foo'));
811 unittest.expect(o.id, unittest.equals('foo'));
812 unittest.expect(o.kind, unittest.equals('foo'));
813 checkChannelSectionSnippet(o.snippet);
814 }
815 buildCounterChannelSection--;
816 }
817
818 buildUnnamed348() {
819 var o = new core.List<core.String>();
820 o.add("foo");
821 o.add("foo");
822 return o;
823 }
824
825 checkUnnamed348(core.List<core.String> o) {
826 unittest.expect(o, unittest.hasLength(2));
827 unittest.expect(o[0], unittest.equals('foo'));
828 unittest.expect(o[1], unittest.equals('foo'));
829 }
830
831 buildUnnamed349() {
832 var o = new core.List<core.String>();
833 o.add("foo");
834 o.add("foo");
835 return o;
836 }
837
838 checkUnnamed349(core.List<core.String> o) {
839 unittest.expect(o, unittest.hasLength(2));
840 unittest.expect(o[0], unittest.equals('foo'));
841 unittest.expect(o[1], unittest.equals('foo'));
842 }
843
844 core.int buildCounterChannelSectionContentDetails = 0;
845 buildChannelSectionContentDetails() {
846 var o = new api.ChannelSectionContentDetails();
847 buildCounterChannelSectionContentDetails++;
848 if (buildCounterChannelSectionContentDetails < 3) {
849 o.channels = buildUnnamed348();
850 o.playlists = buildUnnamed349();
851 }
852 buildCounterChannelSectionContentDetails--;
853 return o;
854 }
855
856 checkChannelSectionContentDetails(api.ChannelSectionContentDetails o) {
857 buildCounterChannelSectionContentDetails++;
858 if (buildCounterChannelSectionContentDetails < 3) {
859 checkUnnamed348(o.channels);
860 checkUnnamed349(o.playlists);
861 }
862 buildCounterChannelSectionContentDetails--;
863 }
864
865 buildUnnamed350() {
866 var o = new core.List<api.ChannelSection>();
867 o.add(buildChannelSection());
868 o.add(buildChannelSection());
869 return o;
870 }
871
872 checkUnnamed350(core.List<api.ChannelSection> o) {
873 unittest.expect(o, unittest.hasLength(2));
874 checkChannelSection(o[0]);
875 checkChannelSection(o[1]);
876 }
877
878 core.int buildCounterChannelSectionListResponse = 0;
879 buildChannelSectionListResponse() {
880 var o = new api.ChannelSectionListResponse();
881 buildCounterChannelSectionListResponse++;
882 if (buildCounterChannelSectionListResponse < 3) {
883 o.etag = "foo";
884 o.eventId = "foo";
885 o.items = buildUnnamed350();
886 o.kind = "foo";
887 o.visitorId = "foo";
888 }
889 buildCounterChannelSectionListResponse--;
890 return o;
891 }
892
893 checkChannelSectionListResponse(api.ChannelSectionListResponse o) {
894 buildCounterChannelSectionListResponse++;
895 if (buildCounterChannelSectionListResponse < 3) {
896 unittest.expect(o.etag, unittest.equals('foo'));
897 unittest.expect(o.eventId, unittest.equals('foo'));
898 checkUnnamed350(o.items);
899 unittest.expect(o.kind, unittest.equals('foo'));
900 unittest.expect(o.visitorId, unittest.equals('foo'));
901 }
902 buildCounterChannelSectionListResponse--;
903 }
904
905 core.int buildCounterChannelSectionSnippet = 0;
906 buildChannelSectionSnippet() {
907 var o = new api.ChannelSectionSnippet();
908 buildCounterChannelSectionSnippet++;
909 if (buildCounterChannelSectionSnippet < 3) {
910 o.channelId = "foo";
911 o.position = 42;
912 o.style = "foo";
913 o.title = "foo";
914 o.type = "foo";
915 }
916 buildCounterChannelSectionSnippet--;
917 return o;
918 }
919
920 checkChannelSectionSnippet(api.ChannelSectionSnippet o) {
921 buildCounterChannelSectionSnippet++;
922 if (buildCounterChannelSectionSnippet < 3) {
923 unittest.expect(o.channelId, unittest.equals('foo'));
924 unittest.expect(o.position, unittest.equals(42));
925 unittest.expect(o.style, unittest.equals('foo'));
926 unittest.expect(o.title, unittest.equals('foo'));
927 unittest.expect(o.type, unittest.equals('foo'));
928 }
929 buildCounterChannelSectionSnippet--;
930 }
931
932 buildUnnamed351() {
933 var o = new core.List<core.String>();
934 o.add("foo");
935 o.add("foo");
936 return o;
937 }
938
939 checkUnnamed351(core.List<core.String> o) {
940 unittest.expect(o, unittest.hasLength(2));
941 unittest.expect(o[0], unittest.equals('foo'));
942 unittest.expect(o[1], unittest.equals('foo'));
943 }
944
945 core.int buildCounterChannelSettings = 0;
946 buildChannelSettings() {
947 var o = new api.ChannelSettings();
948 buildCounterChannelSettings++;
949 if (buildCounterChannelSettings < 3) {
950 o.defaultTab = "foo";
951 o.description = "foo";
952 o.featuredChannelsTitle = "foo";
953 o.featuredChannelsUrls = buildUnnamed351();
954 o.keywords = "foo";
955 o.moderateComments = true;
956 o.profileColor = "foo";
957 o.showBrowseView = true;
958 o.showRelatedChannels = true;
959 o.title = "foo";
960 o.trackingAnalyticsAccountId = "foo";
961 o.unsubscribedTrailer = "foo";
962 }
963 buildCounterChannelSettings--;
964 return o;
965 }
966
967 checkChannelSettings(api.ChannelSettings o) {
968 buildCounterChannelSettings++;
969 if (buildCounterChannelSettings < 3) {
970 unittest.expect(o.defaultTab, unittest.equals('foo'));
971 unittest.expect(o.description, unittest.equals('foo'));
972 unittest.expect(o.featuredChannelsTitle, unittest.equals('foo'));
973 checkUnnamed351(o.featuredChannelsUrls);
974 unittest.expect(o.keywords, unittest.equals('foo'));
975 unittest.expect(o.moderateComments, unittest.isTrue);
976 unittest.expect(o.profileColor, unittest.equals('foo'));
977 unittest.expect(o.showBrowseView, unittest.isTrue);
978 unittest.expect(o.showRelatedChannels, unittest.isTrue);
979 unittest.expect(o.title, unittest.equals('foo'));
980 unittest.expect(o.trackingAnalyticsAccountId, unittest.equals('foo'));
981 unittest.expect(o.unsubscribedTrailer, unittest.equals('foo'));
982 }
983 buildCounterChannelSettings--;
984 }
985
986 core.int buildCounterChannelSnippet = 0;
987 buildChannelSnippet() {
988 var o = new api.ChannelSnippet();
989 buildCounterChannelSnippet++;
990 if (buildCounterChannelSnippet < 3) {
991 o.description = "foo";
992 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
993 o.thumbnails = buildThumbnailDetails();
994 o.title = "foo";
995 }
996 buildCounterChannelSnippet--;
997 return o;
998 }
999
1000 checkChannelSnippet(api.ChannelSnippet o) {
1001 buildCounterChannelSnippet++;
1002 if (buildCounterChannelSnippet < 3) {
1003 unittest.expect(o.description, unittest.equals('foo'));
1004 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
1005 checkThumbnailDetails(o.thumbnails);
1006 unittest.expect(o.title, unittest.equals('foo'));
1007 }
1008 buildCounterChannelSnippet--;
1009 }
1010
1011 core.int buildCounterChannelStatistics = 0;
1012 buildChannelStatistics() {
1013 var o = new api.ChannelStatistics();
1014 buildCounterChannelStatistics++;
1015 if (buildCounterChannelStatistics < 3) {
1016 o.commentCount = "foo";
1017 o.hiddenSubscriberCount = true;
1018 o.subscriberCount = "foo";
1019 o.videoCount = "foo";
1020 o.viewCount = "foo";
1021 }
1022 buildCounterChannelStatistics--;
1023 return o;
1024 }
1025
1026 checkChannelStatistics(api.ChannelStatistics o) {
1027 buildCounterChannelStatistics++;
1028 if (buildCounterChannelStatistics < 3) {
1029 unittest.expect(o.commentCount, unittest.equals('foo'));
1030 unittest.expect(o.hiddenSubscriberCount, unittest.isTrue);
1031 unittest.expect(o.subscriberCount, unittest.equals('foo'));
1032 unittest.expect(o.videoCount, unittest.equals('foo'));
1033 unittest.expect(o.viewCount, unittest.equals('foo'));
1034 }
1035 buildCounterChannelStatistics--;
1036 }
1037
1038 core.int buildCounterChannelStatus = 0;
1039 buildChannelStatus() {
1040 var o = new api.ChannelStatus();
1041 buildCounterChannelStatus++;
1042 if (buildCounterChannelStatus < 3) {
1043 o.isLinked = true;
1044 o.privacyStatus = "foo";
1045 }
1046 buildCounterChannelStatus--;
1047 return o;
1048 }
1049
1050 checkChannelStatus(api.ChannelStatus o) {
1051 buildCounterChannelStatus++;
1052 if (buildCounterChannelStatus < 3) {
1053 unittest.expect(o.isLinked, unittest.isTrue);
1054 unittest.expect(o.privacyStatus, unittest.equals('foo'));
1055 }
1056 buildCounterChannelStatus--;
1057 }
1058
1059 buildUnnamed352() {
1060 var o = new core.List<core.String>();
1061 o.add("foo");
1062 o.add("foo");
1063 return o;
1064 }
1065
1066 checkUnnamed352(core.List<core.String> o) {
1067 unittest.expect(o, unittest.hasLength(2));
1068 unittest.expect(o[0], unittest.equals('foo'));
1069 unittest.expect(o[1], unittest.equals('foo'));
1070 }
1071
1072 core.int buildCounterChannelTopicDetails = 0;
1073 buildChannelTopicDetails() {
1074 var o = new api.ChannelTopicDetails();
1075 buildCounterChannelTopicDetails++;
1076 if (buildCounterChannelTopicDetails < 3) {
1077 o.topicIds = buildUnnamed352();
1078 }
1079 buildCounterChannelTopicDetails--;
1080 return o;
1081 }
1082
1083 checkChannelTopicDetails(api.ChannelTopicDetails o) {
1084 buildCounterChannelTopicDetails++;
1085 if (buildCounterChannelTopicDetails < 3) {
1086 checkUnnamed352(o.topicIds);
1087 }
1088 buildCounterChannelTopicDetails--;
1089 }
1090
1091 core.int buildCounterContentRating = 0;
1092 buildContentRating() {
1093 var o = new api.ContentRating();
1094 buildCounterContentRating++;
1095 if (buildCounterContentRating < 3) {
1096 o.acbRating = "foo";
1097 o.agcomRating = "foo";
1098 o.anatelRating = "foo";
1099 o.bbfcRating = "foo";
1100 o.bfvcRating = "foo";
1101 o.bmukkRating = "foo";
1102 o.catvRating = "foo";
1103 o.catvfrRating = "foo";
1104 o.cbfcRating = "foo";
1105 o.cccRating = "foo";
1106 o.cceRating = "foo";
1107 o.chfilmRating = "foo";
1108 o.chvrsRating = "foo";
1109 o.cicfRating = "foo";
1110 o.cnaRating = "foo";
1111 o.csaRating = "foo";
1112 o.cscfRating = "foo";
1113 o.czfilmRating = "foo";
1114 o.djctqRating = "foo";
1115 o.eefilmRating = "foo";
1116 o.egfilmRating = "foo";
1117 o.eirinRating = "foo";
1118 o.fcbmRating = "foo";
1119 o.fcoRating = "foo";
1120 o.fmocRating = "foo";
1121 o.fpbRating = "foo";
1122 o.fskRating = "foo";
1123 o.grfilmRating = "foo";
1124 o.icaaRating = "foo";
1125 o.ifcoRating = "foo";
1126 o.ilfilmRating = "foo";
1127 o.incaaRating = "foo";
1128 o.kfcbRating = "foo";
1129 o.kijkwijzerRating = "foo";
1130 o.kmrbRating = "foo";
1131 o.lsfRating = "foo";
1132 o.mccaaRating = "foo";
1133 o.mccypRating = "foo";
1134 o.mdaRating = "foo";
1135 o.medietilsynetRating = "foo";
1136 o.mekuRating = "foo";
1137 o.mibacRating = "foo";
1138 o.mocRating = "foo";
1139 o.moctwRating = "foo";
1140 o.mpaaRating = "foo";
1141 o.mtrcbRating = "foo";
1142 o.nbcRating = "foo";
1143 o.nbcplRating = "foo";
1144 o.nfrcRating = "foo";
1145 o.nfvcbRating = "foo";
1146 o.nkclvRating = "foo";
1147 o.oflcRating = "foo";
1148 o.pefilmRating = "foo";
1149 o.rcnofRating = "foo";
1150 o.resorteviolenciaRating = "foo";
1151 o.rtcRating = "foo";
1152 o.rteRating = "foo";
1153 o.russiaRating = "foo";
1154 o.skfilmRating = "foo";
1155 o.smaisRating = "foo";
1156 o.smsaRating = "foo";
1157 o.tvpgRating = "foo";
1158 o.ytRating = "foo";
1159 }
1160 buildCounterContentRating--;
1161 return o;
1162 }
1163
1164 checkContentRating(api.ContentRating o) {
1165 buildCounterContentRating++;
1166 if (buildCounterContentRating < 3) {
1167 unittest.expect(o.acbRating, unittest.equals('foo'));
1168 unittest.expect(o.agcomRating, unittest.equals('foo'));
1169 unittest.expect(o.anatelRating, unittest.equals('foo'));
1170 unittest.expect(o.bbfcRating, unittest.equals('foo'));
1171 unittest.expect(o.bfvcRating, unittest.equals('foo'));
1172 unittest.expect(o.bmukkRating, unittest.equals('foo'));
1173 unittest.expect(o.catvRating, unittest.equals('foo'));
1174 unittest.expect(o.catvfrRating, unittest.equals('foo'));
1175 unittest.expect(o.cbfcRating, unittest.equals('foo'));
1176 unittest.expect(o.cccRating, unittest.equals('foo'));
1177 unittest.expect(o.cceRating, unittest.equals('foo'));
1178 unittest.expect(o.chfilmRating, unittest.equals('foo'));
1179 unittest.expect(o.chvrsRating, unittest.equals('foo'));
1180 unittest.expect(o.cicfRating, unittest.equals('foo'));
1181 unittest.expect(o.cnaRating, unittest.equals('foo'));
1182 unittest.expect(o.csaRating, unittest.equals('foo'));
1183 unittest.expect(o.cscfRating, unittest.equals('foo'));
1184 unittest.expect(o.czfilmRating, unittest.equals('foo'));
1185 unittest.expect(o.djctqRating, unittest.equals('foo'));
1186 unittest.expect(o.eefilmRating, unittest.equals('foo'));
1187 unittest.expect(o.egfilmRating, unittest.equals('foo'));
1188 unittest.expect(o.eirinRating, unittest.equals('foo'));
1189 unittest.expect(o.fcbmRating, unittest.equals('foo'));
1190 unittest.expect(o.fcoRating, unittest.equals('foo'));
1191 unittest.expect(o.fmocRating, unittest.equals('foo'));
1192 unittest.expect(o.fpbRating, unittest.equals('foo'));
1193 unittest.expect(o.fskRating, unittest.equals('foo'));
1194 unittest.expect(o.grfilmRating, unittest.equals('foo'));
1195 unittest.expect(o.icaaRating, unittest.equals('foo'));
1196 unittest.expect(o.ifcoRating, unittest.equals('foo'));
1197 unittest.expect(o.ilfilmRating, unittest.equals('foo'));
1198 unittest.expect(o.incaaRating, unittest.equals('foo'));
1199 unittest.expect(o.kfcbRating, unittest.equals('foo'));
1200 unittest.expect(o.kijkwijzerRating, unittest.equals('foo'));
1201 unittest.expect(o.kmrbRating, unittest.equals('foo'));
1202 unittest.expect(o.lsfRating, unittest.equals('foo'));
1203 unittest.expect(o.mccaaRating, unittest.equals('foo'));
1204 unittest.expect(o.mccypRating, unittest.equals('foo'));
1205 unittest.expect(o.mdaRating, unittest.equals('foo'));
1206 unittest.expect(o.medietilsynetRating, unittest.equals('foo'));
1207 unittest.expect(o.mekuRating, unittest.equals('foo'));
1208 unittest.expect(o.mibacRating, unittest.equals('foo'));
1209 unittest.expect(o.mocRating, unittest.equals('foo'));
1210 unittest.expect(o.moctwRating, unittest.equals('foo'));
1211 unittest.expect(o.mpaaRating, unittest.equals('foo'));
1212 unittest.expect(o.mtrcbRating, unittest.equals('foo'));
1213 unittest.expect(o.nbcRating, unittest.equals('foo'));
1214 unittest.expect(o.nbcplRating, unittest.equals('foo'));
1215 unittest.expect(o.nfrcRating, unittest.equals('foo'));
1216 unittest.expect(o.nfvcbRating, unittest.equals('foo'));
1217 unittest.expect(o.nkclvRating, unittest.equals('foo'));
1218 unittest.expect(o.oflcRating, unittest.equals('foo'));
1219 unittest.expect(o.pefilmRating, unittest.equals('foo'));
1220 unittest.expect(o.rcnofRating, unittest.equals('foo'));
1221 unittest.expect(o.resorteviolenciaRating, unittest.equals('foo'));
1222 unittest.expect(o.rtcRating, unittest.equals('foo'));
1223 unittest.expect(o.rteRating, unittest.equals('foo'));
1224 unittest.expect(o.russiaRating, unittest.equals('foo'));
1225 unittest.expect(o.skfilmRating, unittest.equals('foo'));
1226 unittest.expect(o.smaisRating, unittest.equals('foo'));
1227 unittest.expect(o.smsaRating, unittest.equals('foo'));
1228 unittest.expect(o.tvpgRating, unittest.equals('foo'));
1229 unittest.expect(o.ytRating, unittest.equals('foo'));
1230 }
1231 buildCounterContentRating--;
1232 }
1233
1234 core.int buildCounterGeoPoint = 0;
1235 buildGeoPoint() {
1236 var o = new api.GeoPoint();
1237 buildCounterGeoPoint++;
1238 if (buildCounterGeoPoint < 3) {
1239 o.altitude = 42.0;
1240 o.latitude = 42.0;
1241 o.longitude = 42.0;
1242 }
1243 buildCounterGeoPoint--;
1244 return o;
1245 }
1246
1247 checkGeoPoint(api.GeoPoint o) {
1248 buildCounterGeoPoint++;
1249 if (buildCounterGeoPoint < 3) {
1250 unittest.expect(o.altitude, unittest.equals(42.0));
1251 unittest.expect(o.latitude, unittest.equals(42.0));
1252 unittest.expect(o.longitude, unittest.equals(42.0));
1253 }
1254 buildCounterGeoPoint--;
1255 }
1256
1257 core.int buildCounterGuideCategory = 0;
1258 buildGuideCategory() {
1259 var o = new api.GuideCategory();
1260 buildCounterGuideCategory++;
1261 if (buildCounterGuideCategory < 3) {
1262 o.etag = "foo";
1263 o.id = "foo";
1264 o.kind = "foo";
1265 o.snippet = buildGuideCategorySnippet();
1266 }
1267 buildCounterGuideCategory--;
1268 return o;
1269 }
1270
1271 checkGuideCategory(api.GuideCategory o) {
1272 buildCounterGuideCategory++;
1273 if (buildCounterGuideCategory < 3) {
1274 unittest.expect(o.etag, unittest.equals('foo'));
1275 unittest.expect(o.id, unittest.equals('foo'));
1276 unittest.expect(o.kind, unittest.equals('foo'));
1277 checkGuideCategorySnippet(o.snippet);
1278 }
1279 buildCounterGuideCategory--;
1280 }
1281
1282 buildUnnamed353() {
1283 var o = new core.List<api.GuideCategory>();
1284 o.add(buildGuideCategory());
1285 o.add(buildGuideCategory());
1286 return o;
1287 }
1288
1289 checkUnnamed353(core.List<api.GuideCategory> o) {
1290 unittest.expect(o, unittest.hasLength(2));
1291 checkGuideCategory(o[0]);
1292 checkGuideCategory(o[1]);
1293 }
1294
1295 core.int buildCounterGuideCategoryListResponse = 0;
1296 buildGuideCategoryListResponse() {
1297 var o = new api.GuideCategoryListResponse();
1298 buildCounterGuideCategoryListResponse++;
1299 if (buildCounterGuideCategoryListResponse < 3) {
1300 o.etag = "foo";
1301 o.eventId = "foo";
1302 o.items = buildUnnamed353();
1303 o.kind = "foo";
1304 o.nextPageToken = "foo";
1305 o.pageInfo = buildPageInfo();
1306 o.prevPageToken = "foo";
1307 o.tokenPagination = buildTokenPagination();
1308 o.visitorId = "foo";
1309 }
1310 buildCounterGuideCategoryListResponse--;
1311 return o;
1312 }
1313
1314 checkGuideCategoryListResponse(api.GuideCategoryListResponse o) {
1315 buildCounterGuideCategoryListResponse++;
1316 if (buildCounterGuideCategoryListResponse < 3) {
1317 unittest.expect(o.etag, unittest.equals('foo'));
1318 unittest.expect(o.eventId, unittest.equals('foo'));
1319 checkUnnamed353(o.items);
1320 unittest.expect(o.kind, unittest.equals('foo'));
1321 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1322 checkPageInfo(o.pageInfo);
1323 unittest.expect(o.prevPageToken, unittest.equals('foo'));
1324 checkTokenPagination(o.tokenPagination);
1325 unittest.expect(o.visitorId, unittest.equals('foo'));
1326 }
1327 buildCounterGuideCategoryListResponse--;
1328 }
1329
1330 core.int buildCounterGuideCategorySnippet = 0;
1331 buildGuideCategorySnippet() {
1332 var o = new api.GuideCategorySnippet();
1333 buildCounterGuideCategorySnippet++;
1334 if (buildCounterGuideCategorySnippet < 3) {
1335 o.channelId = "foo";
1336 o.title = "foo";
1337 }
1338 buildCounterGuideCategorySnippet--;
1339 return o;
1340 }
1341
1342 checkGuideCategorySnippet(api.GuideCategorySnippet o) {
1343 buildCounterGuideCategorySnippet++;
1344 if (buildCounterGuideCategorySnippet < 3) {
1345 unittest.expect(o.channelId, unittest.equals('foo'));
1346 unittest.expect(o.title, unittest.equals('foo'));
1347 }
1348 buildCounterGuideCategorySnippet--;
1349 }
1350
1351 core.int buildCounterI18nLanguage = 0;
1352 buildI18nLanguage() {
1353 var o = new api.I18nLanguage();
1354 buildCounterI18nLanguage++;
1355 if (buildCounterI18nLanguage < 3) {
1356 o.etag = "foo";
1357 o.id = "foo";
1358 o.kind = "foo";
1359 o.snippet = buildI18nLanguageSnippet();
1360 }
1361 buildCounterI18nLanguage--;
1362 return o;
1363 }
1364
1365 checkI18nLanguage(api.I18nLanguage o) {
1366 buildCounterI18nLanguage++;
1367 if (buildCounterI18nLanguage < 3) {
1368 unittest.expect(o.etag, unittest.equals('foo'));
1369 unittest.expect(o.id, unittest.equals('foo'));
1370 unittest.expect(o.kind, unittest.equals('foo'));
1371 checkI18nLanguageSnippet(o.snippet);
1372 }
1373 buildCounterI18nLanguage--;
1374 }
1375
1376 buildUnnamed354() {
1377 var o = new core.List<api.I18nLanguage>();
1378 o.add(buildI18nLanguage());
1379 o.add(buildI18nLanguage());
1380 return o;
1381 }
1382
1383 checkUnnamed354(core.List<api.I18nLanguage> o) {
1384 unittest.expect(o, unittest.hasLength(2));
1385 checkI18nLanguage(o[0]);
1386 checkI18nLanguage(o[1]);
1387 }
1388
1389 core.int buildCounterI18nLanguageListResponse = 0;
1390 buildI18nLanguageListResponse() {
1391 var o = new api.I18nLanguageListResponse();
1392 buildCounterI18nLanguageListResponse++;
1393 if (buildCounterI18nLanguageListResponse < 3) {
1394 o.etag = "foo";
1395 o.eventId = "foo";
1396 o.items = buildUnnamed354();
1397 o.kind = "foo";
1398 o.visitorId = "foo";
1399 }
1400 buildCounterI18nLanguageListResponse--;
1401 return o;
1402 }
1403
1404 checkI18nLanguageListResponse(api.I18nLanguageListResponse o) {
1405 buildCounterI18nLanguageListResponse++;
1406 if (buildCounterI18nLanguageListResponse < 3) {
1407 unittest.expect(o.etag, unittest.equals('foo'));
1408 unittest.expect(o.eventId, unittest.equals('foo'));
1409 checkUnnamed354(o.items);
1410 unittest.expect(o.kind, unittest.equals('foo'));
1411 unittest.expect(o.visitorId, unittest.equals('foo'));
1412 }
1413 buildCounterI18nLanguageListResponse--;
1414 }
1415
1416 core.int buildCounterI18nLanguageSnippet = 0;
1417 buildI18nLanguageSnippet() {
1418 var o = new api.I18nLanguageSnippet();
1419 buildCounterI18nLanguageSnippet++;
1420 if (buildCounterI18nLanguageSnippet < 3) {
1421 o.hl = "foo";
1422 o.name = "foo";
1423 }
1424 buildCounterI18nLanguageSnippet--;
1425 return o;
1426 }
1427
1428 checkI18nLanguageSnippet(api.I18nLanguageSnippet o) {
1429 buildCounterI18nLanguageSnippet++;
1430 if (buildCounterI18nLanguageSnippet < 3) {
1431 unittest.expect(o.hl, unittest.equals('foo'));
1432 unittest.expect(o.name, unittest.equals('foo'));
1433 }
1434 buildCounterI18nLanguageSnippet--;
1435 }
1436
1437 core.int buildCounterI18nRegion = 0;
1438 buildI18nRegion() {
1439 var o = new api.I18nRegion();
1440 buildCounterI18nRegion++;
1441 if (buildCounterI18nRegion < 3) {
1442 o.etag = "foo";
1443 o.id = "foo";
1444 o.kind = "foo";
1445 o.snippet = buildI18nRegionSnippet();
1446 }
1447 buildCounterI18nRegion--;
1448 return o;
1449 }
1450
1451 checkI18nRegion(api.I18nRegion o) {
1452 buildCounterI18nRegion++;
1453 if (buildCounterI18nRegion < 3) {
1454 unittest.expect(o.etag, unittest.equals('foo'));
1455 unittest.expect(o.id, unittest.equals('foo'));
1456 unittest.expect(o.kind, unittest.equals('foo'));
1457 checkI18nRegionSnippet(o.snippet);
1458 }
1459 buildCounterI18nRegion--;
1460 }
1461
1462 buildUnnamed355() {
1463 var o = new core.List<api.I18nRegion>();
1464 o.add(buildI18nRegion());
1465 o.add(buildI18nRegion());
1466 return o;
1467 }
1468
1469 checkUnnamed355(core.List<api.I18nRegion> o) {
1470 unittest.expect(o, unittest.hasLength(2));
1471 checkI18nRegion(o[0]);
1472 checkI18nRegion(o[1]);
1473 }
1474
1475 core.int buildCounterI18nRegionListResponse = 0;
1476 buildI18nRegionListResponse() {
1477 var o = new api.I18nRegionListResponse();
1478 buildCounterI18nRegionListResponse++;
1479 if (buildCounterI18nRegionListResponse < 3) {
1480 o.etag = "foo";
1481 o.eventId = "foo";
1482 o.items = buildUnnamed355();
1483 o.kind = "foo";
1484 o.visitorId = "foo";
1485 }
1486 buildCounterI18nRegionListResponse--;
1487 return o;
1488 }
1489
1490 checkI18nRegionListResponse(api.I18nRegionListResponse o) {
1491 buildCounterI18nRegionListResponse++;
1492 if (buildCounterI18nRegionListResponse < 3) {
1493 unittest.expect(o.etag, unittest.equals('foo'));
1494 unittest.expect(o.eventId, unittest.equals('foo'));
1495 checkUnnamed355(o.items);
1496 unittest.expect(o.kind, unittest.equals('foo'));
1497 unittest.expect(o.visitorId, unittest.equals('foo'));
1498 }
1499 buildCounterI18nRegionListResponse--;
1500 }
1501
1502 core.int buildCounterI18nRegionSnippet = 0;
1503 buildI18nRegionSnippet() {
1504 var o = new api.I18nRegionSnippet();
1505 buildCounterI18nRegionSnippet++;
1506 if (buildCounterI18nRegionSnippet < 3) {
1507 o.gl = "foo";
1508 o.name = "foo";
1509 }
1510 buildCounterI18nRegionSnippet--;
1511 return o;
1512 }
1513
1514 checkI18nRegionSnippet(api.I18nRegionSnippet o) {
1515 buildCounterI18nRegionSnippet++;
1516 if (buildCounterI18nRegionSnippet < 3) {
1517 unittest.expect(o.gl, unittest.equals('foo'));
1518 unittest.expect(o.name, unittest.equals('foo'));
1519 }
1520 buildCounterI18nRegionSnippet--;
1521 }
1522
1523 core.int buildCounterImageSettings = 0;
1524 buildImageSettings() {
1525 var o = new api.ImageSettings();
1526 buildCounterImageSettings++;
1527 if (buildCounterImageSettings < 3) {
1528 o.backgroundImageUrl = buildLocalizedProperty();
1529 o.bannerExternalUrl = "foo";
1530 o.bannerImageUrl = "foo";
1531 o.bannerMobileExtraHdImageUrl = "foo";
1532 o.bannerMobileHdImageUrl = "foo";
1533 o.bannerMobileImageUrl = "foo";
1534 o.bannerMobileLowImageUrl = "foo";
1535 o.bannerMobileMediumHdImageUrl = "foo";
1536 o.bannerTabletExtraHdImageUrl = "foo";
1537 o.bannerTabletHdImageUrl = "foo";
1538 o.bannerTabletImageUrl = "foo";
1539 o.bannerTabletLowImageUrl = "foo";
1540 o.bannerTvHighImageUrl = "foo";
1541 o.bannerTvImageUrl = "foo";
1542 o.bannerTvLowImageUrl = "foo";
1543 o.bannerTvMediumImageUrl = "foo";
1544 o.largeBrandedBannerImageImapScript = buildLocalizedProperty();
1545 o.largeBrandedBannerImageUrl = buildLocalizedProperty();
1546 o.smallBrandedBannerImageImapScript = buildLocalizedProperty();
1547 o.smallBrandedBannerImageUrl = buildLocalizedProperty();
1548 o.trackingImageUrl = "foo";
1549 o.watchIconImageUrl = "foo";
1550 }
1551 buildCounterImageSettings--;
1552 return o;
1553 }
1554
1555 checkImageSettings(api.ImageSettings o) {
1556 buildCounterImageSettings++;
1557 if (buildCounterImageSettings < 3) {
1558 checkLocalizedProperty(o.backgroundImageUrl);
1559 unittest.expect(o.bannerExternalUrl, unittest.equals('foo'));
1560 unittest.expect(o.bannerImageUrl, unittest.equals('foo'));
1561 unittest.expect(o.bannerMobileExtraHdImageUrl, unittest.equals('foo'));
1562 unittest.expect(o.bannerMobileHdImageUrl, unittest.equals('foo'));
1563 unittest.expect(o.bannerMobileImageUrl, unittest.equals('foo'));
1564 unittest.expect(o.bannerMobileLowImageUrl, unittest.equals('foo'));
1565 unittest.expect(o.bannerMobileMediumHdImageUrl, unittest.equals('foo'));
1566 unittest.expect(o.bannerTabletExtraHdImageUrl, unittest.equals('foo'));
1567 unittest.expect(o.bannerTabletHdImageUrl, unittest.equals('foo'));
1568 unittest.expect(o.bannerTabletImageUrl, unittest.equals('foo'));
1569 unittest.expect(o.bannerTabletLowImageUrl, unittest.equals('foo'));
1570 unittest.expect(o.bannerTvHighImageUrl, unittest.equals('foo'));
1571 unittest.expect(o.bannerTvImageUrl, unittest.equals('foo'));
1572 unittest.expect(o.bannerTvLowImageUrl, unittest.equals('foo'));
1573 unittest.expect(o.bannerTvMediumImageUrl, unittest.equals('foo'));
1574 checkLocalizedProperty(o.largeBrandedBannerImageImapScript);
1575 checkLocalizedProperty(o.largeBrandedBannerImageUrl);
1576 checkLocalizedProperty(o.smallBrandedBannerImageImapScript);
1577 checkLocalizedProperty(o.smallBrandedBannerImageUrl);
1578 unittest.expect(o.trackingImageUrl, unittest.equals('foo'));
1579 unittest.expect(o.watchIconImageUrl, unittest.equals('foo'));
1580 }
1581 buildCounterImageSettings--;
1582 }
1583
1584 core.int buildCounterIngestionInfo = 0;
1585 buildIngestionInfo() {
1586 var o = new api.IngestionInfo();
1587 buildCounterIngestionInfo++;
1588 if (buildCounterIngestionInfo < 3) {
1589 o.backupIngestionAddress = "foo";
1590 o.ingestionAddress = "foo";
1591 o.streamName = "foo";
1592 }
1593 buildCounterIngestionInfo--;
1594 return o;
1595 }
1596
1597 checkIngestionInfo(api.IngestionInfo o) {
1598 buildCounterIngestionInfo++;
1599 if (buildCounterIngestionInfo < 3) {
1600 unittest.expect(o.backupIngestionAddress, unittest.equals('foo'));
1601 unittest.expect(o.ingestionAddress, unittest.equals('foo'));
1602 unittest.expect(o.streamName, unittest.equals('foo'));
1603 }
1604 buildCounterIngestionInfo--;
1605 }
1606
1607 core.int buildCounterInvideoBranding = 0;
1608 buildInvideoBranding() {
1609 var o = new api.InvideoBranding();
1610 buildCounterInvideoBranding++;
1611 if (buildCounterInvideoBranding < 3) {
1612 o.imageBytes = "foo";
1613 o.imageUrl = "foo";
1614 o.position = buildInvideoPosition();
1615 o.targetChannelId = "foo";
1616 o.timing = buildInvideoTiming();
1617 }
1618 buildCounterInvideoBranding--;
1619 return o;
1620 }
1621
1622 checkInvideoBranding(api.InvideoBranding o) {
1623 buildCounterInvideoBranding++;
1624 if (buildCounterInvideoBranding < 3) {
1625 unittest.expect(o.imageBytes, unittest.equals('foo'));
1626 unittest.expect(o.imageUrl, unittest.equals('foo'));
1627 checkInvideoPosition(o.position);
1628 unittest.expect(o.targetChannelId, unittest.equals('foo'));
1629 checkInvideoTiming(o.timing);
1630 }
1631 buildCounterInvideoBranding--;
1632 }
1633
1634 core.int buildCounterInvideoPosition = 0;
1635 buildInvideoPosition() {
1636 var o = new api.InvideoPosition();
1637 buildCounterInvideoPosition++;
1638 if (buildCounterInvideoPosition < 3) {
1639 o.cornerPosition = "foo";
1640 o.type = "foo";
1641 }
1642 buildCounterInvideoPosition--;
1643 return o;
1644 }
1645
1646 checkInvideoPosition(api.InvideoPosition o) {
1647 buildCounterInvideoPosition++;
1648 if (buildCounterInvideoPosition < 3) {
1649 unittest.expect(o.cornerPosition, unittest.equals('foo'));
1650 unittest.expect(o.type, unittest.equals('foo'));
1651 }
1652 buildCounterInvideoPosition--;
1653 }
1654
1655 buildUnnamed356() {
1656 var o = new core.List<api.PromotedItem>();
1657 o.add(buildPromotedItem());
1658 o.add(buildPromotedItem());
1659 return o;
1660 }
1661
1662 checkUnnamed356(core.List<api.PromotedItem> o) {
1663 unittest.expect(o, unittest.hasLength(2));
1664 checkPromotedItem(o[0]);
1665 checkPromotedItem(o[1]);
1666 }
1667
1668 core.int buildCounterInvideoPromotion = 0;
1669 buildInvideoPromotion() {
1670 var o = new api.InvideoPromotion();
1671 buildCounterInvideoPromotion++;
1672 if (buildCounterInvideoPromotion < 3) {
1673 o.defaultTiming = buildInvideoTiming();
1674 o.items = buildUnnamed356();
1675 o.position = buildInvideoPosition();
1676 }
1677 buildCounterInvideoPromotion--;
1678 return o;
1679 }
1680
1681 checkInvideoPromotion(api.InvideoPromotion o) {
1682 buildCounterInvideoPromotion++;
1683 if (buildCounterInvideoPromotion < 3) {
1684 checkInvideoTiming(o.defaultTiming);
1685 checkUnnamed356(o.items);
1686 checkInvideoPosition(o.position);
1687 }
1688 buildCounterInvideoPromotion--;
1689 }
1690
1691 core.int buildCounterInvideoTiming = 0;
1692 buildInvideoTiming() {
1693 var o = new api.InvideoTiming();
1694 buildCounterInvideoTiming++;
1695 if (buildCounterInvideoTiming < 3) {
1696 o.durationMs = "foo";
1697 o.offsetMs = "foo";
1698 o.type = "foo";
1699 }
1700 buildCounterInvideoTiming--;
1701 return o;
1702 }
1703
1704 checkInvideoTiming(api.InvideoTiming o) {
1705 buildCounterInvideoTiming++;
1706 if (buildCounterInvideoTiming < 3) {
1707 unittest.expect(o.durationMs, unittest.equals('foo'));
1708 unittest.expect(o.offsetMs, unittest.equals('foo'));
1709 unittest.expect(o.type, unittest.equals('foo'));
1710 }
1711 buildCounterInvideoTiming--;
1712 }
1713
1714 core.int buildCounterLiveBroadcast = 0;
1715 buildLiveBroadcast() {
1716 var o = new api.LiveBroadcast();
1717 buildCounterLiveBroadcast++;
1718 if (buildCounterLiveBroadcast < 3) {
1719 o.contentDetails = buildLiveBroadcastContentDetails();
1720 o.etag = "foo";
1721 o.id = "foo";
1722 o.kind = "foo";
1723 o.snippet = buildLiveBroadcastSnippet();
1724 o.status = buildLiveBroadcastStatus();
1725 }
1726 buildCounterLiveBroadcast--;
1727 return o;
1728 }
1729
1730 checkLiveBroadcast(api.LiveBroadcast o) {
1731 buildCounterLiveBroadcast++;
1732 if (buildCounterLiveBroadcast < 3) {
1733 checkLiveBroadcastContentDetails(o.contentDetails);
1734 unittest.expect(o.etag, unittest.equals('foo'));
1735 unittest.expect(o.id, unittest.equals('foo'));
1736 unittest.expect(o.kind, unittest.equals('foo'));
1737 checkLiveBroadcastSnippet(o.snippet);
1738 checkLiveBroadcastStatus(o.status);
1739 }
1740 buildCounterLiveBroadcast--;
1741 }
1742
1743 core.int buildCounterLiveBroadcastContentDetails = 0;
1744 buildLiveBroadcastContentDetails() {
1745 var o = new api.LiveBroadcastContentDetails();
1746 buildCounterLiveBroadcastContentDetails++;
1747 if (buildCounterLiveBroadcastContentDetails < 3) {
1748 o.boundStreamId = "foo";
1749 o.enableClosedCaptions = true;
1750 o.enableContentEncryption = true;
1751 o.enableDvr = true;
1752 o.enableEmbed = true;
1753 o.monitorStream = buildMonitorStreamInfo();
1754 o.recordFromStart = true;
1755 o.startWithSlate = true;
1756 }
1757 buildCounterLiveBroadcastContentDetails--;
1758 return o;
1759 }
1760
1761 checkLiveBroadcastContentDetails(api.LiveBroadcastContentDetails o) {
1762 buildCounterLiveBroadcastContentDetails++;
1763 if (buildCounterLiveBroadcastContentDetails < 3) {
1764 unittest.expect(o.boundStreamId, unittest.equals('foo'));
1765 unittest.expect(o.enableClosedCaptions, unittest.isTrue);
1766 unittest.expect(o.enableContentEncryption, unittest.isTrue);
1767 unittest.expect(o.enableDvr, unittest.isTrue);
1768 unittest.expect(o.enableEmbed, unittest.isTrue);
1769 checkMonitorStreamInfo(o.monitorStream);
1770 unittest.expect(o.recordFromStart, unittest.isTrue);
1771 unittest.expect(o.startWithSlate, unittest.isTrue);
1772 }
1773 buildCounterLiveBroadcastContentDetails--;
1774 }
1775
1776 buildUnnamed357() {
1777 var o = new core.List<api.LiveBroadcast>();
1778 o.add(buildLiveBroadcast());
1779 o.add(buildLiveBroadcast());
1780 return o;
1781 }
1782
1783 checkUnnamed357(core.List<api.LiveBroadcast> o) {
1784 unittest.expect(o, unittest.hasLength(2));
1785 checkLiveBroadcast(o[0]);
1786 checkLiveBroadcast(o[1]);
1787 }
1788
1789 core.int buildCounterLiveBroadcastListResponse = 0;
1790 buildLiveBroadcastListResponse() {
1791 var o = new api.LiveBroadcastListResponse();
1792 buildCounterLiveBroadcastListResponse++;
1793 if (buildCounterLiveBroadcastListResponse < 3) {
1794 o.etag = "foo";
1795 o.eventId = "foo";
1796 o.items = buildUnnamed357();
1797 o.kind = "foo";
1798 o.nextPageToken = "foo";
1799 o.pageInfo = buildPageInfo();
1800 o.prevPageToken = "foo";
1801 o.tokenPagination = buildTokenPagination();
1802 o.visitorId = "foo";
1803 }
1804 buildCounterLiveBroadcastListResponse--;
1805 return o;
1806 }
1807
1808 checkLiveBroadcastListResponse(api.LiveBroadcastListResponse o) {
1809 buildCounterLiveBroadcastListResponse++;
1810 if (buildCounterLiveBroadcastListResponse < 3) {
1811 unittest.expect(o.etag, unittest.equals('foo'));
1812 unittest.expect(o.eventId, unittest.equals('foo'));
1813 checkUnnamed357(o.items);
1814 unittest.expect(o.kind, unittest.equals('foo'));
1815 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1816 checkPageInfo(o.pageInfo);
1817 unittest.expect(o.prevPageToken, unittest.equals('foo'));
1818 checkTokenPagination(o.tokenPagination);
1819 unittest.expect(o.visitorId, unittest.equals('foo'));
1820 }
1821 buildCounterLiveBroadcastListResponse--;
1822 }
1823
1824 core.int buildCounterLiveBroadcastSnippet = 0;
1825 buildLiveBroadcastSnippet() {
1826 var o = new api.LiveBroadcastSnippet();
1827 buildCounterLiveBroadcastSnippet++;
1828 if (buildCounterLiveBroadcastSnippet < 3) {
1829 o.actualEndTime = core.DateTime.parse("2002-02-27T14:01:02");
1830 o.actualStartTime = core.DateTime.parse("2002-02-27T14:01:02");
1831 o.channelId = "foo";
1832 o.description = "foo";
1833 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
1834 o.scheduledEndTime = core.DateTime.parse("2002-02-27T14:01:02");
1835 o.scheduledStartTime = core.DateTime.parse("2002-02-27T14:01:02");
1836 o.thumbnails = buildThumbnailDetails();
1837 o.title = "foo";
1838 }
1839 buildCounterLiveBroadcastSnippet--;
1840 return o;
1841 }
1842
1843 checkLiveBroadcastSnippet(api.LiveBroadcastSnippet o) {
1844 buildCounterLiveBroadcastSnippet++;
1845 if (buildCounterLiveBroadcastSnippet < 3) {
1846 unittest.expect(o.actualEndTime, unittest.equals(core.DateTime.parse("2002-0 2-27T14:01:02")));
1847 unittest.expect(o.actualStartTime, unittest.equals(core.DateTime.parse("2002 -02-27T14:01:02")));
1848 unittest.expect(o.channelId, unittest.equals('foo'));
1849 unittest.expect(o.description, unittest.equals('foo'));
1850 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
1851 unittest.expect(o.scheduledEndTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02")));
1852 unittest.expect(o.scheduledStartTime, unittest.equals(core.DateTime.parse("2 002-02-27T14:01:02")));
1853 checkThumbnailDetails(o.thumbnails);
1854 unittest.expect(o.title, unittest.equals('foo'));
1855 }
1856 buildCounterLiveBroadcastSnippet--;
1857 }
1858
1859 core.int buildCounterLiveBroadcastStatus = 0;
1860 buildLiveBroadcastStatus() {
1861 var o = new api.LiveBroadcastStatus();
1862 buildCounterLiveBroadcastStatus++;
1863 if (buildCounterLiveBroadcastStatus < 3) {
1864 o.lifeCycleStatus = "foo";
1865 o.liveBroadcastPriority = "foo";
1866 o.privacyStatus = "foo";
1867 o.recordingStatus = "foo";
1868 }
1869 buildCounterLiveBroadcastStatus--;
1870 return o;
1871 }
1872
1873 checkLiveBroadcastStatus(api.LiveBroadcastStatus o) {
1874 buildCounterLiveBroadcastStatus++;
1875 if (buildCounterLiveBroadcastStatus < 3) {
1876 unittest.expect(o.lifeCycleStatus, unittest.equals('foo'));
1877 unittest.expect(o.liveBroadcastPriority, unittest.equals('foo'));
1878 unittest.expect(o.privacyStatus, unittest.equals('foo'));
1879 unittest.expect(o.recordingStatus, unittest.equals('foo'));
1880 }
1881 buildCounterLiveBroadcastStatus--;
1882 }
1883
1884 core.int buildCounterLiveStream = 0;
1885 buildLiveStream() {
1886 var o = new api.LiveStream();
1887 buildCounterLiveStream++;
1888 if (buildCounterLiveStream < 3) {
1889 o.cdn = buildCdnSettings();
1890 o.contentDetails = buildLiveStreamContentDetails();
1891 o.etag = "foo";
1892 o.id = "foo";
1893 o.kind = "foo";
1894 o.snippet = buildLiveStreamSnippet();
1895 o.status = buildLiveStreamStatus();
1896 }
1897 buildCounterLiveStream--;
1898 return o;
1899 }
1900
1901 checkLiveStream(api.LiveStream o) {
1902 buildCounterLiveStream++;
1903 if (buildCounterLiveStream < 3) {
1904 checkCdnSettings(o.cdn);
1905 checkLiveStreamContentDetails(o.contentDetails);
1906 unittest.expect(o.etag, unittest.equals('foo'));
1907 unittest.expect(o.id, unittest.equals('foo'));
1908 unittest.expect(o.kind, unittest.equals('foo'));
1909 checkLiveStreamSnippet(o.snippet);
1910 checkLiveStreamStatus(o.status);
1911 }
1912 buildCounterLiveStream--;
1913 }
1914
1915 core.int buildCounterLiveStreamContentDetails = 0;
1916 buildLiveStreamContentDetails() {
1917 var o = new api.LiveStreamContentDetails();
1918 buildCounterLiveStreamContentDetails++;
1919 if (buildCounterLiveStreamContentDetails < 3) {
1920 o.closedCaptionsIngestionUrl = "foo";
1921 }
1922 buildCounterLiveStreamContentDetails--;
1923 return o;
1924 }
1925
1926 checkLiveStreamContentDetails(api.LiveStreamContentDetails o) {
1927 buildCounterLiveStreamContentDetails++;
1928 if (buildCounterLiveStreamContentDetails < 3) {
1929 unittest.expect(o.closedCaptionsIngestionUrl, unittest.equals('foo'));
1930 }
1931 buildCounterLiveStreamContentDetails--;
1932 }
1933
1934 buildUnnamed358() {
1935 var o = new core.List<api.LiveStream>();
1936 o.add(buildLiveStream());
1937 o.add(buildLiveStream());
1938 return o;
1939 }
1940
1941 checkUnnamed358(core.List<api.LiveStream> o) {
1942 unittest.expect(o, unittest.hasLength(2));
1943 checkLiveStream(o[0]);
1944 checkLiveStream(o[1]);
1945 }
1946
1947 core.int buildCounterLiveStreamListResponse = 0;
1948 buildLiveStreamListResponse() {
1949 var o = new api.LiveStreamListResponse();
1950 buildCounterLiveStreamListResponse++;
1951 if (buildCounterLiveStreamListResponse < 3) {
1952 o.etag = "foo";
1953 o.eventId = "foo";
1954 o.items = buildUnnamed358();
1955 o.kind = "foo";
1956 o.nextPageToken = "foo";
1957 o.pageInfo = buildPageInfo();
1958 o.prevPageToken = "foo";
1959 o.tokenPagination = buildTokenPagination();
1960 o.visitorId = "foo";
1961 }
1962 buildCounterLiveStreamListResponse--;
1963 return o;
1964 }
1965
1966 checkLiveStreamListResponse(api.LiveStreamListResponse o) {
1967 buildCounterLiveStreamListResponse++;
1968 if (buildCounterLiveStreamListResponse < 3) {
1969 unittest.expect(o.etag, unittest.equals('foo'));
1970 unittest.expect(o.eventId, unittest.equals('foo'));
1971 checkUnnamed358(o.items);
1972 unittest.expect(o.kind, unittest.equals('foo'));
1973 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1974 checkPageInfo(o.pageInfo);
1975 unittest.expect(o.prevPageToken, unittest.equals('foo'));
1976 checkTokenPagination(o.tokenPagination);
1977 unittest.expect(o.visitorId, unittest.equals('foo'));
1978 }
1979 buildCounterLiveStreamListResponse--;
1980 }
1981
1982 core.int buildCounterLiveStreamSnippet = 0;
1983 buildLiveStreamSnippet() {
1984 var o = new api.LiveStreamSnippet();
1985 buildCounterLiveStreamSnippet++;
1986 if (buildCounterLiveStreamSnippet < 3) {
1987 o.channelId = "foo";
1988 o.description = "foo";
1989 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
1990 o.title = "foo";
1991 }
1992 buildCounterLiveStreamSnippet--;
1993 return o;
1994 }
1995
1996 checkLiveStreamSnippet(api.LiveStreamSnippet o) {
1997 buildCounterLiveStreamSnippet++;
1998 if (buildCounterLiveStreamSnippet < 3) {
1999 unittest.expect(o.channelId, unittest.equals('foo'));
2000 unittest.expect(o.description, unittest.equals('foo'));
2001 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
2002 unittest.expect(o.title, unittest.equals('foo'));
2003 }
2004 buildCounterLiveStreamSnippet--;
2005 }
2006
2007 core.int buildCounterLiveStreamStatus = 0;
2008 buildLiveStreamStatus() {
2009 var o = new api.LiveStreamStatus();
2010 buildCounterLiveStreamStatus++;
2011 if (buildCounterLiveStreamStatus < 3) {
2012 o.streamStatus = "foo";
2013 }
2014 buildCounterLiveStreamStatus--;
2015 return o;
2016 }
2017
2018 checkLiveStreamStatus(api.LiveStreamStatus o) {
2019 buildCounterLiveStreamStatus++;
2020 if (buildCounterLiveStreamStatus < 3) {
2021 unittest.expect(o.streamStatus, unittest.equals('foo'));
2022 }
2023 buildCounterLiveStreamStatus--;
2024 }
2025
2026 buildUnnamed359() {
2027 var o = new core.List<api.LocalizedString>();
2028 o.add(buildLocalizedString());
2029 o.add(buildLocalizedString());
2030 return o;
2031 }
2032
2033 checkUnnamed359(core.List<api.LocalizedString> o) {
2034 unittest.expect(o, unittest.hasLength(2));
2035 checkLocalizedString(o[0]);
2036 checkLocalizedString(o[1]);
2037 }
2038
2039 core.int buildCounterLocalizedProperty = 0;
2040 buildLocalizedProperty() {
2041 var o = new api.LocalizedProperty();
2042 buildCounterLocalizedProperty++;
2043 if (buildCounterLocalizedProperty < 3) {
2044 o.default_ = "foo";
2045 o.localized = buildUnnamed359();
2046 }
2047 buildCounterLocalizedProperty--;
2048 return o;
2049 }
2050
2051 checkLocalizedProperty(api.LocalizedProperty o) {
2052 buildCounterLocalizedProperty++;
2053 if (buildCounterLocalizedProperty < 3) {
2054 unittest.expect(o.default_, unittest.equals('foo'));
2055 checkUnnamed359(o.localized);
2056 }
2057 buildCounterLocalizedProperty--;
2058 }
2059
2060 core.int buildCounterLocalizedString = 0;
2061 buildLocalizedString() {
2062 var o = new api.LocalizedString();
2063 buildCounterLocalizedString++;
2064 if (buildCounterLocalizedString < 3) {
2065 o.language = "foo";
2066 o.value = "foo";
2067 }
2068 buildCounterLocalizedString--;
2069 return o;
2070 }
2071
2072 checkLocalizedString(api.LocalizedString o) {
2073 buildCounterLocalizedString++;
2074 if (buildCounterLocalizedString < 3) {
2075 unittest.expect(o.language, unittest.equals('foo'));
2076 unittest.expect(o.value, unittest.equals('foo'));
2077 }
2078 buildCounterLocalizedString--;
2079 }
2080
2081 core.int buildCounterMonitorStreamInfo = 0;
2082 buildMonitorStreamInfo() {
2083 var o = new api.MonitorStreamInfo();
2084 buildCounterMonitorStreamInfo++;
2085 if (buildCounterMonitorStreamInfo < 3) {
2086 o.broadcastStreamDelayMs = 42;
2087 o.embedHtml = "foo";
2088 o.enableMonitorStream = true;
2089 }
2090 buildCounterMonitorStreamInfo--;
2091 return o;
2092 }
2093
2094 checkMonitorStreamInfo(api.MonitorStreamInfo o) {
2095 buildCounterMonitorStreamInfo++;
2096 if (buildCounterMonitorStreamInfo < 3) {
2097 unittest.expect(o.broadcastStreamDelayMs, unittest.equals(42));
2098 unittest.expect(o.embedHtml, unittest.equals('foo'));
2099 unittest.expect(o.enableMonitorStream, unittest.isTrue);
2100 }
2101 buildCounterMonitorStreamInfo--;
2102 }
2103
2104 core.int buildCounterPageInfo = 0;
2105 buildPageInfo() {
2106 var o = new api.PageInfo();
2107 buildCounterPageInfo++;
2108 if (buildCounterPageInfo < 3) {
2109 o.resultsPerPage = 42;
2110 o.totalResults = 42;
2111 }
2112 buildCounterPageInfo--;
2113 return o;
2114 }
2115
2116 checkPageInfo(api.PageInfo o) {
2117 buildCounterPageInfo++;
2118 if (buildCounterPageInfo < 3) {
2119 unittest.expect(o.resultsPerPage, unittest.equals(42));
2120 unittest.expect(o.totalResults, unittest.equals(42));
2121 }
2122 buildCounterPageInfo--;
2123 }
2124
2125 core.int buildCounterPlaylist = 0;
2126 buildPlaylist() {
2127 var o = new api.Playlist();
2128 buildCounterPlaylist++;
2129 if (buildCounterPlaylist < 3) {
2130 o.contentDetails = buildPlaylistContentDetails();
2131 o.etag = "foo";
2132 o.id = "foo";
2133 o.kind = "foo";
2134 o.player = buildPlaylistPlayer();
2135 o.snippet = buildPlaylistSnippet();
2136 o.status = buildPlaylistStatus();
2137 }
2138 buildCounterPlaylist--;
2139 return o;
2140 }
2141
2142 checkPlaylist(api.Playlist o) {
2143 buildCounterPlaylist++;
2144 if (buildCounterPlaylist < 3) {
2145 checkPlaylistContentDetails(o.contentDetails);
2146 unittest.expect(o.etag, unittest.equals('foo'));
2147 unittest.expect(o.id, unittest.equals('foo'));
2148 unittest.expect(o.kind, unittest.equals('foo'));
2149 checkPlaylistPlayer(o.player);
2150 checkPlaylistSnippet(o.snippet);
2151 checkPlaylistStatus(o.status);
2152 }
2153 buildCounterPlaylist--;
2154 }
2155
2156 core.int buildCounterPlaylistContentDetails = 0;
2157 buildPlaylistContentDetails() {
2158 var o = new api.PlaylistContentDetails();
2159 buildCounterPlaylistContentDetails++;
2160 if (buildCounterPlaylistContentDetails < 3) {
2161 o.itemCount = 42;
2162 }
2163 buildCounterPlaylistContentDetails--;
2164 return o;
2165 }
2166
2167 checkPlaylistContentDetails(api.PlaylistContentDetails o) {
2168 buildCounterPlaylistContentDetails++;
2169 if (buildCounterPlaylistContentDetails < 3) {
2170 unittest.expect(o.itemCount, unittest.equals(42));
2171 }
2172 buildCounterPlaylistContentDetails--;
2173 }
2174
2175 core.int buildCounterPlaylistItem = 0;
2176 buildPlaylistItem() {
2177 var o = new api.PlaylistItem();
2178 buildCounterPlaylistItem++;
2179 if (buildCounterPlaylistItem < 3) {
2180 o.contentDetails = buildPlaylistItemContentDetails();
2181 o.etag = "foo";
2182 o.id = "foo";
2183 o.kind = "foo";
2184 o.snippet = buildPlaylistItemSnippet();
2185 o.status = buildPlaylistItemStatus();
2186 }
2187 buildCounterPlaylistItem--;
2188 return o;
2189 }
2190
2191 checkPlaylistItem(api.PlaylistItem o) {
2192 buildCounterPlaylistItem++;
2193 if (buildCounterPlaylistItem < 3) {
2194 checkPlaylistItemContentDetails(o.contentDetails);
2195 unittest.expect(o.etag, unittest.equals('foo'));
2196 unittest.expect(o.id, unittest.equals('foo'));
2197 unittest.expect(o.kind, unittest.equals('foo'));
2198 checkPlaylistItemSnippet(o.snippet);
2199 checkPlaylistItemStatus(o.status);
2200 }
2201 buildCounterPlaylistItem--;
2202 }
2203
2204 core.int buildCounterPlaylistItemContentDetails = 0;
2205 buildPlaylistItemContentDetails() {
2206 var o = new api.PlaylistItemContentDetails();
2207 buildCounterPlaylistItemContentDetails++;
2208 if (buildCounterPlaylistItemContentDetails < 3) {
2209 o.endAt = "foo";
2210 o.note = "foo";
2211 o.startAt = "foo";
2212 o.videoId = "foo";
2213 }
2214 buildCounterPlaylistItemContentDetails--;
2215 return o;
2216 }
2217
2218 checkPlaylistItemContentDetails(api.PlaylistItemContentDetails o) {
2219 buildCounterPlaylistItemContentDetails++;
2220 if (buildCounterPlaylistItemContentDetails < 3) {
2221 unittest.expect(o.endAt, unittest.equals('foo'));
2222 unittest.expect(o.note, unittest.equals('foo'));
2223 unittest.expect(o.startAt, unittest.equals('foo'));
2224 unittest.expect(o.videoId, unittest.equals('foo'));
2225 }
2226 buildCounterPlaylistItemContentDetails--;
2227 }
2228
2229 buildUnnamed360() {
2230 var o = new core.List<api.PlaylistItem>();
2231 o.add(buildPlaylistItem());
2232 o.add(buildPlaylistItem());
2233 return o;
2234 }
2235
2236 checkUnnamed360(core.List<api.PlaylistItem> o) {
2237 unittest.expect(o, unittest.hasLength(2));
2238 checkPlaylistItem(o[0]);
2239 checkPlaylistItem(o[1]);
2240 }
2241
2242 core.int buildCounterPlaylistItemListResponse = 0;
2243 buildPlaylistItemListResponse() {
2244 var o = new api.PlaylistItemListResponse();
2245 buildCounterPlaylistItemListResponse++;
2246 if (buildCounterPlaylistItemListResponse < 3) {
2247 o.etag = "foo";
2248 o.eventId = "foo";
2249 o.items = buildUnnamed360();
2250 o.kind = "foo";
2251 o.nextPageToken = "foo";
2252 o.pageInfo = buildPageInfo();
2253 o.prevPageToken = "foo";
2254 o.tokenPagination = buildTokenPagination();
2255 o.visitorId = "foo";
2256 }
2257 buildCounterPlaylistItemListResponse--;
2258 return o;
2259 }
2260
2261 checkPlaylistItemListResponse(api.PlaylistItemListResponse o) {
2262 buildCounterPlaylistItemListResponse++;
2263 if (buildCounterPlaylistItemListResponse < 3) {
2264 unittest.expect(o.etag, unittest.equals('foo'));
2265 unittest.expect(o.eventId, unittest.equals('foo'));
2266 checkUnnamed360(o.items);
2267 unittest.expect(o.kind, unittest.equals('foo'));
2268 unittest.expect(o.nextPageToken, unittest.equals('foo'));
2269 checkPageInfo(o.pageInfo);
2270 unittest.expect(o.prevPageToken, unittest.equals('foo'));
2271 checkTokenPagination(o.tokenPagination);
2272 unittest.expect(o.visitorId, unittest.equals('foo'));
2273 }
2274 buildCounterPlaylistItemListResponse--;
2275 }
2276
2277 core.int buildCounterPlaylistItemSnippet = 0;
2278 buildPlaylistItemSnippet() {
2279 var o = new api.PlaylistItemSnippet();
2280 buildCounterPlaylistItemSnippet++;
2281 if (buildCounterPlaylistItemSnippet < 3) {
2282 o.channelId = "foo";
2283 o.channelTitle = "foo";
2284 o.description = "foo";
2285 o.playlistId = "foo";
2286 o.position = 42;
2287 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
2288 o.resourceId = buildResourceId();
2289 o.thumbnails = buildThumbnailDetails();
2290 o.title = "foo";
2291 }
2292 buildCounterPlaylistItemSnippet--;
2293 return o;
2294 }
2295
2296 checkPlaylistItemSnippet(api.PlaylistItemSnippet o) {
2297 buildCounterPlaylistItemSnippet++;
2298 if (buildCounterPlaylistItemSnippet < 3) {
2299 unittest.expect(o.channelId, unittest.equals('foo'));
2300 unittest.expect(o.channelTitle, unittest.equals('foo'));
2301 unittest.expect(o.description, unittest.equals('foo'));
2302 unittest.expect(o.playlistId, unittest.equals('foo'));
2303 unittest.expect(o.position, unittest.equals(42));
2304 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
2305 checkResourceId(o.resourceId);
2306 checkThumbnailDetails(o.thumbnails);
2307 unittest.expect(o.title, unittest.equals('foo'));
2308 }
2309 buildCounterPlaylistItemSnippet--;
2310 }
2311
2312 core.int buildCounterPlaylistItemStatus = 0;
2313 buildPlaylistItemStatus() {
2314 var o = new api.PlaylistItemStatus();
2315 buildCounterPlaylistItemStatus++;
2316 if (buildCounterPlaylistItemStatus < 3) {
2317 o.privacyStatus = "foo";
2318 }
2319 buildCounterPlaylistItemStatus--;
2320 return o;
2321 }
2322
2323 checkPlaylistItemStatus(api.PlaylistItemStatus o) {
2324 buildCounterPlaylistItemStatus++;
2325 if (buildCounterPlaylistItemStatus < 3) {
2326 unittest.expect(o.privacyStatus, unittest.equals('foo'));
2327 }
2328 buildCounterPlaylistItemStatus--;
2329 }
2330
2331 buildUnnamed361() {
2332 var o = new core.List<api.Playlist>();
2333 o.add(buildPlaylist());
2334 o.add(buildPlaylist());
2335 return o;
2336 }
2337
2338 checkUnnamed361(core.List<api.Playlist> o) {
2339 unittest.expect(o, unittest.hasLength(2));
2340 checkPlaylist(o[0]);
2341 checkPlaylist(o[1]);
2342 }
2343
2344 core.int buildCounterPlaylistListResponse = 0;
2345 buildPlaylistListResponse() {
2346 var o = new api.PlaylistListResponse();
2347 buildCounterPlaylistListResponse++;
2348 if (buildCounterPlaylistListResponse < 3) {
2349 o.etag = "foo";
2350 o.eventId = "foo";
2351 o.items = buildUnnamed361();
2352 o.kind = "foo";
2353 o.nextPageToken = "foo";
2354 o.pageInfo = buildPageInfo();
2355 o.prevPageToken = "foo";
2356 o.tokenPagination = buildTokenPagination();
2357 o.visitorId = "foo";
2358 }
2359 buildCounterPlaylistListResponse--;
2360 return o;
2361 }
2362
2363 checkPlaylistListResponse(api.PlaylistListResponse o) {
2364 buildCounterPlaylistListResponse++;
2365 if (buildCounterPlaylistListResponse < 3) {
2366 unittest.expect(o.etag, unittest.equals('foo'));
2367 unittest.expect(o.eventId, unittest.equals('foo'));
2368 checkUnnamed361(o.items);
2369 unittest.expect(o.kind, unittest.equals('foo'));
2370 unittest.expect(o.nextPageToken, unittest.equals('foo'));
2371 checkPageInfo(o.pageInfo);
2372 unittest.expect(o.prevPageToken, unittest.equals('foo'));
2373 checkTokenPagination(o.tokenPagination);
2374 unittest.expect(o.visitorId, unittest.equals('foo'));
2375 }
2376 buildCounterPlaylistListResponse--;
2377 }
2378
2379 core.int buildCounterPlaylistPlayer = 0;
2380 buildPlaylistPlayer() {
2381 var o = new api.PlaylistPlayer();
2382 buildCounterPlaylistPlayer++;
2383 if (buildCounterPlaylistPlayer < 3) {
2384 o.embedHtml = "foo";
2385 }
2386 buildCounterPlaylistPlayer--;
2387 return o;
2388 }
2389
2390 checkPlaylistPlayer(api.PlaylistPlayer o) {
2391 buildCounterPlaylistPlayer++;
2392 if (buildCounterPlaylistPlayer < 3) {
2393 unittest.expect(o.embedHtml, unittest.equals('foo'));
2394 }
2395 buildCounterPlaylistPlayer--;
2396 }
2397
2398 buildUnnamed362() {
2399 var o = new core.List<core.String>();
2400 o.add("foo");
2401 o.add("foo");
2402 return o;
2403 }
2404
2405 checkUnnamed362(core.List<core.String> o) {
2406 unittest.expect(o, unittest.hasLength(2));
2407 unittest.expect(o[0], unittest.equals('foo'));
2408 unittest.expect(o[1], unittest.equals('foo'));
2409 }
2410
2411 core.int buildCounterPlaylistSnippet = 0;
2412 buildPlaylistSnippet() {
2413 var o = new api.PlaylistSnippet();
2414 buildCounterPlaylistSnippet++;
2415 if (buildCounterPlaylistSnippet < 3) {
2416 o.channelId = "foo";
2417 o.channelTitle = "foo";
2418 o.description = "foo";
2419 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
2420 o.tags = buildUnnamed362();
2421 o.thumbnails = buildThumbnailDetails();
2422 o.title = "foo";
2423 }
2424 buildCounterPlaylistSnippet--;
2425 return o;
2426 }
2427
2428 checkPlaylistSnippet(api.PlaylistSnippet o) {
2429 buildCounterPlaylistSnippet++;
2430 if (buildCounterPlaylistSnippet < 3) {
2431 unittest.expect(o.channelId, unittest.equals('foo'));
2432 unittest.expect(o.channelTitle, unittest.equals('foo'));
2433 unittest.expect(o.description, unittest.equals('foo'));
2434 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
2435 checkUnnamed362(o.tags);
2436 checkThumbnailDetails(o.thumbnails);
2437 unittest.expect(o.title, unittest.equals('foo'));
2438 }
2439 buildCounterPlaylistSnippet--;
2440 }
2441
2442 core.int buildCounterPlaylistStatus = 0;
2443 buildPlaylistStatus() {
2444 var o = new api.PlaylistStatus();
2445 buildCounterPlaylistStatus++;
2446 if (buildCounterPlaylistStatus < 3) {
2447 o.privacyStatus = "foo";
2448 }
2449 buildCounterPlaylistStatus--;
2450 return o;
2451 }
2452
2453 checkPlaylistStatus(api.PlaylistStatus o) {
2454 buildCounterPlaylistStatus++;
2455 if (buildCounterPlaylistStatus < 3) {
2456 unittest.expect(o.privacyStatus, unittest.equals('foo'));
2457 }
2458 buildCounterPlaylistStatus--;
2459 }
2460
2461 core.int buildCounterPromotedItem = 0;
2462 buildPromotedItem() {
2463 var o = new api.PromotedItem();
2464 buildCounterPromotedItem++;
2465 if (buildCounterPromotedItem < 3) {
2466 o.customMessage = "foo";
2467 o.id = buildPromotedItemId();
2468 o.promotedByContentOwner = true;
2469 o.timing = buildInvideoTiming();
2470 }
2471 buildCounterPromotedItem--;
2472 return o;
2473 }
2474
2475 checkPromotedItem(api.PromotedItem o) {
2476 buildCounterPromotedItem++;
2477 if (buildCounterPromotedItem < 3) {
2478 unittest.expect(o.customMessage, unittest.equals('foo'));
2479 checkPromotedItemId(o.id);
2480 unittest.expect(o.promotedByContentOwner, unittest.isTrue);
2481 checkInvideoTiming(o.timing);
2482 }
2483 buildCounterPromotedItem--;
2484 }
2485
2486 core.int buildCounterPromotedItemId = 0;
2487 buildPromotedItemId() {
2488 var o = new api.PromotedItemId();
2489 buildCounterPromotedItemId++;
2490 if (buildCounterPromotedItemId < 3) {
2491 o.recentlyUploadedBy = "foo";
2492 o.type = "foo";
2493 o.videoId = "foo";
2494 o.websiteUrl = "foo";
2495 }
2496 buildCounterPromotedItemId--;
2497 return o;
2498 }
2499
2500 checkPromotedItemId(api.PromotedItemId o) {
2501 buildCounterPromotedItemId++;
2502 if (buildCounterPromotedItemId < 3) {
2503 unittest.expect(o.recentlyUploadedBy, unittest.equals('foo'));
2504 unittest.expect(o.type, unittest.equals('foo'));
2505 unittest.expect(o.videoId, unittest.equals('foo'));
2506 unittest.expect(o.websiteUrl, unittest.equals('foo'));
2507 }
2508 buildCounterPromotedItemId--;
2509 }
2510
2511 core.int buildCounterPropertyValue = 0;
2512 buildPropertyValue() {
2513 var o = new api.PropertyValue();
2514 buildCounterPropertyValue++;
2515 if (buildCounterPropertyValue < 3) {
2516 o.property = "foo";
2517 o.value = "foo";
2518 }
2519 buildCounterPropertyValue--;
2520 return o;
2521 }
2522
2523 checkPropertyValue(api.PropertyValue o) {
2524 buildCounterPropertyValue++;
2525 if (buildCounterPropertyValue < 3) {
2526 unittest.expect(o.property, unittest.equals('foo'));
2527 unittest.expect(o.value, unittest.equals('foo'));
2528 }
2529 buildCounterPropertyValue--;
2530 }
2531
2532 core.int buildCounterResourceId = 0;
2533 buildResourceId() {
2534 var o = new api.ResourceId();
2535 buildCounterResourceId++;
2536 if (buildCounterResourceId < 3) {
2537 o.channelId = "foo";
2538 o.kind = "foo";
2539 o.playlistId = "foo";
2540 o.videoId = "foo";
2541 }
2542 buildCounterResourceId--;
2543 return o;
2544 }
2545
2546 checkResourceId(api.ResourceId o) {
2547 buildCounterResourceId++;
2548 if (buildCounterResourceId < 3) {
2549 unittest.expect(o.channelId, unittest.equals('foo'));
2550 unittest.expect(o.kind, unittest.equals('foo'));
2551 unittest.expect(o.playlistId, unittest.equals('foo'));
2552 unittest.expect(o.videoId, unittest.equals('foo'));
2553 }
2554 buildCounterResourceId--;
2555 }
2556
2557 buildUnnamed363() {
2558 var o = new core.List<api.SearchResult>();
2559 o.add(buildSearchResult());
2560 o.add(buildSearchResult());
2561 return o;
2562 }
2563
2564 checkUnnamed363(core.List<api.SearchResult> o) {
2565 unittest.expect(o, unittest.hasLength(2));
2566 checkSearchResult(o[0]);
2567 checkSearchResult(o[1]);
2568 }
2569
2570 core.int buildCounterSearchListResponse = 0;
2571 buildSearchListResponse() {
2572 var o = new api.SearchListResponse();
2573 buildCounterSearchListResponse++;
2574 if (buildCounterSearchListResponse < 3) {
2575 o.etag = "foo";
2576 o.eventId = "foo";
2577 o.items = buildUnnamed363();
2578 o.kind = "foo";
2579 o.nextPageToken = "foo";
2580 o.pageInfo = buildPageInfo();
2581 o.prevPageToken = "foo";
2582 o.tokenPagination = buildTokenPagination();
2583 o.visitorId = "foo";
2584 }
2585 buildCounterSearchListResponse--;
2586 return o;
2587 }
2588
2589 checkSearchListResponse(api.SearchListResponse o) {
2590 buildCounterSearchListResponse++;
2591 if (buildCounterSearchListResponse < 3) {
2592 unittest.expect(o.etag, unittest.equals('foo'));
2593 unittest.expect(o.eventId, unittest.equals('foo'));
2594 checkUnnamed363(o.items);
2595 unittest.expect(o.kind, unittest.equals('foo'));
2596 unittest.expect(o.nextPageToken, unittest.equals('foo'));
2597 checkPageInfo(o.pageInfo);
2598 unittest.expect(o.prevPageToken, unittest.equals('foo'));
2599 checkTokenPagination(o.tokenPagination);
2600 unittest.expect(o.visitorId, unittest.equals('foo'));
2601 }
2602 buildCounterSearchListResponse--;
2603 }
2604
2605 core.int buildCounterSearchResult = 0;
2606 buildSearchResult() {
2607 var o = new api.SearchResult();
2608 buildCounterSearchResult++;
2609 if (buildCounterSearchResult < 3) {
2610 o.etag = "foo";
2611 o.id = buildResourceId();
2612 o.kind = "foo";
2613 o.snippet = buildSearchResultSnippet();
2614 }
2615 buildCounterSearchResult--;
2616 return o;
2617 }
2618
2619 checkSearchResult(api.SearchResult o) {
2620 buildCounterSearchResult++;
2621 if (buildCounterSearchResult < 3) {
2622 unittest.expect(o.etag, unittest.equals('foo'));
2623 checkResourceId(o.id);
2624 unittest.expect(o.kind, unittest.equals('foo'));
2625 checkSearchResultSnippet(o.snippet);
2626 }
2627 buildCounterSearchResult--;
2628 }
2629
2630 core.int buildCounterSearchResultSnippet = 0;
2631 buildSearchResultSnippet() {
2632 var o = new api.SearchResultSnippet();
2633 buildCounterSearchResultSnippet++;
2634 if (buildCounterSearchResultSnippet < 3) {
2635 o.channelId = "foo";
2636 o.channelTitle = "foo";
2637 o.description = "foo";
2638 o.liveBroadcastContent = "foo";
2639 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
2640 o.thumbnails = buildThumbnailDetails();
2641 o.title = "foo";
2642 }
2643 buildCounterSearchResultSnippet--;
2644 return o;
2645 }
2646
2647 checkSearchResultSnippet(api.SearchResultSnippet o) {
2648 buildCounterSearchResultSnippet++;
2649 if (buildCounterSearchResultSnippet < 3) {
2650 unittest.expect(o.channelId, unittest.equals('foo'));
2651 unittest.expect(o.channelTitle, unittest.equals('foo'));
2652 unittest.expect(o.description, unittest.equals('foo'));
2653 unittest.expect(o.liveBroadcastContent, unittest.equals('foo'));
2654 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
2655 checkThumbnailDetails(o.thumbnails);
2656 unittest.expect(o.title, unittest.equals('foo'));
2657 }
2658 buildCounterSearchResultSnippet--;
2659 }
2660
2661 core.int buildCounterSubscription = 0;
2662 buildSubscription() {
2663 var o = new api.Subscription();
2664 buildCounterSubscription++;
2665 if (buildCounterSubscription < 3) {
2666 o.contentDetails = buildSubscriptionContentDetails();
2667 o.etag = "foo";
2668 o.id = "foo";
2669 o.kind = "foo";
2670 o.snippet = buildSubscriptionSnippet();
2671 o.subscriberSnippet = buildSubscriptionSubscriberSnippet();
2672 }
2673 buildCounterSubscription--;
2674 return o;
2675 }
2676
2677 checkSubscription(api.Subscription o) {
2678 buildCounterSubscription++;
2679 if (buildCounterSubscription < 3) {
2680 checkSubscriptionContentDetails(o.contentDetails);
2681 unittest.expect(o.etag, unittest.equals('foo'));
2682 unittest.expect(o.id, unittest.equals('foo'));
2683 unittest.expect(o.kind, unittest.equals('foo'));
2684 checkSubscriptionSnippet(o.snippet);
2685 checkSubscriptionSubscriberSnippet(o.subscriberSnippet);
2686 }
2687 buildCounterSubscription--;
2688 }
2689
2690 core.int buildCounterSubscriptionContentDetails = 0;
2691 buildSubscriptionContentDetails() {
2692 var o = new api.SubscriptionContentDetails();
2693 buildCounterSubscriptionContentDetails++;
2694 if (buildCounterSubscriptionContentDetails < 3) {
2695 o.activityType = "foo";
2696 o.newItemCount = 42;
2697 o.totalItemCount = 42;
2698 }
2699 buildCounterSubscriptionContentDetails--;
2700 return o;
2701 }
2702
2703 checkSubscriptionContentDetails(api.SubscriptionContentDetails o) {
2704 buildCounterSubscriptionContentDetails++;
2705 if (buildCounterSubscriptionContentDetails < 3) {
2706 unittest.expect(o.activityType, unittest.equals('foo'));
2707 unittest.expect(o.newItemCount, unittest.equals(42));
2708 unittest.expect(o.totalItemCount, unittest.equals(42));
2709 }
2710 buildCounterSubscriptionContentDetails--;
2711 }
2712
2713 buildUnnamed364() {
2714 var o = new core.List<api.Subscription>();
2715 o.add(buildSubscription());
2716 o.add(buildSubscription());
2717 return o;
2718 }
2719
2720 checkUnnamed364(core.List<api.Subscription> o) {
2721 unittest.expect(o, unittest.hasLength(2));
2722 checkSubscription(o[0]);
2723 checkSubscription(o[1]);
2724 }
2725
2726 core.int buildCounterSubscriptionListResponse = 0;
2727 buildSubscriptionListResponse() {
2728 var o = new api.SubscriptionListResponse();
2729 buildCounterSubscriptionListResponse++;
2730 if (buildCounterSubscriptionListResponse < 3) {
2731 o.etag = "foo";
2732 o.eventId = "foo";
2733 o.items = buildUnnamed364();
2734 o.kind = "foo";
2735 o.nextPageToken = "foo";
2736 o.pageInfo = buildPageInfo();
2737 o.prevPageToken = "foo";
2738 o.tokenPagination = buildTokenPagination();
2739 o.visitorId = "foo";
2740 }
2741 buildCounterSubscriptionListResponse--;
2742 return o;
2743 }
2744
2745 checkSubscriptionListResponse(api.SubscriptionListResponse o) {
2746 buildCounterSubscriptionListResponse++;
2747 if (buildCounterSubscriptionListResponse < 3) {
2748 unittest.expect(o.etag, unittest.equals('foo'));
2749 unittest.expect(o.eventId, unittest.equals('foo'));
2750 checkUnnamed364(o.items);
2751 unittest.expect(o.kind, unittest.equals('foo'));
2752 unittest.expect(o.nextPageToken, unittest.equals('foo'));
2753 checkPageInfo(o.pageInfo);
2754 unittest.expect(o.prevPageToken, unittest.equals('foo'));
2755 checkTokenPagination(o.tokenPagination);
2756 unittest.expect(o.visitorId, unittest.equals('foo'));
2757 }
2758 buildCounterSubscriptionListResponse--;
2759 }
2760
2761 core.int buildCounterSubscriptionSnippet = 0;
2762 buildSubscriptionSnippet() {
2763 var o = new api.SubscriptionSnippet();
2764 buildCounterSubscriptionSnippet++;
2765 if (buildCounterSubscriptionSnippet < 3) {
2766 o.channelId = "foo";
2767 o.channelTitle = "foo";
2768 o.description = "foo";
2769 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
2770 o.resourceId = buildResourceId();
2771 o.thumbnails = buildThumbnailDetails();
2772 o.title = "foo";
2773 }
2774 buildCounterSubscriptionSnippet--;
2775 return o;
2776 }
2777
2778 checkSubscriptionSnippet(api.SubscriptionSnippet o) {
2779 buildCounterSubscriptionSnippet++;
2780 if (buildCounterSubscriptionSnippet < 3) {
2781 unittest.expect(o.channelId, unittest.equals('foo'));
2782 unittest.expect(o.channelTitle, unittest.equals('foo'));
2783 unittest.expect(o.description, unittest.equals('foo'));
2784 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
2785 checkResourceId(o.resourceId);
2786 checkThumbnailDetails(o.thumbnails);
2787 unittest.expect(o.title, unittest.equals('foo'));
2788 }
2789 buildCounterSubscriptionSnippet--;
2790 }
2791
2792 core.int buildCounterSubscriptionSubscriberSnippet = 0;
2793 buildSubscriptionSubscriberSnippet() {
2794 var o = new api.SubscriptionSubscriberSnippet();
2795 buildCounterSubscriptionSubscriberSnippet++;
2796 if (buildCounterSubscriptionSubscriberSnippet < 3) {
2797 o.channelId = "foo";
2798 o.description = "foo";
2799 o.thumbnails = buildThumbnailDetails();
2800 o.title = "foo";
2801 }
2802 buildCounterSubscriptionSubscriberSnippet--;
2803 return o;
2804 }
2805
2806 checkSubscriptionSubscriberSnippet(api.SubscriptionSubscriberSnippet o) {
2807 buildCounterSubscriptionSubscriberSnippet++;
2808 if (buildCounterSubscriptionSubscriberSnippet < 3) {
2809 unittest.expect(o.channelId, unittest.equals('foo'));
2810 unittest.expect(o.description, unittest.equals('foo'));
2811 checkThumbnailDetails(o.thumbnails);
2812 unittest.expect(o.title, unittest.equals('foo'));
2813 }
2814 buildCounterSubscriptionSubscriberSnippet--;
2815 }
2816
2817 core.int buildCounterThumbnail = 0;
2818 buildThumbnail() {
2819 var o = new api.Thumbnail();
2820 buildCounterThumbnail++;
2821 if (buildCounterThumbnail < 3) {
2822 o.height = 42;
2823 o.url = "foo";
2824 o.width = 42;
2825 }
2826 buildCounterThumbnail--;
2827 return o;
2828 }
2829
2830 checkThumbnail(api.Thumbnail o) {
2831 buildCounterThumbnail++;
2832 if (buildCounterThumbnail < 3) {
2833 unittest.expect(o.height, unittest.equals(42));
2834 unittest.expect(o.url, unittest.equals('foo'));
2835 unittest.expect(o.width, unittest.equals(42));
2836 }
2837 buildCounterThumbnail--;
2838 }
2839
2840 core.int buildCounterThumbnailDetails = 0;
2841 buildThumbnailDetails() {
2842 var o = new api.ThumbnailDetails();
2843 buildCounterThumbnailDetails++;
2844 if (buildCounterThumbnailDetails < 3) {
2845 o.default_ = buildThumbnail();
2846 o.high = buildThumbnail();
2847 o.maxres = buildThumbnail();
2848 o.medium = buildThumbnail();
2849 o.standard = buildThumbnail();
2850 }
2851 buildCounterThumbnailDetails--;
2852 return o;
2853 }
2854
2855 checkThumbnailDetails(api.ThumbnailDetails o) {
2856 buildCounterThumbnailDetails++;
2857 if (buildCounterThumbnailDetails < 3) {
2858 checkThumbnail(o.default_);
2859 checkThumbnail(o.high);
2860 checkThumbnail(o.maxres);
2861 checkThumbnail(o.medium);
2862 checkThumbnail(o.standard);
2863 }
2864 buildCounterThumbnailDetails--;
2865 }
2866
2867 buildUnnamed365() {
2868 var o = new core.List<api.ThumbnailDetails>();
2869 o.add(buildThumbnailDetails());
2870 o.add(buildThumbnailDetails());
2871 return o;
2872 }
2873
2874 checkUnnamed365(core.List<api.ThumbnailDetails> o) {
2875 unittest.expect(o, unittest.hasLength(2));
2876 checkThumbnailDetails(o[0]);
2877 checkThumbnailDetails(o[1]);
2878 }
2879
2880 core.int buildCounterThumbnailSetResponse = 0;
2881 buildThumbnailSetResponse() {
2882 var o = new api.ThumbnailSetResponse();
2883 buildCounterThumbnailSetResponse++;
2884 if (buildCounterThumbnailSetResponse < 3) {
2885 o.etag = "foo";
2886 o.eventId = "foo";
2887 o.items = buildUnnamed365();
2888 o.kind = "foo";
2889 o.visitorId = "foo";
2890 }
2891 buildCounterThumbnailSetResponse--;
2892 return o;
2893 }
2894
2895 checkThumbnailSetResponse(api.ThumbnailSetResponse o) {
2896 buildCounterThumbnailSetResponse++;
2897 if (buildCounterThumbnailSetResponse < 3) {
2898 unittest.expect(o.etag, unittest.equals('foo'));
2899 unittest.expect(o.eventId, unittest.equals('foo'));
2900 checkUnnamed365(o.items);
2901 unittest.expect(o.kind, unittest.equals('foo'));
2902 unittest.expect(o.visitorId, unittest.equals('foo'));
2903 }
2904 buildCounterThumbnailSetResponse--;
2905 }
2906
2907 core.int buildCounterTokenPagination = 0;
2908 buildTokenPagination() {
2909 var o = new api.TokenPagination();
2910 buildCounterTokenPagination++;
2911 if (buildCounterTokenPagination < 3) {
2912 }
2913 buildCounterTokenPagination--;
2914 return o;
2915 }
2916
2917 checkTokenPagination(api.TokenPagination o) {
2918 buildCounterTokenPagination++;
2919 if (buildCounterTokenPagination < 3) {
2920 }
2921 buildCounterTokenPagination--;
2922 }
2923
2924 core.int buildCounterVideo = 0;
2925 buildVideo() {
2926 var o = new api.Video();
2927 buildCounterVideo++;
2928 if (buildCounterVideo < 3) {
2929 o.ageGating = buildVideoAgeGating();
2930 o.contentDetails = buildVideoContentDetails();
2931 o.conversionPings = buildVideoConversionPings();
2932 o.etag = "foo";
2933 o.fileDetails = buildVideoFileDetails();
2934 o.id = "foo";
2935 o.kind = "foo";
2936 o.liveStreamingDetails = buildVideoLiveStreamingDetails();
2937 o.monetizationDetails = buildVideoMonetizationDetails();
2938 o.player = buildVideoPlayer();
2939 o.processingDetails = buildVideoProcessingDetails();
2940 o.projectDetails = buildVideoProjectDetails();
2941 o.recordingDetails = buildVideoRecordingDetails();
2942 o.snippet = buildVideoSnippet();
2943 o.statistics = buildVideoStatistics();
2944 o.status = buildVideoStatus();
2945 o.suggestions = buildVideoSuggestions();
2946 o.topicDetails = buildVideoTopicDetails();
2947 }
2948 buildCounterVideo--;
2949 return o;
2950 }
2951
2952 checkVideo(api.Video o) {
2953 buildCounterVideo++;
2954 if (buildCounterVideo < 3) {
2955 checkVideoAgeGating(o.ageGating);
2956 checkVideoContentDetails(o.contentDetails);
2957 checkVideoConversionPings(o.conversionPings);
2958 unittest.expect(o.etag, unittest.equals('foo'));
2959 checkVideoFileDetails(o.fileDetails);
2960 unittest.expect(o.id, unittest.equals('foo'));
2961 unittest.expect(o.kind, unittest.equals('foo'));
2962 checkVideoLiveStreamingDetails(o.liveStreamingDetails);
2963 checkVideoMonetizationDetails(o.monetizationDetails);
2964 checkVideoPlayer(o.player);
2965 checkVideoProcessingDetails(o.processingDetails);
2966 checkVideoProjectDetails(o.projectDetails);
2967 checkVideoRecordingDetails(o.recordingDetails);
2968 checkVideoSnippet(o.snippet);
2969 checkVideoStatistics(o.statistics);
2970 checkVideoStatus(o.status);
2971 checkVideoSuggestions(o.suggestions);
2972 checkVideoTopicDetails(o.topicDetails);
2973 }
2974 buildCounterVideo--;
2975 }
2976
2977 core.int buildCounterVideoAgeGating = 0;
2978 buildVideoAgeGating() {
2979 var o = new api.VideoAgeGating();
2980 buildCounterVideoAgeGating++;
2981 if (buildCounterVideoAgeGating < 3) {
2982 o.alcoholContent = true;
2983 o.restricted = true;
2984 o.videoGameRating = "foo";
2985 }
2986 buildCounterVideoAgeGating--;
2987 return o;
2988 }
2989
2990 checkVideoAgeGating(api.VideoAgeGating o) {
2991 buildCounterVideoAgeGating++;
2992 if (buildCounterVideoAgeGating < 3) {
2993 unittest.expect(o.alcoholContent, unittest.isTrue);
2994 unittest.expect(o.restricted, unittest.isTrue);
2995 unittest.expect(o.videoGameRating, unittest.equals('foo'));
2996 }
2997 buildCounterVideoAgeGating--;
2998 }
2999
3000 core.int buildCounterVideoCategory = 0;
3001 buildVideoCategory() {
3002 var o = new api.VideoCategory();
3003 buildCounterVideoCategory++;
3004 if (buildCounterVideoCategory < 3) {
3005 o.etag = "foo";
3006 o.id = "foo";
3007 o.kind = "foo";
3008 o.snippet = buildVideoCategorySnippet();
3009 }
3010 buildCounterVideoCategory--;
3011 return o;
3012 }
3013
3014 checkVideoCategory(api.VideoCategory o) {
3015 buildCounterVideoCategory++;
3016 if (buildCounterVideoCategory < 3) {
3017 unittest.expect(o.etag, unittest.equals('foo'));
3018 unittest.expect(o.id, unittest.equals('foo'));
3019 unittest.expect(o.kind, unittest.equals('foo'));
3020 checkVideoCategorySnippet(o.snippet);
3021 }
3022 buildCounterVideoCategory--;
3023 }
3024
3025 buildUnnamed366() {
3026 var o = new core.List<api.VideoCategory>();
3027 o.add(buildVideoCategory());
3028 o.add(buildVideoCategory());
3029 return o;
3030 }
3031
3032 checkUnnamed366(core.List<api.VideoCategory> o) {
3033 unittest.expect(o, unittest.hasLength(2));
3034 checkVideoCategory(o[0]);
3035 checkVideoCategory(o[1]);
3036 }
3037
3038 core.int buildCounterVideoCategoryListResponse = 0;
3039 buildVideoCategoryListResponse() {
3040 var o = new api.VideoCategoryListResponse();
3041 buildCounterVideoCategoryListResponse++;
3042 if (buildCounterVideoCategoryListResponse < 3) {
3043 o.etag = "foo";
3044 o.eventId = "foo";
3045 o.items = buildUnnamed366();
3046 o.kind = "foo";
3047 o.nextPageToken = "foo";
3048 o.pageInfo = buildPageInfo();
3049 o.prevPageToken = "foo";
3050 o.tokenPagination = buildTokenPagination();
3051 o.visitorId = "foo";
3052 }
3053 buildCounterVideoCategoryListResponse--;
3054 return o;
3055 }
3056
3057 checkVideoCategoryListResponse(api.VideoCategoryListResponse o) {
3058 buildCounterVideoCategoryListResponse++;
3059 if (buildCounterVideoCategoryListResponse < 3) {
3060 unittest.expect(o.etag, unittest.equals('foo'));
3061 unittest.expect(o.eventId, unittest.equals('foo'));
3062 checkUnnamed366(o.items);
3063 unittest.expect(o.kind, unittest.equals('foo'));
3064 unittest.expect(o.nextPageToken, unittest.equals('foo'));
3065 checkPageInfo(o.pageInfo);
3066 unittest.expect(o.prevPageToken, unittest.equals('foo'));
3067 checkTokenPagination(o.tokenPagination);
3068 unittest.expect(o.visitorId, unittest.equals('foo'));
3069 }
3070 buildCounterVideoCategoryListResponse--;
3071 }
3072
3073 core.int buildCounterVideoCategorySnippet = 0;
3074 buildVideoCategorySnippet() {
3075 var o = new api.VideoCategorySnippet();
3076 buildCounterVideoCategorySnippet++;
3077 if (buildCounterVideoCategorySnippet < 3) {
3078 o.assignable = true;
3079 o.channelId = "foo";
3080 o.title = "foo";
3081 }
3082 buildCounterVideoCategorySnippet--;
3083 return o;
3084 }
3085
3086 checkVideoCategorySnippet(api.VideoCategorySnippet o) {
3087 buildCounterVideoCategorySnippet++;
3088 if (buildCounterVideoCategorySnippet < 3) {
3089 unittest.expect(o.assignable, unittest.isTrue);
3090 unittest.expect(o.channelId, unittest.equals('foo'));
3091 unittest.expect(o.title, unittest.equals('foo'));
3092 }
3093 buildCounterVideoCategorySnippet--;
3094 }
3095
3096 core.int buildCounterVideoContentDetails = 0;
3097 buildVideoContentDetails() {
3098 var o = new api.VideoContentDetails();
3099 buildCounterVideoContentDetails++;
3100 if (buildCounterVideoContentDetails < 3) {
3101 o.caption = "foo";
3102 o.contentRating = buildContentRating();
3103 o.countryRestriction = buildAccessPolicy();
3104 o.definition = "foo";
3105 o.dimension = "foo";
3106 o.duration = "foo";
3107 o.licensedContent = true;
3108 o.regionRestriction = buildVideoContentDetailsRegionRestriction();
3109 }
3110 buildCounterVideoContentDetails--;
3111 return o;
3112 }
3113
3114 checkVideoContentDetails(api.VideoContentDetails o) {
3115 buildCounterVideoContentDetails++;
3116 if (buildCounterVideoContentDetails < 3) {
3117 unittest.expect(o.caption, unittest.equals('foo'));
3118 checkContentRating(o.contentRating);
3119 checkAccessPolicy(o.countryRestriction);
3120 unittest.expect(o.definition, unittest.equals('foo'));
3121 unittest.expect(o.dimension, unittest.equals('foo'));
3122 unittest.expect(o.duration, unittest.equals('foo'));
3123 unittest.expect(o.licensedContent, unittest.isTrue);
3124 checkVideoContentDetailsRegionRestriction(o.regionRestriction);
3125 }
3126 buildCounterVideoContentDetails--;
3127 }
3128
3129 buildUnnamed367() {
3130 var o = new core.List<core.String>();
3131 o.add("foo");
3132 o.add("foo");
3133 return o;
3134 }
3135
3136 checkUnnamed367(core.List<core.String> o) {
3137 unittest.expect(o, unittest.hasLength(2));
3138 unittest.expect(o[0], unittest.equals('foo'));
3139 unittest.expect(o[1], unittest.equals('foo'));
3140 }
3141
3142 buildUnnamed368() {
3143 var o = new core.List<core.String>();
3144 o.add("foo");
3145 o.add("foo");
3146 return o;
3147 }
3148
3149 checkUnnamed368(core.List<core.String> o) {
3150 unittest.expect(o, unittest.hasLength(2));
3151 unittest.expect(o[0], unittest.equals('foo'));
3152 unittest.expect(o[1], unittest.equals('foo'));
3153 }
3154
3155 core.int buildCounterVideoContentDetailsRegionRestriction = 0;
3156 buildVideoContentDetailsRegionRestriction() {
3157 var o = new api.VideoContentDetailsRegionRestriction();
3158 buildCounterVideoContentDetailsRegionRestriction++;
3159 if (buildCounterVideoContentDetailsRegionRestriction < 3) {
3160 o.allowed = buildUnnamed367();
3161 o.blocked = buildUnnamed368();
3162 }
3163 buildCounterVideoContentDetailsRegionRestriction--;
3164 return o;
3165 }
3166
3167 checkVideoContentDetailsRegionRestriction(api.VideoContentDetailsRegionRestricti on o) {
3168 buildCounterVideoContentDetailsRegionRestriction++;
3169 if (buildCounterVideoContentDetailsRegionRestriction < 3) {
3170 checkUnnamed367(o.allowed);
3171 checkUnnamed368(o.blocked);
3172 }
3173 buildCounterVideoContentDetailsRegionRestriction--;
3174 }
3175
3176 core.int buildCounterVideoConversionPing = 0;
3177 buildVideoConversionPing() {
3178 var o = new api.VideoConversionPing();
3179 buildCounterVideoConversionPing++;
3180 if (buildCounterVideoConversionPing < 3) {
3181 o.context = "foo";
3182 o.conversionUrl = "foo";
3183 }
3184 buildCounterVideoConversionPing--;
3185 return o;
3186 }
3187
3188 checkVideoConversionPing(api.VideoConversionPing o) {
3189 buildCounterVideoConversionPing++;
3190 if (buildCounterVideoConversionPing < 3) {
3191 unittest.expect(o.context, unittest.equals('foo'));
3192 unittest.expect(o.conversionUrl, unittest.equals('foo'));
3193 }
3194 buildCounterVideoConversionPing--;
3195 }
3196
3197 buildUnnamed369() {
3198 var o = new core.List<api.VideoConversionPing>();
3199 o.add(buildVideoConversionPing());
3200 o.add(buildVideoConversionPing());
3201 return o;
3202 }
3203
3204 checkUnnamed369(core.List<api.VideoConversionPing> o) {
3205 unittest.expect(o, unittest.hasLength(2));
3206 checkVideoConversionPing(o[0]);
3207 checkVideoConversionPing(o[1]);
3208 }
3209
3210 core.int buildCounterVideoConversionPings = 0;
3211 buildVideoConversionPings() {
3212 var o = new api.VideoConversionPings();
3213 buildCounterVideoConversionPings++;
3214 if (buildCounterVideoConversionPings < 3) {
3215 o.pings = buildUnnamed369();
3216 }
3217 buildCounterVideoConversionPings--;
3218 return o;
3219 }
3220
3221 checkVideoConversionPings(api.VideoConversionPings o) {
3222 buildCounterVideoConversionPings++;
3223 if (buildCounterVideoConversionPings < 3) {
3224 checkUnnamed369(o.pings);
3225 }
3226 buildCounterVideoConversionPings--;
3227 }
3228
3229 buildUnnamed370() {
3230 var o = new core.List<api.VideoFileDetailsAudioStream>();
3231 o.add(buildVideoFileDetailsAudioStream());
3232 o.add(buildVideoFileDetailsAudioStream());
3233 return o;
3234 }
3235
3236 checkUnnamed370(core.List<api.VideoFileDetailsAudioStream> o) {
3237 unittest.expect(o, unittest.hasLength(2));
3238 checkVideoFileDetailsAudioStream(o[0]);
3239 checkVideoFileDetailsAudioStream(o[1]);
3240 }
3241
3242 buildUnnamed371() {
3243 var o = new core.List<api.VideoFileDetailsVideoStream>();
3244 o.add(buildVideoFileDetailsVideoStream());
3245 o.add(buildVideoFileDetailsVideoStream());
3246 return o;
3247 }
3248
3249 checkUnnamed371(core.List<api.VideoFileDetailsVideoStream> o) {
3250 unittest.expect(o, unittest.hasLength(2));
3251 checkVideoFileDetailsVideoStream(o[0]);
3252 checkVideoFileDetailsVideoStream(o[1]);
3253 }
3254
3255 core.int buildCounterVideoFileDetails = 0;
3256 buildVideoFileDetails() {
3257 var o = new api.VideoFileDetails();
3258 buildCounterVideoFileDetails++;
3259 if (buildCounterVideoFileDetails < 3) {
3260 o.audioStreams = buildUnnamed370();
3261 o.bitrateBps = "foo";
3262 o.container = "foo";
3263 o.creationTime = "foo";
3264 o.durationMs = "foo";
3265 o.fileName = "foo";
3266 o.fileSize = "foo";
3267 o.fileType = "foo";
3268 o.recordingLocation = buildGeoPoint();
3269 o.videoStreams = buildUnnamed371();
3270 }
3271 buildCounterVideoFileDetails--;
3272 return o;
3273 }
3274
3275 checkVideoFileDetails(api.VideoFileDetails o) {
3276 buildCounterVideoFileDetails++;
3277 if (buildCounterVideoFileDetails < 3) {
3278 checkUnnamed370(o.audioStreams);
3279 unittest.expect(o.bitrateBps, unittest.equals('foo'));
3280 unittest.expect(o.container, unittest.equals('foo'));
3281 unittest.expect(o.creationTime, unittest.equals('foo'));
3282 unittest.expect(o.durationMs, unittest.equals('foo'));
3283 unittest.expect(o.fileName, unittest.equals('foo'));
3284 unittest.expect(o.fileSize, unittest.equals('foo'));
3285 unittest.expect(o.fileType, unittest.equals('foo'));
3286 checkGeoPoint(o.recordingLocation);
3287 checkUnnamed371(o.videoStreams);
3288 }
3289 buildCounterVideoFileDetails--;
3290 }
3291
3292 core.int buildCounterVideoFileDetailsAudioStream = 0;
3293 buildVideoFileDetailsAudioStream() {
3294 var o = new api.VideoFileDetailsAudioStream();
3295 buildCounterVideoFileDetailsAudioStream++;
3296 if (buildCounterVideoFileDetailsAudioStream < 3) {
3297 o.bitrateBps = "foo";
3298 o.channelCount = 42;
3299 o.codec = "foo";
3300 o.vendor = "foo";
3301 }
3302 buildCounterVideoFileDetailsAudioStream--;
3303 return o;
3304 }
3305
3306 checkVideoFileDetailsAudioStream(api.VideoFileDetailsAudioStream o) {
3307 buildCounterVideoFileDetailsAudioStream++;
3308 if (buildCounterVideoFileDetailsAudioStream < 3) {
3309 unittest.expect(o.bitrateBps, unittest.equals('foo'));
3310 unittest.expect(o.channelCount, unittest.equals(42));
3311 unittest.expect(o.codec, unittest.equals('foo'));
3312 unittest.expect(o.vendor, unittest.equals('foo'));
3313 }
3314 buildCounterVideoFileDetailsAudioStream--;
3315 }
3316
3317 core.int buildCounterVideoFileDetailsVideoStream = 0;
3318 buildVideoFileDetailsVideoStream() {
3319 var o = new api.VideoFileDetailsVideoStream();
3320 buildCounterVideoFileDetailsVideoStream++;
3321 if (buildCounterVideoFileDetailsVideoStream < 3) {
3322 o.aspectRatio = 42.0;
3323 o.bitrateBps = "foo";
3324 o.codec = "foo";
3325 o.frameRateFps = 42.0;
3326 o.heightPixels = 42;
3327 o.rotation = "foo";
3328 o.vendor = "foo";
3329 o.widthPixels = 42;
3330 }
3331 buildCounterVideoFileDetailsVideoStream--;
3332 return o;
3333 }
3334
3335 checkVideoFileDetailsVideoStream(api.VideoFileDetailsVideoStream o) {
3336 buildCounterVideoFileDetailsVideoStream++;
3337 if (buildCounterVideoFileDetailsVideoStream < 3) {
3338 unittest.expect(o.aspectRatio, unittest.equals(42.0));
3339 unittest.expect(o.bitrateBps, unittest.equals('foo'));
3340 unittest.expect(o.codec, unittest.equals('foo'));
3341 unittest.expect(o.frameRateFps, unittest.equals(42.0));
3342 unittest.expect(o.heightPixels, unittest.equals(42));
3343 unittest.expect(o.rotation, unittest.equals('foo'));
3344 unittest.expect(o.vendor, unittest.equals('foo'));
3345 unittest.expect(o.widthPixels, unittest.equals(42));
3346 }
3347 buildCounterVideoFileDetailsVideoStream--;
3348 }
3349
3350 buildUnnamed372() {
3351 var o = new core.List<api.VideoRating>();
3352 o.add(buildVideoRating());
3353 o.add(buildVideoRating());
3354 return o;
3355 }
3356
3357 checkUnnamed372(core.List<api.VideoRating> o) {
3358 unittest.expect(o, unittest.hasLength(2));
3359 checkVideoRating(o[0]);
3360 checkVideoRating(o[1]);
3361 }
3362
3363 core.int buildCounterVideoGetRatingResponse = 0;
3364 buildVideoGetRatingResponse() {
3365 var o = new api.VideoGetRatingResponse();
3366 buildCounterVideoGetRatingResponse++;
3367 if (buildCounterVideoGetRatingResponse < 3) {
3368 o.etag = "foo";
3369 o.items = buildUnnamed372();
3370 o.kind = "foo";
3371 }
3372 buildCounterVideoGetRatingResponse--;
3373 return o;
3374 }
3375
3376 checkVideoGetRatingResponse(api.VideoGetRatingResponse o) {
3377 buildCounterVideoGetRatingResponse++;
3378 if (buildCounterVideoGetRatingResponse < 3) {
3379 unittest.expect(o.etag, unittest.equals('foo'));
3380 checkUnnamed372(o.items);
3381 unittest.expect(o.kind, unittest.equals('foo'));
3382 }
3383 buildCounterVideoGetRatingResponse--;
3384 }
3385
3386 buildUnnamed373() {
3387 var o = new core.List<api.Video>();
3388 o.add(buildVideo());
3389 o.add(buildVideo());
3390 return o;
3391 }
3392
3393 checkUnnamed373(core.List<api.Video> o) {
3394 unittest.expect(o, unittest.hasLength(2));
3395 checkVideo(o[0]);
3396 checkVideo(o[1]);
3397 }
3398
3399 core.int buildCounterVideoListResponse = 0;
3400 buildVideoListResponse() {
3401 var o = new api.VideoListResponse();
3402 buildCounterVideoListResponse++;
3403 if (buildCounterVideoListResponse < 3) {
3404 o.etag = "foo";
3405 o.eventId = "foo";
3406 o.items = buildUnnamed373();
3407 o.kind = "foo";
3408 o.nextPageToken = "foo";
3409 o.pageInfo = buildPageInfo();
3410 o.prevPageToken = "foo";
3411 o.tokenPagination = buildTokenPagination();
3412 o.visitorId = "foo";
3413 }
3414 buildCounterVideoListResponse--;
3415 return o;
3416 }
3417
3418 checkVideoListResponse(api.VideoListResponse o) {
3419 buildCounterVideoListResponse++;
3420 if (buildCounterVideoListResponse < 3) {
3421 unittest.expect(o.etag, unittest.equals('foo'));
3422 unittest.expect(o.eventId, unittest.equals('foo'));
3423 checkUnnamed373(o.items);
3424 unittest.expect(o.kind, unittest.equals('foo'));
3425 unittest.expect(o.nextPageToken, unittest.equals('foo'));
3426 checkPageInfo(o.pageInfo);
3427 unittest.expect(o.prevPageToken, unittest.equals('foo'));
3428 checkTokenPagination(o.tokenPagination);
3429 unittest.expect(o.visitorId, unittest.equals('foo'));
3430 }
3431 buildCounterVideoListResponse--;
3432 }
3433
3434 core.int buildCounterVideoLiveStreamingDetails = 0;
3435 buildVideoLiveStreamingDetails() {
3436 var o = new api.VideoLiveStreamingDetails();
3437 buildCounterVideoLiveStreamingDetails++;
3438 if (buildCounterVideoLiveStreamingDetails < 3) {
3439 o.actualEndTime = core.DateTime.parse("2002-02-27T14:01:02");
3440 o.actualStartTime = core.DateTime.parse("2002-02-27T14:01:02");
3441 o.concurrentViewers = "foo";
3442 o.scheduledEndTime = core.DateTime.parse("2002-02-27T14:01:02");
3443 o.scheduledStartTime = core.DateTime.parse("2002-02-27T14:01:02");
3444 }
3445 buildCounterVideoLiveStreamingDetails--;
3446 return o;
3447 }
3448
3449 checkVideoLiveStreamingDetails(api.VideoLiveStreamingDetails o) {
3450 buildCounterVideoLiveStreamingDetails++;
3451 if (buildCounterVideoLiveStreamingDetails < 3) {
3452 unittest.expect(o.actualEndTime, unittest.equals(core.DateTime.parse("2002-0 2-27T14:01:02")));
3453 unittest.expect(o.actualStartTime, unittest.equals(core.DateTime.parse("2002 -02-27T14:01:02")));
3454 unittest.expect(o.concurrentViewers, unittest.equals('foo'));
3455 unittest.expect(o.scheduledEndTime, unittest.equals(core.DateTime.parse("200 2-02-27T14:01:02")));
3456 unittest.expect(o.scheduledStartTime, unittest.equals(core.DateTime.parse("2 002-02-27T14:01:02")));
3457 }
3458 buildCounterVideoLiveStreamingDetails--;
3459 }
3460
3461 core.int buildCounterVideoMonetizationDetails = 0;
3462 buildVideoMonetizationDetails() {
3463 var o = new api.VideoMonetizationDetails();
3464 buildCounterVideoMonetizationDetails++;
3465 if (buildCounterVideoMonetizationDetails < 3) {
3466 o.access = buildAccessPolicy();
3467 }
3468 buildCounterVideoMonetizationDetails--;
3469 return o;
3470 }
3471
3472 checkVideoMonetizationDetails(api.VideoMonetizationDetails o) {
3473 buildCounterVideoMonetizationDetails++;
3474 if (buildCounterVideoMonetizationDetails < 3) {
3475 checkAccessPolicy(o.access);
3476 }
3477 buildCounterVideoMonetizationDetails--;
3478 }
3479
3480 core.int buildCounterVideoPlayer = 0;
3481 buildVideoPlayer() {
3482 var o = new api.VideoPlayer();
3483 buildCounterVideoPlayer++;
3484 if (buildCounterVideoPlayer < 3) {
3485 o.embedHtml = "foo";
3486 }
3487 buildCounterVideoPlayer--;
3488 return o;
3489 }
3490
3491 checkVideoPlayer(api.VideoPlayer o) {
3492 buildCounterVideoPlayer++;
3493 if (buildCounterVideoPlayer < 3) {
3494 unittest.expect(o.embedHtml, unittest.equals('foo'));
3495 }
3496 buildCounterVideoPlayer--;
3497 }
3498
3499 core.int buildCounterVideoProcessingDetails = 0;
3500 buildVideoProcessingDetails() {
3501 var o = new api.VideoProcessingDetails();
3502 buildCounterVideoProcessingDetails++;
3503 if (buildCounterVideoProcessingDetails < 3) {
3504 o.editorSuggestionsAvailability = "foo";
3505 o.fileDetailsAvailability = "foo";
3506 o.processingFailureReason = "foo";
3507 o.processingIssuesAvailability = "foo";
3508 o.processingProgress = buildVideoProcessingDetailsProcessingProgress();
3509 o.processingStatus = "foo";
3510 o.tagSuggestionsAvailability = "foo";
3511 o.thumbnailsAvailability = "foo";
3512 }
3513 buildCounterVideoProcessingDetails--;
3514 return o;
3515 }
3516
3517 checkVideoProcessingDetails(api.VideoProcessingDetails o) {
3518 buildCounterVideoProcessingDetails++;
3519 if (buildCounterVideoProcessingDetails < 3) {
3520 unittest.expect(o.editorSuggestionsAvailability, unittest.equals('foo'));
3521 unittest.expect(o.fileDetailsAvailability, unittest.equals('foo'));
3522 unittest.expect(o.processingFailureReason, unittest.equals('foo'));
3523 unittest.expect(o.processingIssuesAvailability, unittest.equals('foo'));
3524 checkVideoProcessingDetailsProcessingProgress(o.processingProgress);
3525 unittest.expect(o.processingStatus, unittest.equals('foo'));
3526 unittest.expect(o.tagSuggestionsAvailability, unittest.equals('foo'));
3527 unittest.expect(o.thumbnailsAvailability, unittest.equals('foo'));
3528 }
3529 buildCounterVideoProcessingDetails--;
3530 }
3531
3532 core.int buildCounterVideoProcessingDetailsProcessingProgress = 0;
3533 buildVideoProcessingDetailsProcessingProgress() {
3534 var o = new api.VideoProcessingDetailsProcessingProgress();
3535 buildCounterVideoProcessingDetailsProcessingProgress++;
3536 if (buildCounterVideoProcessingDetailsProcessingProgress < 3) {
3537 o.partsProcessed = "foo";
3538 o.partsTotal = "foo";
3539 o.timeLeftMs = "foo";
3540 }
3541 buildCounterVideoProcessingDetailsProcessingProgress--;
3542 return o;
3543 }
3544
3545 checkVideoProcessingDetailsProcessingProgress(api.VideoProcessingDetailsProcessi ngProgress o) {
3546 buildCounterVideoProcessingDetailsProcessingProgress++;
3547 if (buildCounterVideoProcessingDetailsProcessingProgress < 3) {
3548 unittest.expect(o.partsProcessed, unittest.equals('foo'));
3549 unittest.expect(o.partsTotal, unittest.equals('foo'));
3550 unittest.expect(o.timeLeftMs, unittest.equals('foo'));
3551 }
3552 buildCounterVideoProcessingDetailsProcessingProgress--;
3553 }
3554
3555 buildUnnamed374() {
3556 var o = new core.List<core.String>();
3557 o.add("foo");
3558 o.add("foo");
3559 return o;
3560 }
3561
3562 checkUnnamed374(core.List<core.String> o) {
3563 unittest.expect(o, unittest.hasLength(2));
3564 unittest.expect(o[0], unittest.equals('foo'));
3565 unittest.expect(o[1], unittest.equals('foo'));
3566 }
3567
3568 core.int buildCounterVideoProjectDetails = 0;
3569 buildVideoProjectDetails() {
3570 var o = new api.VideoProjectDetails();
3571 buildCounterVideoProjectDetails++;
3572 if (buildCounterVideoProjectDetails < 3) {
3573 o.tags = buildUnnamed374();
3574 }
3575 buildCounterVideoProjectDetails--;
3576 return o;
3577 }
3578
3579 checkVideoProjectDetails(api.VideoProjectDetails o) {
3580 buildCounterVideoProjectDetails++;
3581 if (buildCounterVideoProjectDetails < 3) {
3582 checkUnnamed374(o.tags);
3583 }
3584 buildCounterVideoProjectDetails--;
3585 }
3586
3587 core.int buildCounterVideoRating = 0;
3588 buildVideoRating() {
3589 var o = new api.VideoRating();
3590 buildCounterVideoRating++;
3591 if (buildCounterVideoRating < 3) {
3592 o.rating = "foo";
3593 o.videoId = "foo";
3594 }
3595 buildCounterVideoRating--;
3596 return o;
3597 }
3598
3599 checkVideoRating(api.VideoRating o) {
3600 buildCounterVideoRating++;
3601 if (buildCounterVideoRating < 3) {
3602 unittest.expect(o.rating, unittest.equals('foo'));
3603 unittest.expect(o.videoId, unittest.equals('foo'));
3604 }
3605 buildCounterVideoRating--;
3606 }
3607
3608 core.int buildCounterVideoRecordingDetails = 0;
3609 buildVideoRecordingDetails() {
3610 var o = new api.VideoRecordingDetails();
3611 buildCounterVideoRecordingDetails++;
3612 if (buildCounterVideoRecordingDetails < 3) {
3613 o.location = buildGeoPoint();
3614 o.locationDescription = "foo";
3615 o.recordingDate = core.DateTime.parse("2002-02-27T14:01:02");
3616 }
3617 buildCounterVideoRecordingDetails--;
3618 return o;
3619 }
3620
3621 checkVideoRecordingDetails(api.VideoRecordingDetails o) {
3622 buildCounterVideoRecordingDetails++;
3623 if (buildCounterVideoRecordingDetails < 3) {
3624 checkGeoPoint(o.location);
3625 unittest.expect(o.locationDescription, unittest.equals('foo'));
3626 unittest.expect(o.recordingDate, unittest.equals(core.DateTime.parse("2002-0 2-27T14:01:02")));
3627 }
3628 buildCounterVideoRecordingDetails--;
3629 }
3630
3631 buildUnnamed375() {
3632 var o = new core.List<core.String>();
3633 o.add("foo");
3634 o.add("foo");
3635 return o;
3636 }
3637
3638 checkUnnamed375(core.List<core.String> o) {
3639 unittest.expect(o, unittest.hasLength(2));
3640 unittest.expect(o[0], unittest.equals('foo'));
3641 unittest.expect(o[1], unittest.equals('foo'));
3642 }
3643
3644 core.int buildCounterVideoSnippet = 0;
3645 buildVideoSnippet() {
3646 var o = new api.VideoSnippet();
3647 buildCounterVideoSnippet++;
3648 if (buildCounterVideoSnippet < 3) {
3649 o.categoryId = "foo";
3650 o.channelId = "foo";
3651 o.channelTitle = "foo";
3652 o.description = "foo";
3653 o.liveBroadcastContent = "foo";
3654 o.publishedAt = core.DateTime.parse("2002-02-27T14:01:02");
3655 o.tags = buildUnnamed375();
3656 o.thumbnails = buildThumbnailDetails();
3657 o.title = "foo";
3658 }
3659 buildCounterVideoSnippet--;
3660 return o;
3661 }
3662
3663 checkVideoSnippet(api.VideoSnippet o) {
3664 buildCounterVideoSnippet++;
3665 if (buildCounterVideoSnippet < 3) {
3666 unittest.expect(o.categoryId, unittest.equals('foo'));
3667 unittest.expect(o.channelId, unittest.equals('foo'));
3668 unittest.expect(o.channelTitle, unittest.equals('foo'));
3669 unittest.expect(o.description, unittest.equals('foo'));
3670 unittest.expect(o.liveBroadcastContent, unittest.equals('foo'));
3671 unittest.expect(o.publishedAt, unittest.equals(core.DateTime.parse("2002-02- 27T14:01:02")));
3672 checkUnnamed375(o.tags);
3673 checkThumbnailDetails(o.thumbnails);
3674 unittest.expect(o.title, unittest.equals('foo'));
3675 }
3676 buildCounterVideoSnippet--;
3677 }
3678
3679 core.int buildCounterVideoStatistics = 0;
3680 buildVideoStatistics() {
3681 var o = new api.VideoStatistics();
3682 buildCounterVideoStatistics++;
3683 if (buildCounterVideoStatistics < 3) {
3684 o.commentCount = "foo";
3685 o.dislikeCount = "foo";
3686 o.favoriteCount = "foo";
3687 o.likeCount = "foo";
3688 o.viewCount = "foo";
3689 }
3690 buildCounterVideoStatistics--;
3691 return o;
3692 }
3693
3694 checkVideoStatistics(api.VideoStatistics o) {
3695 buildCounterVideoStatistics++;
3696 if (buildCounterVideoStatistics < 3) {
3697 unittest.expect(o.commentCount, unittest.equals('foo'));
3698 unittest.expect(o.dislikeCount, unittest.equals('foo'));
3699 unittest.expect(o.favoriteCount, unittest.equals('foo'));
3700 unittest.expect(o.likeCount, unittest.equals('foo'));
3701 unittest.expect(o.viewCount, unittest.equals('foo'));
3702 }
3703 buildCounterVideoStatistics--;
3704 }
3705
3706 core.int buildCounterVideoStatus = 0;
3707 buildVideoStatus() {
3708 var o = new api.VideoStatus();
3709 buildCounterVideoStatus++;
3710 if (buildCounterVideoStatus < 3) {
3711 o.embeddable = true;
3712 o.failureReason = "foo";
3713 o.license = "foo";
3714 o.privacyStatus = "foo";
3715 o.publicStatsViewable = true;
3716 o.publishAt = core.DateTime.parse("2002-02-27T14:01:02");
3717 o.rejectionReason = "foo";
3718 o.uploadStatus = "foo";
3719 }
3720 buildCounterVideoStatus--;
3721 return o;
3722 }
3723
3724 checkVideoStatus(api.VideoStatus o) {
3725 buildCounterVideoStatus++;
3726 if (buildCounterVideoStatus < 3) {
3727 unittest.expect(o.embeddable, unittest.isTrue);
3728 unittest.expect(o.failureReason, unittest.equals('foo'));
3729 unittest.expect(o.license, unittest.equals('foo'));
3730 unittest.expect(o.privacyStatus, unittest.equals('foo'));
3731 unittest.expect(o.publicStatsViewable, unittest.isTrue);
3732 unittest.expect(o.publishAt, unittest.equals(core.DateTime.parse("2002-02-27 T14:01:02")));
3733 unittest.expect(o.rejectionReason, unittest.equals('foo'));
3734 unittest.expect(o.uploadStatus, unittest.equals('foo'));
3735 }
3736 buildCounterVideoStatus--;
3737 }
3738
3739 buildUnnamed376() {
3740 var o = new core.List<core.String>();
3741 o.add("foo");
3742 o.add("foo");
3743 return o;
3744 }
3745
3746 checkUnnamed376(core.List<core.String> o) {
3747 unittest.expect(o, unittest.hasLength(2));
3748 unittest.expect(o[0], unittest.equals('foo'));
3749 unittest.expect(o[1], unittest.equals('foo'));
3750 }
3751
3752 buildUnnamed377() {
3753 var o = new core.List<core.String>();
3754 o.add("foo");
3755 o.add("foo");
3756 return o;
3757 }
3758
3759 checkUnnamed377(core.List<core.String> o) {
3760 unittest.expect(o, unittest.hasLength(2));
3761 unittest.expect(o[0], unittest.equals('foo'));
3762 unittest.expect(o[1], unittest.equals('foo'));
3763 }
3764
3765 buildUnnamed378() {
3766 var o = new core.List<core.String>();
3767 o.add("foo");
3768 o.add("foo");
3769 return o;
3770 }
3771
3772 checkUnnamed378(core.List<core.String> o) {
3773 unittest.expect(o, unittest.hasLength(2));
3774 unittest.expect(o[0], unittest.equals('foo'));
3775 unittest.expect(o[1], unittest.equals('foo'));
3776 }
3777
3778 buildUnnamed379() {
3779 var o = new core.List<core.String>();
3780 o.add("foo");
3781 o.add("foo");
3782 return o;
3783 }
3784
3785 checkUnnamed379(core.List<core.String> o) {
3786 unittest.expect(o, unittest.hasLength(2));
3787 unittest.expect(o[0], unittest.equals('foo'));
3788 unittest.expect(o[1], unittest.equals('foo'));
3789 }
3790
3791 buildUnnamed380() {
3792 var o = new core.List<api.VideoSuggestionsTagSuggestion>();
3793 o.add(buildVideoSuggestionsTagSuggestion());
3794 o.add(buildVideoSuggestionsTagSuggestion());
3795 return o;
3796 }
3797
3798 checkUnnamed380(core.List<api.VideoSuggestionsTagSuggestion> o) {
3799 unittest.expect(o, unittest.hasLength(2));
3800 checkVideoSuggestionsTagSuggestion(o[0]);
3801 checkVideoSuggestionsTagSuggestion(o[1]);
3802 }
3803
3804 core.int buildCounterVideoSuggestions = 0;
3805 buildVideoSuggestions() {
3806 var o = new api.VideoSuggestions();
3807 buildCounterVideoSuggestions++;
3808 if (buildCounterVideoSuggestions < 3) {
3809 o.editorSuggestions = buildUnnamed376();
3810 o.processingErrors = buildUnnamed377();
3811 o.processingHints = buildUnnamed378();
3812 o.processingWarnings = buildUnnamed379();
3813 o.tagSuggestions = buildUnnamed380();
3814 }
3815 buildCounterVideoSuggestions--;
3816 return o;
3817 }
3818
3819 checkVideoSuggestions(api.VideoSuggestions o) {
3820 buildCounterVideoSuggestions++;
3821 if (buildCounterVideoSuggestions < 3) {
3822 checkUnnamed376(o.editorSuggestions);
3823 checkUnnamed377(o.processingErrors);
3824 checkUnnamed378(o.processingHints);
3825 checkUnnamed379(o.processingWarnings);
3826 checkUnnamed380(o.tagSuggestions);
3827 }
3828 buildCounterVideoSuggestions--;
3829 }
3830
3831 buildUnnamed381() {
3832 var o = new core.List<core.String>();
3833 o.add("foo");
3834 o.add("foo");
3835 return o;
3836 }
3837
3838 checkUnnamed381(core.List<core.String> o) {
3839 unittest.expect(o, unittest.hasLength(2));
3840 unittest.expect(o[0], unittest.equals('foo'));
3841 unittest.expect(o[1], unittest.equals('foo'));
3842 }
3843
3844 core.int buildCounterVideoSuggestionsTagSuggestion = 0;
3845 buildVideoSuggestionsTagSuggestion() {
3846 var o = new api.VideoSuggestionsTagSuggestion();
3847 buildCounterVideoSuggestionsTagSuggestion++;
3848 if (buildCounterVideoSuggestionsTagSuggestion < 3) {
3849 o.categoryRestricts = buildUnnamed381();
3850 o.tag = "foo";
3851 }
3852 buildCounterVideoSuggestionsTagSuggestion--;
3853 return o;
3854 }
3855
3856 checkVideoSuggestionsTagSuggestion(api.VideoSuggestionsTagSuggestion o) {
3857 buildCounterVideoSuggestionsTagSuggestion++;
3858 if (buildCounterVideoSuggestionsTagSuggestion < 3) {
3859 checkUnnamed381(o.categoryRestricts);
3860 unittest.expect(o.tag, unittest.equals('foo'));
3861 }
3862 buildCounterVideoSuggestionsTagSuggestion--;
3863 }
3864
3865 buildUnnamed382() {
3866 var o = new core.List<core.String>();
3867 o.add("foo");
3868 o.add("foo");
3869 return o;
3870 }
3871
3872 checkUnnamed382(core.List<core.String> o) {
3873 unittest.expect(o, unittest.hasLength(2));
3874 unittest.expect(o[0], unittest.equals('foo'));
3875 unittest.expect(o[1], unittest.equals('foo'));
3876 }
3877
3878 buildUnnamed383() {
3879 var o = new core.List<core.String>();
3880 o.add("foo");
3881 o.add("foo");
3882 return o;
3883 }
3884
3885 checkUnnamed383(core.List<core.String> o) {
3886 unittest.expect(o, unittest.hasLength(2));
3887 unittest.expect(o[0], unittest.equals('foo'));
3888 unittest.expect(o[1], unittest.equals('foo'));
3889 }
3890
3891 core.int buildCounterVideoTopicDetails = 0;
3892 buildVideoTopicDetails() {
3893 var o = new api.VideoTopicDetails();
3894 buildCounterVideoTopicDetails++;
3895 if (buildCounterVideoTopicDetails < 3) {
3896 o.relevantTopicIds = buildUnnamed382();
3897 o.topicIds = buildUnnamed383();
3898 }
3899 buildCounterVideoTopicDetails--;
3900 return o;
3901 }
3902
3903 checkVideoTopicDetails(api.VideoTopicDetails o) {
3904 buildCounterVideoTopicDetails++;
3905 if (buildCounterVideoTopicDetails < 3) {
3906 checkUnnamed382(o.relevantTopicIds);
3907 checkUnnamed383(o.topicIds);
3908 }
3909 buildCounterVideoTopicDetails--;
3910 }
3911
3912 core.int buildCounterWatchSettings = 0;
3913 buildWatchSettings() {
3914 var o = new api.WatchSettings();
3915 buildCounterWatchSettings++;
3916 if (buildCounterWatchSettings < 3) {
3917 o.backgroundColor = "foo";
3918 o.featuredPlaylistId = "foo";
3919 o.textColor = "foo";
3920 }
3921 buildCounterWatchSettings--;
3922 return o;
3923 }
3924
3925 checkWatchSettings(api.WatchSettings o) {
3926 buildCounterWatchSettings++;
3927 if (buildCounterWatchSettings < 3) {
3928 unittest.expect(o.backgroundColor, unittest.equals('foo'));
3929 unittest.expect(o.featuredPlaylistId, unittest.equals('foo'));
3930 unittest.expect(o.textColor, unittest.equals('foo'));
3931 }
3932 buildCounterWatchSettings--;
3933 }
3934
3935
3936 main() {
3937 unittest.group("obj-schema-AccessPolicy", () {
3938 unittest.test("to-json--from-json", () {
3939 var o = buildAccessPolicy();
3940 var od = new api.AccessPolicy.fromJson(o.toJson());
3941 checkAccessPolicy(od);
3942 });
3943 });
3944
3945
3946 unittest.group("obj-schema-Activity", () {
3947 unittest.test("to-json--from-json", () {
3948 var o = buildActivity();
3949 var od = new api.Activity.fromJson(o.toJson());
3950 checkActivity(od);
3951 });
3952 });
3953
3954
3955 unittest.group("obj-schema-ActivityContentDetails", () {
3956 unittest.test("to-json--from-json", () {
3957 var o = buildActivityContentDetails();
3958 var od = new api.ActivityContentDetails.fromJson(o.toJson());
3959 checkActivityContentDetails(od);
3960 });
3961 });
3962
3963
3964 unittest.group("obj-schema-ActivityContentDetailsBulletin", () {
3965 unittest.test("to-json--from-json", () {
3966 var o = buildActivityContentDetailsBulletin();
3967 var od = new api.ActivityContentDetailsBulletin.fromJson(o.toJson());
3968 checkActivityContentDetailsBulletin(od);
3969 });
3970 });
3971
3972
3973 unittest.group("obj-schema-ActivityContentDetailsChannelItem", () {
3974 unittest.test("to-json--from-json", () {
3975 var o = buildActivityContentDetailsChannelItem();
3976 var od = new api.ActivityContentDetailsChannelItem.fromJson(o.toJson());
3977 checkActivityContentDetailsChannelItem(od);
3978 });
3979 });
3980
3981
3982 unittest.group("obj-schema-ActivityContentDetailsComment", () {
3983 unittest.test("to-json--from-json", () {
3984 var o = buildActivityContentDetailsComment();
3985 var od = new api.ActivityContentDetailsComment.fromJson(o.toJson());
3986 checkActivityContentDetailsComment(od);
3987 });
3988 });
3989
3990
3991 unittest.group("obj-schema-ActivityContentDetailsFavorite", () {
3992 unittest.test("to-json--from-json", () {
3993 var o = buildActivityContentDetailsFavorite();
3994 var od = new api.ActivityContentDetailsFavorite.fromJson(o.toJson());
3995 checkActivityContentDetailsFavorite(od);
3996 });
3997 });
3998
3999
4000 unittest.group("obj-schema-ActivityContentDetailsLike", () {
4001 unittest.test("to-json--from-json", () {
4002 var o = buildActivityContentDetailsLike();
4003 var od = new api.ActivityContentDetailsLike.fromJson(o.toJson());
4004 checkActivityContentDetailsLike(od);
4005 });
4006 });
4007
4008
4009 unittest.group("obj-schema-ActivityContentDetailsPlaylistItem", () {
4010 unittest.test("to-json--from-json", () {
4011 var o = buildActivityContentDetailsPlaylistItem();
4012 var od = new api.ActivityContentDetailsPlaylistItem.fromJson(o.toJson());
4013 checkActivityContentDetailsPlaylistItem(od);
4014 });
4015 });
4016
4017
4018 unittest.group("obj-schema-ActivityContentDetailsPromotedItem", () {
4019 unittest.test("to-json--from-json", () {
4020 var o = buildActivityContentDetailsPromotedItem();
4021 var od = new api.ActivityContentDetailsPromotedItem.fromJson(o.toJson());
4022 checkActivityContentDetailsPromotedItem(od);
4023 });
4024 });
4025
4026
4027 unittest.group("obj-schema-ActivityContentDetailsRecommendation", () {
4028 unittest.test("to-json--from-json", () {
4029 var o = buildActivityContentDetailsRecommendation();
4030 var od = new api.ActivityContentDetailsRecommendation.fromJson(o.toJson()) ;
4031 checkActivityContentDetailsRecommendation(od);
4032 });
4033 });
4034
4035
4036 unittest.group("obj-schema-ActivityContentDetailsSocial", () {
4037 unittest.test("to-json--from-json", () {
4038 var o = buildActivityContentDetailsSocial();
4039 var od = new api.ActivityContentDetailsSocial.fromJson(o.toJson());
4040 checkActivityContentDetailsSocial(od);
4041 });
4042 });
4043
4044
4045 unittest.group("obj-schema-ActivityContentDetailsSubscription", () {
4046 unittest.test("to-json--from-json", () {
4047 var o = buildActivityContentDetailsSubscription();
4048 var od = new api.ActivityContentDetailsSubscription.fromJson(o.toJson());
4049 checkActivityContentDetailsSubscription(od);
4050 });
4051 });
4052
4053
4054 unittest.group("obj-schema-ActivityContentDetailsUpload", () {
4055 unittest.test("to-json--from-json", () {
4056 var o = buildActivityContentDetailsUpload();
4057 var od = new api.ActivityContentDetailsUpload.fromJson(o.toJson());
4058 checkActivityContentDetailsUpload(od);
4059 });
4060 });
4061
4062
4063 unittest.group("obj-schema-ActivityListResponse", () {
4064 unittest.test("to-json--from-json", () {
4065 var o = buildActivityListResponse();
4066 var od = new api.ActivityListResponse.fromJson(o.toJson());
4067 checkActivityListResponse(od);
4068 });
4069 });
4070
4071
4072 unittest.group("obj-schema-ActivitySnippet", () {
4073 unittest.test("to-json--from-json", () {
4074 var o = buildActivitySnippet();
4075 var od = new api.ActivitySnippet.fromJson(o.toJson());
4076 checkActivitySnippet(od);
4077 });
4078 });
4079
4080
4081 unittest.group("obj-schema-CdnSettings", () {
4082 unittest.test("to-json--from-json", () {
4083 var o = buildCdnSettings();
4084 var od = new api.CdnSettings.fromJson(o.toJson());
4085 checkCdnSettings(od);
4086 });
4087 });
4088
4089
4090 unittest.group("obj-schema-Channel", () {
4091 unittest.test("to-json--from-json", () {
4092 var o = buildChannel();
4093 var od = new api.Channel.fromJson(o.toJson());
4094 checkChannel(od);
4095 });
4096 });
4097
4098
4099 unittest.group("obj-schema-ChannelAuditDetails", () {
4100 unittest.test("to-json--from-json", () {
4101 var o = buildChannelAuditDetails();
4102 var od = new api.ChannelAuditDetails.fromJson(o.toJson());
4103 checkChannelAuditDetails(od);
4104 });
4105 });
4106
4107
4108 unittest.group("obj-schema-ChannelBannerResource", () {
4109 unittest.test("to-json--from-json", () {
4110 var o = buildChannelBannerResource();
4111 var od = new api.ChannelBannerResource.fromJson(o.toJson());
4112 checkChannelBannerResource(od);
4113 });
4114 });
4115
4116
4117 unittest.group("obj-schema-ChannelBrandingSettings", () {
4118 unittest.test("to-json--from-json", () {
4119 var o = buildChannelBrandingSettings();
4120 var od = new api.ChannelBrandingSettings.fromJson(o.toJson());
4121 checkChannelBrandingSettings(od);
4122 });
4123 });
4124
4125
4126 unittest.group("obj-schema-ChannelContentDetailsRelatedPlaylists", () {
4127 unittest.test("to-json--from-json", () {
4128 var o = buildChannelContentDetailsRelatedPlaylists();
4129 var od = new api.ChannelContentDetailsRelatedPlaylists.fromJson(o.toJson() );
4130 checkChannelContentDetailsRelatedPlaylists(od);
4131 });
4132 });
4133
4134
4135 unittest.group("obj-schema-ChannelContentDetails", () {
4136 unittest.test("to-json--from-json", () {
4137 var o = buildChannelContentDetails();
4138 var od = new api.ChannelContentDetails.fromJson(o.toJson());
4139 checkChannelContentDetails(od);
4140 });
4141 });
4142
4143
4144 unittest.group("obj-schema-ChannelContentOwnerDetails", () {
4145 unittest.test("to-json--from-json", () {
4146 var o = buildChannelContentOwnerDetails();
4147 var od = new api.ChannelContentOwnerDetails.fromJson(o.toJson());
4148 checkChannelContentOwnerDetails(od);
4149 });
4150 });
4151
4152
4153 unittest.group("obj-schema-ChannelConversionPing", () {
4154 unittest.test("to-json--from-json", () {
4155 var o = buildChannelConversionPing();
4156 var od = new api.ChannelConversionPing.fromJson(o.toJson());
4157 checkChannelConversionPing(od);
4158 });
4159 });
4160
4161
4162 unittest.group("obj-schema-ChannelConversionPings", () {
4163 unittest.test("to-json--from-json", () {
4164 var o = buildChannelConversionPings();
4165 var od = new api.ChannelConversionPings.fromJson(o.toJson());
4166 checkChannelConversionPings(od);
4167 });
4168 });
4169
4170
4171 unittest.group("obj-schema-ChannelListResponse", () {
4172 unittest.test("to-json--from-json", () {
4173 var o = buildChannelListResponse();
4174 var od = new api.ChannelListResponse.fromJson(o.toJson());
4175 checkChannelListResponse(od);
4176 });
4177 });
4178
4179
4180 unittest.group("obj-schema-ChannelSection", () {
4181 unittest.test("to-json--from-json", () {
4182 var o = buildChannelSection();
4183 var od = new api.ChannelSection.fromJson(o.toJson());
4184 checkChannelSection(od);
4185 });
4186 });
4187
4188
4189 unittest.group("obj-schema-ChannelSectionContentDetails", () {
4190 unittest.test("to-json--from-json", () {
4191 var o = buildChannelSectionContentDetails();
4192 var od = new api.ChannelSectionContentDetails.fromJson(o.toJson());
4193 checkChannelSectionContentDetails(od);
4194 });
4195 });
4196
4197
4198 unittest.group("obj-schema-ChannelSectionListResponse", () {
4199 unittest.test("to-json--from-json", () {
4200 var o = buildChannelSectionListResponse();
4201 var od = new api.ChannelSectionListResponse.fromJson(o.toJson());
4202 checkChannelSectionListResponse(od);
4203 });
4204 });
4205
4206
4207 unittest.group("obj-schema-ChannelSectionSnippet", () {
4208 unittest.test("to-json--from-json", () {
4209 var o = buildChannelSectionSnippet();
4210 var od = new api.ChannelSectionSnippet.fromJson(o.toJson());
4211 checkChannelSectionSnippet(od);
4212 });
4213 });
4214
4215
4216 unittest.group("obj-schema-ChannelSettings", () {
4217 unittest.test("to-json--from-json", () {
4218 var o = buildChannelSettings();
4219 var od = new api.ChannelSettings.fromJson(o.toJson());
4220 checkChannelSettings(od);
4221 });
4222 });
4223
4224
4225 unittest.group("obj-schema-ChannelSnippet", () {
4226 unittest.test("to-json--from-json", () {
4227 var o = buildChannelSnippet();
4228 var od = new api.ChannelSnippet.fromJson(o.toJson());
4229 checkChannelSnippet(od);
4230 });
4231 });
4232
4233
4234 unittest.group("obj-schema-ChannelStatistics", () {
4235 unittest.test("to-json--from-json", () {
4236 var o = buildChannelStatistics();
4237 var od = new api.ChannelStatistics.fromJson(o.toJson());
4238 checkChannelStatistics(od);
4239 });
4240 });
4241
4242
4243 unittest.group("obj-schema-ChannelStatus", () {
4244 unittest.test("to-json--from-json", () {
4245 var o = buildChannelStatus();
4246 var od = new api.ChannelStatus.fromJson(o.toJson());
4247 checkChannelStatus(od);
4248 });
4249 });
4250
4251
4252 unittest.group("obj-schema-ChannelTopicDetails", () {
4253 unittest.test("to-json--from-json", () {
4254 var o = buildChannelTopicDetails();
4255 var od = new api.ChannelTopicDetails.fromJson(o.toJson());
4256 checkChannelTopicDetails(od);
4257 });
4258 });
4259
4260
4261 unittest.group("obj-schema-ContentRating", () {
4262 unittest.test("to-json--from-json", () {
4263 var o = buildContentRating();
4264 var od = new api.ContentRating.fromJson(o.toJson());
4265 checkContentRating(od);
4266 });
4267 });
4268
4269
4270 unittest.group("obj-schema-GeoPoint", () {
4271 unittest.test("to-json--from-json", () {
4272 var o = buildGeoPoint();
4273 var od = new api.GeoPoint.fromJson(o.toJson());
4274 checkGeoPoint(od);
4275 });
4276 });
4277
4278
4279 unittest.group("obj-schema-GuideCategory", () {
4280 unittest.test("to-json--from-json", () {
4281 var o = buildGuideCategory();
4282 var od = new api.GuideCategory.fromJson(o.toJson());
4283 checkGuideCategory(od);
4284 });
4285 });
4286
4287
4288 unittest.group("obj-schema-GuideCategoryListResponse", () {
4289 unittest.test("to-json--from-json", () {
4290 var o = buildGuideCategoryListResponse();
4291 var od = new api.GuideCategoryListResponse.fromJson(o.toJson());
4292 checkGuideCategoryListResponse(od);
4293 });
4294 });
4295
4296
4297 unittest.group("obj-schema-GuideCategorySnippet", () {
4298 unittest.test("to-json--from-json", () {
4299 var o = buildGuideCategorySnippet();
4300 var od = new api.GuideCategorySnippet.fromJson(o.toJson());
4301 checkGuideCategorySnippet(od);
4302 });
4303 });
4304
4305
4306 unittest.group("obj-schema-I18nLanguage", () {
4307 unittest.test("to-json--from-json", () {
4308 var o = buildI18nLanguage();
4309 var od = new api.I18nLanguage.fromJson(o.toJson());
4310 checkI18nLanguage(od);
4311 });
4312 });
4313
4314
4315 unittest.group("obj-schema-I18nLanguageListResponse", () {
4316 unittest.test("to-json--from-json", () {
4317 var o = buildI18nLanguageListResponse();
4318 var od = new api.I18nLanguageListResponse.fromJson(o.toJson());
4319 checkI18nLanguageListResponse(od);
4320 });
4321 });
4322
4323
4324 unittest.group("obj-schema-I18nLanguageSnippet", () {
4325 unittest.test("to-json--from-json", () {
4326 var o = buildI18nLanguageSnippet();
4327 var od = new api.I18nLanguageSnippet.fromJson(o.toJson());
4328 checkI18nLanguageSnippet(od);
4329 });
4330 });
4331
4332
4333 unittest.group("obj-schema-I18nRegion", () {
4334 unittest.test("to-json--from-json", () {
4335 var o = buildI18nRegion();
4336 var od = new api.I18nRegion.fromJson(o.toJson());
4337 checkI18nRegion(od);
4338 });
4339 });
4340
4341
4342 unittest.group("obj-schema-I18nRegionListResponse", () {
4343 unittest.test("to-json--from-json", () {
4344 var o = buildI18nRegionListResponse();
4345 var od = new api.I18nRegionListResponse.fromJson(o.toJson());
4346 checkI18nRegionListResponse(od);
4347 });
4348 });
4349
4350
4351 unittest.group("obj-schema-I18nRegionSnippet", () {
4352 unittest.test("to-json--from-json", () {
4353 var o = buildI18nRegionSnippet();
4354 var od = new api.I18nRegionSnippet.fromJson(o.toJson());
4355 checkI18nRegionSnippet(od);
4356 });
4357 });
4358
4359
4360 unittest.group("obj-schema-ImageSettings", () {
4361 unittest.test("to-json--from-json", () {
4362 var o = buildImageSettings();
4363 var od = new api.ImageSettings.fromJson(o.toJson());
4364 checkImageSettings(od);
4365 });
4366 });
4367
4368
4369 unittest.group("obj-schema-IngestionInfo", () {
4370 unittest.test("to-json--from-json", () {
4371 var o = buildIngestionInfo();
4372 var od = new api.IngestionInfo.fromJson(o.toJson());
4373 checkIngestionInfo(od);
4374 });
4375 });
4376
4377
4378 unittest.group("obj-schema-InvideoBranding", () {
4379 unittest.test("to-json--from-json", () {
4380 var o = buildInvideoBranding();
4381 var od = new api.InvideoBranding.fromJson(o.toJson());
4382 checkInvideoBranding(od);
4383 });
4384 });
4385
4386
4387 unittest.group("obj-schema-InvideoPosition", () {
4388 unittest.test("to-json--from-json", () {
4389 var o = buildInvideoPosition();
4390 var od = new api.InvideoPosition.fromJson(o.toJson());
4391 checkInvideoPosition(od);
4392 });
4393 });
4394
4395
4396 unittest.group("obj-schema-InvideoPromotion", () {
4397 unittest.test("to-json--from-json", () {
4398 var o = buildInvideoPromotion();
4399 var od = new api.InvideoPromotion.fromJson(o.toJson());
4400 checkInvideoPromotion(od);
4401 });
4402 });
4403
4404
4405 unittest.group("obj-schema-InvideoTiming", () {
4406 unittest.test("to-json--from-json", () {
4407 var o = buildInvideoTiming();
4408 var od = new api.InvideoTiming.fromJson(o.toJson());
4409 checkInvideoTiming(od);
4410 });
4411 });
4412
4413
4414 unittest.group("obj-schema-LiveBroadcast", () {
4415 unittest.test("to-json--from-json", () {
4416 var o = buildLiveBroadcast();
4417 var od = new api.LiveBroadcast.fromJson(o.toJson());
4418 checkLiveBroadcast(od);
4419 });
4420 });
4421
4422
4423 unittest.group("obj-schema-LiveBroadcastContentDetails", () {
4424 unittest.test("to-json--from-json", () {
4425 var o = buildLiveBroadcastContentDetails();
4426 var od = new api.LiveBroadcastContentDetails.fromJson(o.toJson());
4427 checkLiveBroadcastContentDetails(od);
4428 });
4429 });
4430
4431
4432 unittest.group("obj-schema-LiveBroadcastListResponse", () {
4433 unittest.test("to-json--from-json", () {
4434 var o = buildLiveBroadcastListResponse();
4435 var od = new api.LiveBroadcastListResponse.fromJson(o.toJson());
4436 checkLiveBroadcastListResponse(od);
4437 });
4438 });
4439
4440
4441 unittest.group("obj-schema-LiveBroadcastSnippet", () {
4442 unittest.test("to-json--from-json", () {
4443 var o = buildLiveBroadcastSnippet();
4444 var od = new api.LiveBroadcastSnippet.fromJson(o.toJson());
4445 checkLiveBroadcastSnippet(od);
4446 });
4447 });
4448
4449
4450 unittest.group("obj-schema-LiveBroadcastStatus", () {
4451 unittest.test("to-json--from-json", () {
4452 var o = buildLiveBroadcastStatus();
4453 var od = new api.LiveBroadcastStatus.fromJson(o.toJson());
4454 checkLiveBroadcastStatus(od);
4455 });
4456 });
4457
4458
4459 unittest.group("obj-schema-LiveStream", () {
4460 unittest.test("to-json--from-json", () {
4461 var o = buildLiveStream();
4462 var od = new api.LiveStream.fromJson(o.toJson());
4463 checkLiveStream(od);
4464 });
4465 });
4466
4467
4468 unittest.group("obj-schema-LiveStreamContentDetails", () {
4469 unittest.test("to-json--from-json", () {
4470 var o = buildLiveStreamContentDetails();
4471 var od = new api.LiveStreamContentDetails.fromJson(o.toJson());
4472 checkLiveStreamContentDetails(od);
4473 });
4474 });
4475
4476
4477 unittest.group("obj-schema-LiveStreamListResponse", () {
4478 unittest.test("to-json--from-json", () {
4479 var o = buildLiveStreamListResponse();
4480 var od = new api.LiveStreamListResponse.fromJson(o.toJson());
4481 checkLiveStreamListResponse(od);
4482 });
4483 });
4484
4485
4486 unittest.group("obj-schema-LiveStreamSnippet", () {
4487 unittest.test("to-json--from-json", () {
4488 var o = buildLiveStreamSnippet();
4489 var od = new api.LiveStreamSnippet.fromJson(o.toJson());
4490 checkLiveStreamSnippet(od);
4491 });
4492 });
4493
4494
4495 unittest.group("obj-schema-LiveStreamStatus", () {
4496 unittest.test("to-json--from-json", () {
4497 var o = buildLiveStreamStatus();
4498 var od = new api.LiveStreamStatus.fromJson(o.toJson());
4499 checkLiveStreamStatus(od);
4500 });
4501 });
4502
4503
4504 unittest.group("obj-schema-LocalizedProperty", () {
4505 unittest.test("to-json--from-json", () {
4506 var o = buildLocalizedProperty();
4507 var od = new api.LocalizedProperty.fromJson(o.toJson());
4508 checkLocalizedProperty(od);
4509 });
4510 });
4511
4512
4513 unittest.group("obj-schema-LocalizedString", () {
4514 unittest.test("to-json--from-json", () {
4515 var o = buildLocalizedString();
4516 var od = new api.LocalizedString.fromJson(o.toJson());
4517 checkLocalizedString(od);
4518 });
4519 });
4520
4521
4522 unittest.group("obj-schema-MonitorStreamInfo", () {
4523 unittest.test("to-json--from-json", () {
4524 var o = buildMonitorStreamInfo();
4525 var od = new api.MonitorStreamInfo.fromJson(o.toJson());
4526 checkMonitorStreamInfo(od);
4527 });
4528 });
4529
4530
4531 unittest.group("obj-schema-PageInfo", () {
4532 unittest.test("to-json--from-json", () {
4533 var o = buildPageInfo();
4534 var od = new api.PageInfo.fromJson(o.toJson());
4535 checkPageInfo(od);
4536 });
4537 });
4538
4539
4540 unittest.group("obj-schema-Playlist", () {
4541 unittest.test("to-json--from-json", () {
4542 var o = buildPlaylist();
4543 var od = new api.Playlist.fromJson(o.toJson());
4544 checkPlaylist(od);
4545 });
4546 });
4547
4548
4549 unittest.group("obj-schema-PlaylistContentDetails", () {
4550 unittest.test("to-json--from-json", () {
4551 var o = buildPlaylistContentDetails();
4552 var od = new api.PlaylistContentDetails.fromJson(o.toJson());
4553 checkPlaylistContentDetails(od);
4554 });
4555 });
4556
4557
4558 unittest.group("obj-schema-PlaylistItem", () {
4559 unittest.test("to-json--from-json", () {
4560 var o = buildPlaylistItem();
4561 var od = new api.PlaylistItem.fromJson(o.toJson());
4562 checkPlaylistItem(od);
4563 });
4564 });
4565
4566
4567 unittest.group("obj-schema-PlaylistItemContentDetails", () {
4568 unittest.test("to-json--from-json", () {
4569 var o = buildPlaylistItemContentDetails();
4570 var od = new api.PlaylistItemContentDetails.fromJson(o.toJson());
4571 checkPlaylistItemContentDetails(od);
4572 });
4573 });
4574
4575
4576 unittest.group("obj-schema-PlaylistItemListResponse", () {
4577 unittest.test("to-json--from-json", () {
4578 var o = buildPlaylistItemListResponse();
4579 var od = new api.PlaylistItemListResponse.fromJson(o.toJson());
4580 checkPlaylistItemListResponse(od);
4581 });
4582 });
4583
4584
4585 unittest.group("obj-schema-PlaylistItemSnippet", () {
4586 unittest.test("to-json--from-json", () {
4587 var o = buildPlaylistItemSnippet();
4588 var od = new api.PlaylistItemSnippet.fromJson(o.toJson());
4589 checkPlaylistItemSnippet(od);
4590 });
4591 });
4592
4593
4594 unittest.group("obj-schema-PlaylistItemStatus", () {
4595 unittest.test("to-json--from-json", () {
4596 var o = buildPlaylistItemStatus();
4597 var od = new api.PlaylistItemStatus.fromJson(o.toJson());
4598 checkPlaylistItemStatus(od);
4599 });
4600 });
4601
4602
4603 unittest.group("obj-schema-PlaylistListResponse", () {
4604 unittest.test("to-json--from-json", () {
4605 var o = buildPlaylistListResponse();
4606 var od = new api.PlaylistListResponse.fromJson(o.toJson());
4607 checkPlaylistListResponse(od);
4608 });
4609 });
4610
4611
4612 unittest.group("obj-schema-PlaylistPlayer", () {
4613 unittest.test("to-json--from-json", () {
4614 var o = buildPlaylistPlayer();
4615 var od = new api.PlaylistPlayer.fromJson(o.toJson());
4616 checkPlaylistPlayer(od);
4617 });
4618 });
4619
4620
4621 unittest.group("obj-schema-PlaylistSnippet", () {
4622 unittest.test("to-json--from-json", () {
4623 var o = buildPlaylistSnippet();
4624 var od = new api.PlaylistSnippet.fromJson(o.toJson());
4625 checkPlaylistSnippet(od);
4626 });
4627 });
4628
4629
4630 unittest.group("obj-schema-PlaylistStatus", () {
4631 unittest.test("to-json--from-json", () {
4632 var o = buildPlaylistStatus();
4633 var od = new api.PlaylistStatus.fromJson(o.toJson());
4634 checkPlaylistStatus(od);
4635 });
4636 });
4637
4638
4639 unittest.group("obj-schema-PromotedItem", () {
4640 unittest.test("to-json--from-json", () {
4641 var o = buildPromotedItem();
4642 var od = new api.PromotedItem.fromJson(o.toJson());
4643 checkPromotedItem(od);
4644 });
4645 });
4646
4647
4648 unittest.group("obj-schema-PromotedItemId", () {
4649 unittest.test("to-json--from-json", () {
4650 var o = buildPromotedItemId();
4651 var od = new api.PromotedItemId.fromJson(o.toJson());
4652 checkPromotedItemId(od);
4653 });
4654 });
4655
4656
4657 unittest.group("obj-schema-PropertyValue", () {
4658 unittest.test("to-json--from-json", () {
4659 var o = buildPropertyValue();
4660 var od = new api.PropertyValue.fromJson(o.toJson());
4661 checkPropertyValue(od);
4662 });
4663 });
4664
4665
4666 unittest.group("obj-schema-ResourceId", () {
4667 unittest.test("to-json--from-json", () {
4668 var o = buildResourceId();
4669 var od = new api.ResourceId.fromJson(o.toJson());
4670 checkResourceId(od);
4671 });
4672 });
4673
4674
4675 unittest.group("obj-schema-SearchListResponse", () {
4676 unittest.test("to-json--from-json", () {
4677 var o = buildSearchListResponse();
4678 var od = new api.SearchListResponse.fromJson(o.toJson());
4679 checkSearchListResponse(od);
4680 });
4681 });
4682
4683
4684 unittest.group("obj-schema-SearchResult", () {
4685 unittest.test("to-json--from-json", () {
4686 var o = buildSearchResult();
4687 var od = new api.SearchResult.fromJson(o.toJson());
4688 checkSearchResult(od);
4689 });
4690 });
4691
4692
4693 unittest.group("obj-schema-SearchResultSnippet", () {
4694 unittest.test("to-json--from-json", () {
4695 var o = buildSearchResultSnippet();
4696 var od = new api.SearchResultSnippet.fromJson(o.toJson());
4697 checkSearchResultSnippet(od);
4698 });
4699 });
4700
4701
4702 unittest.group("obj-schema-Subscription", () {
4703 unittest.test("to-json--from-json", () {
4704 var o = buildSubscription();
4705 var od = new api.Subscription.fromJson(o.toJson());
4706 checkSubscription(od);
4707 });
4708 });
4709
4710
4711 unittest.group("obj-schema-SubscriptionContentDetails", () {
4712 unittest.test("to-json--from-json", () {
4713 var o = buildSubscriptionContentDetails();
4714 var od = new api.SubscriptionContentDetails.fromJson(o.toJson());
4715 checkSubscriptionContentDetails(od);
4716 });
4717 });
4718
4719
4720 unittest.group("obj-schema-SubscriptionListResponse", () {
4721 unittest.test("to-json--from-json", () {
4722 var o = buildSubscriptionListResponse();
4723 var od = new api.SubscriptionListResponse.fromJson(o.toJson());
4724 checkSubscriptionListResponse(od);
4725 });
4726 });
4727
4728
4729 unittest.group("obj-schema-SubscriptionSnippet", () {
4730 unittest.test("to-json--from-json", () {
4731 var o = buildSubscriptionSnippet();
4732 var od = new api.SubscriptionSnippet.fromJson(o.toJson());
4733 checkSubscriptionSnippet(od);
4734 });
4735 });
4736
4737
4738 unittest.group("obj-schema-SubscriptionSubscriberSnippet", () {
4739 unittest.test("to-json--from-json", () {
4740 var o = buildSubscriptionSubscriberSnippet();
4741 var od = new api.SubscriptionSubscriberSnippet.fromJson(o.toJson());
4742 checkSubscriptionSubscriberSnippet(od);
4743 });
4744 });
4745
4746
4747 unittest.group("obj-schema-Thumbnail", () {
4748 unittest.test("to-json--from-json", () {
4749 var o = buildThumbnail();
4750 var od = new api.Thumbnail.fromJson(o.toJson());
4751 checkThumbnail(od);
4752 });
4753 });
4754
4755
4756 unittest.group("obj-schema-ThumbnailDetails", () {
4757 unittest.test("to-json--from-json", () {
4758 var o = buildThumbnailDetails();
4759 var od = new api.ThumbnailDetails.fromJson(o.toJson());
4760 checkThumbnailDetails(od);
4761 });
4762 });
4763
4764
4765 unittest.group("obj-schema-ThumbnailSetResponse", () {
4766 unittest.test("to-json--from-json", () {
4767 var o = buildThumbnailSetResponse();
4768 var od = new api.ThumbnailSetResponse.fromJson(o.toJson());
4769 checkThumbnailSetResponse(od);
4770 });
4771 });
4772
4773
4774 unittest.group("obj-schema-TokenPagination", () {
4775 unittest.test("to-json--from-json", () {
4776 var o = buildTokenPagination();
4777 var od = new api.TokenPagination.fromJson(o.toJson());
4778 checkTokenPagination(od);
4779 });
4780 });
4781
4782
4783 unittest.group("obj-schema-Video", () {
4784 unittest.test("to-json--from-json", () {
4785 var o = buildVideo();
4786 var od = new api.Video.fromJson(o.toJson());
4787 checkVideo(od);
4788 });
4789 });
4790
4791
4792 unittest.group("obj-schema-VideoAgeGating", () {
4793 unittest.test("to-json--from-json", () {
4794 var o = buildVideoAgeGating();
4795 var od = new api.VideoAgeGating.fromJson(o.toJson());
4796 checkVideoAgeGating(od);
4797 });
4798 });
4799
4800
4801 unittest.group("obj-schema-VideoCategory", () {
4802 unittest.test("to-json--from-json", () {
4803 var o = buildVideoCategory();
4804 var od = new api.VideoCategory.fromJson(o.toJson());
4805 checkVideoCategory(od);
4806 });
4807 });
4808
4809
4810 unittest.group("obj-schema-VideoCategoryListResponse", () {
4811 unittest.test("to-json--from-json", () {
4812 var o = buildVideoCategoryListResponse();
4813 var od = new api.VideoCategoryListResponse.fromJson(o.toJson());
4814 checkVideoCategoryListResponse(od);
4815 });
4816 });
4817
4818
4819 unittest.group("obj-schema-VideoCategorySnippet", () {
4820 unittest.test("to-json--from-json", () {
4821 var o = buildVideoCategorySnippet();
4822 var od = new api.VideoCategorySnippet.fromJson(o.toJson());
4823 checkVideoCategorySnippet(od);
4824 });
4825 });
4826
4827
4828 unittest.group("obj-schema-VideoContentDetails", () {
4829 unittest.test("to-json--from-json", () {
4830 var o = buildVideoContentDetails();
4831 var od = new api.VideoContentDetails.fromJson(o.toJson());
4832 checkVideoContentDetails(od);
4833 });
4834 });
4835
4836
4837 unittest.group("obj-schema-VideoContentDetailsRegionRestriction", () {
4838 unittest.test("to-json--from-json", () {
4839 var o = buildVideoContentDetailsRegionRestriction();
4840 var od = new api.VideoContentDetailsRegionRestriction.fromJson(o.toJson()) ;
4841 checkVideoContentDetailsRegionRestriction(od);
4842 });
4843 });
4844
4845
4846 unittest.group("obj-schema-VideoConversionPing", () {
4847 unittest.test("to-json--from-json", () {
4848 var o = buildVideoConversionPing();
4849 var od = new api.VideoConversionPing.fromJson(o.toJson());
4850 checkVideoConversionPing(od);
4851 });
4852 });
4853
4854
4855 unittest.group("obj-schema-VideoConversionPings", () {
4856 unittest.test("to-json--from-json", () {
4857 var o = buildVideoConversionPings();
4858 var od = new api.VideoConversionPings.fromJson(o.toJson());
4859 checkVideoConversionPings(od);
4860 });
4861 });
4862
4863
4864 unittest.group("obj-schema-VideoFileDetails", () {
4865 unittest.test("to-json--from-json", () {
4866 var o = buildVideoFileDetails();
4867 var od = new api.VideoFileDetails.fromJson(o.toJson());
4868 checkVideoFileDetails(od);
4869 });
4870 });
4871
4872
4873 unittest.group("obj-schema-VideoFileDetailsAudioStream", () {
4874 unittest.test("to-json--from-json", () {
4875 var o = buildVideoFileDetailsAudioStream();
4876 var od = new api.VideoFileDetailsAudioStream.fromJson(o.toJson());
4877 checkVideoFileDetailsAudioStream(od);
4878 });
4879 });
4880
4881
4882 unittest.group("obj-schema-VideoFileDetailsVideoStream", () {
4883 unittest.test("to-json--from-json", () {
4884 var o = buildVideoFileDetailsVideoStream();
4885 var od = new api.VideoFileDetailsVideoStream.fromJson(o.toJson());
4886 checkVideoFileDetailsVideoStream(od);
4887 });
4888 });
4889
4890
4891 unittest.group("obj-schema-VideoGetRatingResponse", () {
4892 unittest.test("to-json--from-json", () {
4893 var o = buildVideoGetRatingResponse();
4894 var od = new api.VideoGetRatingResponse.fromJson(o.toJson());
4895 checkVideoGetRatingResponse(od);
4896 });
4897 });
4898
4899
4900 unittest.group("obj-schema-VideoListResponse", () {
4901 unittest.test("to-json--from-json", () {
4902 var o = buildVideoListResponse();
4903 var od = new api.VideoListResponse.fromJson(o.toJson());
4904 checkVideoListResponse(od);
4905 });
4906 });
4907
4908
4909 unittest.group("obj-schema-VideoLiveStreamingDetails", () {
4910 unittest.test("to-json--from-json", () {
4911 var o = buildVideoLiveStreamingDetails();
4912 var od = new api.VideoLiveStreamingDetails.fromJson(o.toJson());
4913 checkVideoLiveStreamingDetails(od);
4914 });
4915 });
4916
4917
4918 unittest.group("obj-schema-VideoMonetizationDetails", () {
4919 unittest.test("to-json--from-json", () {
4920 var o = buildVideoMonetizationDetails();
4921 var od = new api.VideoMonetizationDetails.fromJson(o.toJson());
4922 checkVideoMonetizationDetails(od);
4923 });
4924 });
4925
4926
4927 unittest.group("obj-schema-VideoPlayer", () {
4928 unittest.test("to-json--from-json", () {
4929 var o = buildVideoPlayer();
4930 var od = new api.VideoPlayer.fromJson(o.toJson());
4931 checkVideoPlayer(od);
4932 });
4933 });
4934
4935
4936 unittest.group("obj-schema-VideoProcessingDetails", () {
4937 unittest.test("to-json--from-json", () {
4938 var o = buildVideoProcessingDetails();
4939 var od = new api.VideoProcessingDetails.fromJson(o.toJson());
4940 checkVideoProcessingDetails(od);
4941 });
4942 });
4943
4944
4945 unittest.group("obj-schema-VideoProcessingDetailsProcessingProgress", () {
4946 unittest.test("to-json--from-json", () {
4947 var o = buildVideoProcessingDetailsProcessingProgress();
4948 var od = new api.VideoProcessingDetailsProcessingProgress.fromJson(o.toJso n());
4949 checkVideoProcessingDetailsProcessingProgress(od);
4950 });
4951 });
4952
4953
4954 unittest.group("obj-schema-VideoProjectDetails", () {
4955 unittest.test("to-json--from-json", () {
4956 var o = buildVideoProjectDetails();
4957 var od = new api.VideoProjectDetails.fromJson(o.toJson());
4958 checkVideoProjectDetails(od);
4959 });
4960 });
4961
4962
4963 unittest.group("obj-schema-VideoRating", () {
4964 unittest.test("to-json--from-json", () {
4965 var o = buildVideoRating();
4966 var od = new api.VideoRating.fromJson(o.toJson());
4967 checkVideoRating(od);
4968 });
4969 });
4970
4971
4972 unittest.group("obj-schema-VideoRecordingDetails", () {
4973 unittest.test("to-json--from-json", () {
4974 var o = buildVideoRecordingDetails();
4975 var od = new api.VideoRecordingDetails.fromJson(o.toJson());
4976 checkVideoRecordingDetails(od);
4977 });
4978 });
4979
4980
4981 unittest.group("obj-schema-VideoSnippet", () {
4982 unittest.test("to-json--from-json", () {
4983 var o = buildVideoSnippet();
4984 var od = new api.VideoSnippet.fromJson(o.toJson());
4985 checkVideoSnippet(od);
4986 });
4987 });
4988
4989
4990 unittest.group("obj-schema-VideoStatistics", () {
4991 unittest.test("to-json--from-json", () {
4992 var o = buildVideoStatistics();
4993 var od = new api.VideoStatistics.fromJson(o.toJson());
4994 checkVideoStatistics(od);
4995 });
4996 });
4997
4998
4999 unittest.group("obj-schema-VideoStatus", () {
5000 unittest.test("to-json--from-json", () {
5001 var o = buildVideoStatus();
5002 var od = new api.VideoStatus.fromJson(o.toJson());
5003 checkVideoStatus(od);
5004 });
5005 });
5006
5007
5008 unittest.group("obj-schema-VideoSuggestions", () {
5009 unittest.test("to-json--from-json", () {
5010 var o = buildVideoSuggestions();
5011 var od = new api.VideoSuggestions.fromJson(o.toJson());
5012 checkVideoSuggestions(od);
5013 });
5014 });
5015
5016
5017 unittest.group("obj-schema-VideoSuggestionsTagSuggestion", () {
5018 unittest.test("to-json--from-json", () {
5019 var o = buildVideoSuggestionsTagSuggestion();
5020 var od = new api.VideoSuggestionsTagSuggestion.fromJson(o.toJson());
5021 checkVideoSuggestionsTagSuggestion(od);
5022 });
5023 });
5024
5025
5026 unittest.group("obj-schema-VideoTopicDetails", () {
5027 unittest.test("to-json--from-json", () {
5028 var o = buildVideoTopicDetails();
5029 var od = new api.VideoTopicDetails.fromJson(o.toJson());
5030 checkVideoTopicDetails(od);
5031 });
5032 });
5033
5034
5035 unittest.group("obj-schema-WatchSettings", () {
5036 unittest.test("to-json--from-json", () {
5037 var o = buildWatchSettings();
5038 var od = new api.WatchSettings.fromJson(o.toJson());
5039 checkWatchSettings(od);
5040 });
5041 });
5042
5043
5044 unittest.group("resource-ActivitiesResourceApi", () {
5045 unittest.test("method--insert", () {
5046
5047 var mock = new common_test.HttpServerMock();
5048 api.ActivitiesResourceApi res = new api.YoutubeApi(mock).activities;
5049 var arg_request = buildActivity();
5050 var arg_part = "foo";
5051 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5052 var obj = new api.Activity.fromJson(json);
5053 checkActivity(obj);
5054
5055 var path = (req.url).path;
5056 var pathOffset = 0;
5057 var index;
5058 var subPart;
5059 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5060 pathOffset += 12;
5061 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("activities"));
5062 pathOffset += 10;
5063
5064 var query = (req.url).query;
5065 var queryOffset = 0;
5066 var queryMap = {};
5067 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5068 parseBool(n) {
5069 if (n == "true") return true;
5070 if (n == "false") return false;
5071 if (n == null) return null;
5072 throw new core.ArgumentError("Invalid boolean: $n");
5073 }
5074 if (query.length > 0) {
5075 for (var part in query.split("&")) {
5076 var keyvalue = part.split("=");
5077 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5078 }
5079 }
5080 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5081
5082
5083 var h = {
5084 "content-type" : "application/json; charset=utf-8",
5085 };
5086 var resp = convert.JSON.encode(buildActivity());
5087 return new async.Future.value(common_test.stringResponse(200, h, resp));
5088 }), true);
5089 res.insert(arg_request, arg_part).then(unittest.expectAsync(((api.Activity response) {
5090 checkActivity(response);
5091 })));
5092 });
5093
5094 unittest.test("method--list", () {
5095
5096 var mock = new common_test.HttpServerMock();
5097 api.ActivitiesResourceApi res = new api.YoutubeApi(mock).activities;
5098 var arg_part = "foo";
5099 var arg_channelId = "foo";
5100 var arg_home = true;
5101 var arg_maxResults = 42;
5102 var arg_mine = true;
5103 var arg_pageToken = "foo";
5104 var arg_publishedAfter = core.DateTime.parse("2002-02-27T14:01:02");
5105 var arg_publishedBefore = core.DateTime.parse("2002-02-27T14:01:02");
5106 var arg_regionCode = "foo";
5107 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5108 var path = (req.url).path;
5109 var pathOffset = 0;
5110 var index;
5111 var subPart;
5112 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5113 pathOffset += 12;
5114 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("activities"));
5115 pathOffset += 10;
5116
5117 var query = (req.url).query;
5118 var queryOffset = 0;
5119 var queryMap = {};
5120 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5121 parseBool(n) {
5122 if (n == "true") return true;
5123 if (n == "false") return false;
5124 if (n == null) return null;
5125 throw new core.ArgumentError("Invalid boolean: $n");
5126 }
5127 if (query.length > 0) {
5128 for (var part in query.split("&")) {
5129 var keyvalue = part.split("=");
5130 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5131 }
5132 }
5133 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5134 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
5135 unittest.expect(queryMap["home"].first, unittest.equals("$arg_home"));
5136 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
5137 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
5138 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
5139 unittest.expect(core.DateTime.parse(queryMap["publishedAfter"].first), u nittest.equals(arg_publishedAfter));
5140 unittest.expect(core.DateTime.parse(queryMap["publishedBefore"].first), unittest.equals(arg_publishedBefore));
5141 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region Code));
5142
5143
5144 var h = {
5145 "content-type" : "application/json; charset=utf-8",
5146 };
5147 var resp = convert.JSON.encode(buildActivityListResponse());
5148 return new async.Future.value(common_test.stringResponse(200, h, resp));
5149 }), true);
5150 res.list(arg_part, channelId: arg_channelId, home: arg_home, maxResults: a rg_maxResults, mine: arg_mine, pageToken: arg_pageToken, publishedAfter: arg_pub lishedAfter, publishedBefore: arg_publishedBefore, regionCode: arg_regionCode).t hen(unittest.expectAsync(((api.ActivityListResponse response) {
5151 checkActivityListResponse(response);
5152 })));
5153 });
5154
5155 });
5156
5157
5158 unittest.group("resource-ChannelBannersResourceApi", () {
5159 unittest.test("method--insert", () {
5160 // TODO: Implement tests for media upload;
5161 // TODO: Implement tests for media download;
5162
5163 var mock = new common_test.HttpServerMock();
5164 api.ChannelBannersResourceApi res = new api.YoutubeApi(mock).channelBanner s;
5165 var arg_request = buildChannelBannerResource();
5166 var arg_onBehalfOfContentOwner = "foo";
5167 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5168 var obj = new api.ChannelBannerResource.fromJson(json);
5169 checkChannelBannerResource(obj);
5170
5171 var path = (req.url).path;
5172 var pathOffset = 0;
5173 var index;
5174 var subPart;
5175 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5176 pathOffset += 12;
5177 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("channelBanners/insert"));
5178 pathOffset += 21;
5179
5180 var query = (req.url).query;
5181 var queryOffset = 0;
5182 var queryMap = {};
5183 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5184 parseBool(n) {
5185 if (n == "true") return true;
5186 if (n == "false") return false;
5187 if (n == null) return null;
5188 throw new core.ArgumentError("Invalid boolean: $n");
5189 }
5190 if (query.length > 0) {
5191 for (var part in query.split("&")) {
5192 var keyvalue = part.split("=");
5193 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5194 }
5195 }
5196 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5197
5198
5199 var h = {
5200 "content-type" : "application/json; charset=utf-8",
5201 };
5202 var resp = convert.JSON.encode(buildChannelBannerResource());
5203 return new async.Future.value(common_test.stringResponse(200, h, resp));
5204 }), true);
5205 res.insert(arg_request, onBehalfOfContentOwner: arg_onBehalfOfContentOwner ).then(unittest.expectAsync(((api.ChannelBannerResource response) {
5206 checkChannelBannerResource(response);
5207 })));
5208 });
5209
5210 });
5211
5212
5213 unittest.group("resource-ChannelSectionsResourceApi", () {
5214 unittest.test("method--delete", () {
5215
5216 var mock = new common_test.HttpServerMock();
5217 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti ons;
5218 var arg_id = "foo";
5219 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5220 var path = (req.url).path;
5221 var pathOffset = 0;
5222 var index;
5223 var subPart;
5224 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5225 pathOffset += 12;
5226 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("channelSections"));
5227 pathOffset += 15;
5228
5229 var query = (req.url).query;
5230 var queryOffset = 0;
5231 var queryMap = {};
5232 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5233 parseBool(n) {
5234 if (n == "true") return true;
5235 if (n == "false") return false;
5236 if (n == null) return null;
5237 throw new core.ArgumentError("Invalid boolean: $n");
5238 }
5239 if (query.length > 0) {
5240 for (var part in query.split("&")) {
5241 var keyvalue = part.split("=");
5242 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5243 }
5244 }
5245 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5246
5247
5248 var h = {
5249 "content-type" : "application/json; charset=utf-8",
5250 };
5251 var resp = "";
5252 return new async.Future.value(common_test.stringResponse(200, h, resp));
5253 }), true);
5254 res.delete(arg_id).then(unittest.expectAsync((_) {}));
5255 });
5256
5257 unittest.test("method--insert", () {
5258
5259 var mock = new common_test.HttpServerMock();
5260 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti ons;
5261 var arg_request = buildChannelSection();
5262 var arg_part = "foo";
5263 var arg_onBehalfOfContentOwner = "foo";
5264 var arg_onBehalfOfContentOwnerChannel = "foo";
5265 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5266 var obj = new api.ChannelSection.fromJson(json);
5267 checkChannelSection(obj);
5268
5269 var path = (req.url).path;
5270 var pathOffset = 0;
5271 var index;
5272 var subPart;
5273 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5274 pathOffset += 12;
5275 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("channelSections"));
5276 pathOffset += 15;
5277
5278 var query = (req.url).query;
5279 var queryOffset = 0;
5280 var queryMap = {};
5281 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5282 parseBool(n) {
5283 if (n == "true") return true;
5284 if (n == "false") return false;
5285 if (n == null) return null;
5286 throw new core.ArgumentError("Invalid boolean: $n");
5287 }
5288 if (query.length > 0) {
5289 for (var part in query.split("&")) {
5290 var keyvalue = part.split("=");
5291 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5292 }
5293 }
5294 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5295 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5296 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
5297
5298
5299 var h = {
5300 "content-type" : "application/json; charset=utf-8",
5301 };
5302 var resp = convert.JSON.encode(buildChannelSection());
5303 return new async.Future.value(common_test.stringResponse(200, h, resp));
5304 }), true);
5305 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th en(unittest.expectAsync(((api.ChannelSection response) {
5306 checkChannelSection(response);
5307 })));
5308 });
5309
5310 unittest.test("method--list", () {
5311
5312 var mock = new common_test.HttpServerMock();
5313 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti ons;
5314 var arg_part = "foo";
5315 var arg_channelId = "foo";
5316 var arg_id = "foo";
5317 var arg_mine = true;
5318 var arg_onBehalfOfContentOwner = "foo";
5319 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5320 var path = (req.url).path;
5321 var pathOffset = 0;
5322 var index;
5323 var subPart;
5324 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5325 pathOffset += 12;
5326 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("channelSections"));
5327 pathOffset += 15;
5328
5329 var query = (req.url).query;
5330 var queryOffset = 0;
5331 var queryMap = {};
5332 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5333 parseBool(n) {
5334 if (n == "true") return true;
5335 if (n == "false") return false;
5336 if (n == null) return null;
5337 throw new core.ArgumentError("Invalid boolean: $n");
5338 }
5339 if (query.length > 0) {
5340 for (var part in query.split("&")) {
5341 var keyvalue = part.split("=");
5342 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5343 }
5344 }
5345 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5346 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
5347 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5348 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
5349 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5350
5351
5352 var h = {
5353 "content-type" : "application/json; charset=utf-8",
5354 };
5355 var resp = convert.JSON.encode(buildChannelSectionListResponse());
5356 return new async.Future.value(common_test.stringResponse(200, h, resp));
5357 }), true);
5358 res.list(arg_part, channelId: arg_channelId, id: arg_id, mine: arg_mine, o nBehalfOfContentOwner: arg_onBehalfOfContentOwner).then(unittest.expectAsync(((a pi.ChannelSectionListResponse response) {
5359 checkChannelSectionListResponse(response);
5360 })));
5361 });
5362
5363 unittest.test("method--update", () {
5364
5365 var mock = new common_test.HttpServerMock();
5366 api.ChannelSectionsResourceApi res = new api.YoutubeApi(mock).channelSecti ons;
5367 var arg_request = buildChannelSection();
5368 var arg_part = "foo";
5369 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5370 var obj = new api.ChannelSection.fromJson(json);
5371 checkChannelSection(obj);
5372
5373 var path = (req.url).path;
5374 var pathOffset = 0;
5375 var index;
5376 var subPart;
5377 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5378 pathOffset += 12;
5379 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("channelSections"));
5380 pathOffset += 15;
5381
5382 var query = (req.url).query;
5383 var queryOffset = 0;
5384 var queryMap = {};
5385 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5386 parseBool(n) {
5387 if (n == "true") return true;
5388 if (n == "false") return false;
5389 if (n == null) return null;
5390 throw new core.ArgumentError("Invalid boolean: $n");
5391 }
5392 if (query.length > 0) {
5393 for (var part in query.split("&")) {
5394 var keyvalue = part.split("=");
5395 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5396 }
5397 }
5398 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5399
5400
5401 var h = {
5402 "content-type" : "application/json; charset=utf-8",
5403 };
5404 var resp = convert.JSON.encode(buildChannelSection());
5405 return new async.Future.value(common_test.stringResponse(200, h, resp));
5406 }), true);
5407 res.update(arg_request, arg_part).then(unittest.expectAsync(((api.ChannelS ection response) {
5408 checkChannelSection(response);
5409 })));
5410 });
5411
5412 });
5413
5414
5415 unittest.group("resource-ChannelsResourceApi", () {
5416 unittest.test("method--list", () {
5417
5418 var mock = new common_test.HttpServerMock();
5419 api.ChannelsResourceApi res = new api.YoutubeApi(mock).channels;
5420 var arg_part = "foo";
5421 var arg_categoryId = "foo";
5422 var arg_forUsername = "foo";
5423 var arg_id = "foo";
5424 var arg_managedByMe = true;
5425 var arg_maxResults = 42;
5426 var arg_mine = true;
5427 var arg_mySubscribers = true;
5428 var arg_onBehalfOfContentOwner = "foo";
5429 var arg_pageToken = "foo";
5430 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5431 var path = (req.url).path;
5432 var pathOffset = 0;
5433 var index;
5434 var subPart;
5435 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5436 pathOffset += 12;
5437 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("channels"));
5438 pathOffset += 8;
5439
5440 var query = (req.url).query;
5441 var queryOffset = 0;
5442 var queryMap = {};
5443 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5444 parseBool(n) {
5445 if (n == "true") return true;
5446 if (n == "false") return false;
5447 if (n == null) return null;
5448 throw new core.ArgumentError("Invalid boolean: $n");
5449 }
5450 if (query.length > 0) {
5451 for (var part in query.split("&")) {
5452 var keyvalue = part.split("=");
5453 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5454 }
5455 }
5456 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5457 unittest.expect(queryMap["categoryId"].first, unittest.equals(arg_catego ryId));
5458 unittest.expect(queryMap["forUsername"].first, unittest.equals(arg_forUs ername));
5459 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5460 unittest.expect(queryMap["managedByMe"].first, unittest.equals("$arg_man agedByMe"));
5461 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
5462 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
5463 unittest.expect(queryMap["mySubscribers"].first, unittest.equals("$arg_m ySubscribers"));
5464 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5465 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
5466
5467
5468 var h = {
5469 "content-type" : "application/json; charset=utf-8",
5470 };
5471 var resp = convert.JSON.encode(buildChannelListResponse());
5472 return new async.Future.value(common_test.stringResponse(200, h, resp));
5473 }), true);
5474 res.list(arg_part, categoryId: arg_categoryId, forUsername: arg_forUsernam e, id: arg_id, managedByMe: arg_managedByMe, maxResults: arg_maxResults, mine: a rg_mine, mySubscribers: arg_mySubscribers, onBehalfOfContentOwner: arg_onBehalfO fContentOwner, pageToken: arg_pageToken).then(unittest.expectAsync(((api.Channel ListResponse response) {
5475 checkChannelListResponse(response);
5476 })));
5477 });
5478
5479 unittest.test("method--update", () {
5480
5481 var mock = new common_test.HttpServerMock();
5482 api.ChannelsResourceApi res = new api.YoutubeApi(mock).channels;
5483 var arg_request = buildChannel();
5484 var arg_part = "foo";
5485 var arg_onBehalfOfContentOwner = "foo";
5486 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5487 var obj = new api.Channel.fromJson(json);
5488 checkChannel(obj);
5489
5490 var path = (req.url).path;
5491 var pathOffset = 0;
5492 var index;
5493 var subPart;
5494 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5495 pathOffset += 12;
5496 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("channels"));
5497 pathOffset += 8;
5498
5499 var query = (req.url).query;
5500 var queryOffset = 0;
5501 var queryMap = {};
5502 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5503 parseBool(n) {
5504 if (n == "true") return true;
5505 if (n == "false") return false;
5506 if (n == null) return null;
5507 throw new core.ArgumentError("Invalid boolean: $n");
5508 }
5509 if (query.length > 0) {
5510 for (var part in query.split("&")) {
5511 var keyvalue = part.split("=");
5512 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5513 }
5514 }
5515 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5516 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5517
5518
5519 var h = {
5520 "content-type" : "application/json; charset=utf-8",
5521 };
5522 var resp = convert.JSON.encode(buildChannel());
5523 return new async.Future.value(common_test.stringResponse(200, h, resp));
5524 }), true);
5525 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner).then(unittest.expectAsync(((api.Channel response) {
5526 checkChannel(response);
5527 })));
5528 });
5529
5530 });
5531
5532
5533 unittest.group("resource-GuideCategoriesResourceApi", () {
5534 unittest.test("method--list", () {
5535
5536 var mock = new common_test.HttpServerMock();
5537 api.GuideCategoriesResourceApi res = new api.YoutubeApi(mock).guideCategor ies;
5538 var arg_part = "foo";
5539 var arg_hl = "foo";
5540 var arg_id = "foo";
5541 var arg_regionCode = "foo";
5542 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5543 var path = (req.url).path;
5544 var pathOffset = 0;
5545 var index;
5546 var subPart;
5547 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5548 pathOffset += 12;
5549 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("guideCategories"));
5550 pathOffset += 15;
5551
5552 var query = (req.url).query;
5553 var queryOffset = 0;
5554 var queryMap = {};
5555 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5556 parseBool(n) {
5557 if (n == "true") return true;
5558 if (n == "false") return false;
5559 if (n == null) return null;
5560 throw new core.ArgumentError("Invalid boolean: $n");
5561 }
5562 if (query.length > 0) {
5563 for (var part in query.split("&")) {
5564 var keyvalue = part.split("=");
5565 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5566 }
5567 }
5568 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5569 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl));
5570 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5571 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region Code));
5572
5573
5574 var h = {
5575 "content-type" : "application/json; charset=utf-8",
5576 };
5577 var resp = convert.JSON.encode(buildGuideCategoryListResponse());
5578 return new async.Future.value(common_test.stringResponse(200, h, resp));
5579 }), true);
5580 res.list(arg_part, hl: arg_hl, id: arg_id, regionCode: arg_regionCode).the n(unittest.expectAsync(((api.GuideCategoryListResponse response) {
5581 checkGuideCategoryListResponse(response);
5582 })));
5583 });
5584
5585 });
5586
5587
5588 unittest.group("resource-I18nLanguagesResourceApi", () {
5589 unittest.test("method--list", () {
5590
5591 var mock = new common_test.HttpServerMock();
5592 api.I18nLanguagesResourceApi res = new api.YoutubeApi(mock).i18nLanguages;
5593 var arg_part = "foo";
5594 var arg_hl = "foo";
5595 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5596 var path = (req.url).path;
5597 var pathOffset = 0;
5598 var index;
5599 var subPart;
5600 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5601 pathOffset += 12;
5602 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("i18nLanguages"));
5603 pathOffset += 13;
5604
5605 var query = (req.url).query;
5606 var queryOffset = 0;
5607 var queryMap = {};
5608 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5609 parseBool(n) {
5610 if (n == "true") return true;
5611 if (n == "false") return false;
5612 if (n == null) return null;
5613 throw new core.ArgumentError("Invalid boolean: $n");
5614 }
5615 if (query.length > 0) {
5616 for (var part in query.split("&")) {
5617 var keyvalue = part.split("=");
5618 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5619 }
5620 }
5621 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5622 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl));
5623
5624
5625 var h = {
5626 "content-type" : "application/json; charset=utf-8",
5627 };
5628 var resp = convert.JSON.encode(buildI18nLanguageListResponse());
5629 return new async.Future.value(common_test.stringResponse(200, h, resp));
5630 }), true);
5631 res.list(arg_part, hl: arg_hl).then(unittest.expectAsync(((api.I18nLanguag eListResponse response) {
5632 checkI18nLanguageListResponse(response);
5633 })));
5634 });
5635
5636 });
5637
5638
5639 unittest.group("resource-I18nRegionsResourceApi", () {
5640 unittest.test("method--list", () {
5641
5642 var mock = new common_test.HttpServerMock();
5643 api.I18nRegionsResourceApi res = new api.YoutubeApi(mock).i18nRegions;
5644 var arg_part = "foo";
5645 var arg_hl = "foo";
5646 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5647 var path = (req.url).path;
5648 var pathOffset = 0;
5649 var index;
5650 var subPart;
5651 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5652 pathOffset += 12;
5653 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("i18nRegions"));
5654 pathOffset += 11;
5655
5656 var query = (req.url).query;
5657 var queryOffset = 0;
5658 var queryMap = {};
5659 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5660 parseBool(n) {
5661 if (n == "true") return true;
5662 if (n == "false") return false;
5663 if (n == null) return null;
5664 throw new core.ArgumentError("Invalid boolean: $n");
5665 }
5666 if (query.length > 0) {
5667 for (var part in query.split("&")) {
5668 var keyvalue = part.split("=");
5669 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5670 }
5671 }
5672 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5673 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl));
5674
5675
5676 var h = {
5677 "content-type" : "application/json; charset=utf-8",
5678 };
5679 var resp = convert.JSON.encode(buildI18nRegionListResponse());
5680 return new async.Future.value(common_test.stringResponse(200, h, resp));
5681 }), true);
5682 res.list(arg_part, hl: arg_hl).then(unittest.expectAsync(((api.I18nRegionL istResponse response) {
5683 checkI18nRegionListResponse(response);
5684 })));
5685 });
5686
5687 });
5688
5689
5690 unittest.group("resource-LiveBroadcastsResourceApi", () {
5691 unittest.test("method--bind", () {
5692
5693 var mock = new common_test.HttpServerMock();
5694 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
5695 var arg_id = "foo";
5696 var arg_part = "foo";
5697 var arg_onBehalfOfContentOwner = "foo";
5698 var arg_onBehalfOfContentOwnerChannel = "foo";
5699 var arg_streamId = "foo";
5700 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5701 var path = (req.url).path;
5702 var pathOffset = 0;
5703 var index;
5704 var subPart;
5705 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5706 pathOffset += 12;
5707 unittest.expect(path.substring(pathOffset, pathOffset + 19), unittest.eq uals("liveBroadcasts/bind"));
5708 pathOffset += 19;
5709
5710 var query = (req.url).query;
5711 var queryOffset = 0;
5712 var queryMap = {};
5713 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5714 parseBool(n) {
5715 if (n == "true") return true;
5716 if (n == "false") return false;
5717 if (n == null) return null;
5718 throw new core.ArgumentError("Invalid boolean: $n");
5719 }
5720 if (query.length > 0) {
5721 for (var part in query.split("&")) {
5722 var keyvalue = part.split("=");
5723 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5724 }
5725 }
5726 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5727 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5728 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5729 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
5730 unittest.expect(queryMap["streamId"].first, unittest.equals(arg_streamId ));
5731
5732
5733 var h = {
5734 "content-type" : "application/json; charset=utf-8",
5735 };
5736 var resp = convert.JSON.encode(buildLiveBroadcast());
5737 return new async.Future.value(common_test.stringResponse(200, h, resp));
5738 }), true);
5739 res.bind(arg_id, arg_part, onBehalfOfContentOwner: arg_onBehalfOfContentOw ner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, streamId: arg_streamId).then(unittest.expectAsync(((api.LiveBroadcast response) {
5740 checkLiveBroadcast(response);
5741 })));
5742 });
5743
5744 unittest.test("method--control", () {
5745
5746 var mock = new common_test.HttpServerMock();
5747 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
5748 var arg_id = "foo";
5749 var arg_part = "foo";
5750 var arg_displaySlate = true;
5751 var arg_offsetTimeMs = "foo";
5752 var arg_onBehalfOfContentOwner = "foo";
5753 var arg_onBehalfOfContentOwnerChannel = "foo";
5754 var arg_walltime = core.DateTime.parse("2002-02-27T14:01:02");
5755 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5756 var path = (req.url).path;
5757 var pathOffset = 0;
5758 var index;
5759 var subPart;
5760 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5761 pathOffset += 12;
5762 unittest.expect(path.substring(pathOffset, pathOffset + 22), unittest.eq uals("liveBroadcasts/control"));
5763 pathOffset += 22;
5764
5765 var query = (req.url).query;
5766 var queryOffset = 0;
5767 var queryMap = {};
5768 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5769 parseBool(n) {
5770 if (n == "true") return true;
5771 if (n == "false") return false;
5772 if (n == null) return null;
5773 throw new core.ArgumentError("Invalid boolean: $n");
5774 }
5775 if (query.length > 0) {
5776 for (var part in query.split("&")) {
5777 var keyvalue = part.split("=");
5778 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5779 }
5780 }
5781 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5782 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5783 unittest.expect(queryMap["displaySlate"].first, unittest.equals("$arg_di splaySlate"));
5784 unittest.expect(queryMap["offsetTimeMs"].first, unittest.equals(arg_offs etTimeMs));
5785 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5786 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
5787 unittest.expect(core.DateTime.parse(queryMap["walltime"].first), unittes t.equals(arg_walltime));
5788
5789
5790 var h = {
5791 "content-type" : "application/json; charset=utf-8",
5792 };
5793 var resp = convert.JSON.encode(buildLiveBroadcast());
5794 return new async.Future.value(common_test.stringResponse(200, h, resp));
5795 }), true);
5796 res.control(arg_id, arg_part, displaySlate: arg_displaySlate, offsetTimeMs : arg_offsetTimeMs, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onBehalf OfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, walltime: arg_walltime ).then(unittest.expectAsync(((api.LiveBroadcast response) {
5797 checkLiveBroadcast(response);
5798 })));
5799 });
5800
5801 unittest.test("method--delete", () {
5802
5803 var mock = new common_test.HttpServerMock();
5804 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
5805 var arg_id = "foo";
5806 var arg_onBehalfOfContentOwner = "foo";
5807 var arg_onBehalfOfContentOwnerChannel = "foo";
5808 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5809 var path = (req.url).path;
5810 var pathOffset = 0;
5811 var index;
5812 var subPart;
5813 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5814 pathOffset += 12;
5815 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("liveBroadcasts"));
5816 pathOffset += 14;
5817
5818 var query = (req.url).query;
5819 var queryOffset = 0;
5820 var queryMap = {};
5821 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5822 parseBool(n) {
5823 if (n == "true") return true;
5824 if (n == "false") return false;
5825 if (n == null) return null;
5826 throw new core.ArgumentError("Invalid boolean: $n");
5827 }
5828 if (query.length > 0) {
5829 for (var part in query.split("&")) {
5830 var keyvalue = part.split("=");
5831 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5832 }
5833 }
5834 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5835 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5836 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
5837
5838
5839 var h = {
5840 "content-type" : "application/json; charset=utf-8",
5841 };
5842 var resp = "";
5843 return new async.Future.value(common_test.stringResponse(200, h, resp));
5844 }), true);
5845 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onB ehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).then(unittest.exp ectAsync((_) {}));
5846 });
5847
5848 unittest.test("method--insert", () {
5849
5850 var mock = new common_test.HttpServerMock();
5851 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
5852 var arg_request = buildLiveBroadcast();
5853 var arg_part = "foo";
5854 var arg_onBehalfOfContentOwner = "foo";
5855 var arg_onBehalfOfContentOwnerChannel = "foo";
5856 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5857 var obj = new api.LiveBroadcast.fromJson(json);
5858 checkLiveBroadcast(obj);
5859
5860 var path = (req.url).path;
5861 var pathOffset = 0;
5862 var index;
5863 var subPart;
5864 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5865 pathOffset += 12;
5866 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("liveBroadcasts"));
5867 pathOffset += 14;
5868
5869 var query = (req.url).query;
5870 var queryOffset = 0;
5871 var queryMap = {};
5872 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5873 parseBool(n) {
5874 if (n == "true") return true;
5875 if (n == "false") return false;
5876 if (n == null) return null;
5877 throw new core.ArgumentError("Invalid boolean: $n");
5878 }
5879 if (query.length > 0) {
5880 for (var part in query.split("&")) {
5881 var keyvalue = part.split("=");
5882 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5883 }
5884 }
5885 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5886 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5887 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
5888
5889
5890 var h = {
5891 "content-type" : "application/json; charset=utf-8",
5892 };
5893 var resp = convert.JSON.encode(buildLiveBroadcast());
5894 return new async.Future.value(common_test.stringResponse(200, h, resp));
5895 }), true);
5896 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th en(unittest.expectAsync(((api.LiveBroadcast response) {
5897 checkLiveBroadcast(response);
5898 })));
5899 });
5900
5901 unittest.test("method--list", () {
5902
5903 var mock = new common_test.HttpServerMock();
5904 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
5905 var arg_part = "foo";
5906 var arg_broadcastStatus = "foo";
5907 var arg_id = "foo";
5908 var arg_maxResults = 42;
5909 var arg_mine = true;
5910 var arg_onBehalfOfContentOwner = "foo";
5911 var arg_onBehalfOfContentOwnerChannel = "foo";
5912 var arg_pageToken = "foo";
5913 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5914 var path = (req.url).path;
5915 var pathOffset = 0;
5916 var index;
5917 var subPart;
5918 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5919 pathOffset += 12;
5920 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("liveBroadcasts"));
5921 pathOffset += 14;
5922
5923 var query = (req.url).query;
5924 var queryOffset = 0;
5925 var queryMap = {};
5926 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5927 parseBool(n) {
5928 if (n == "true") return true;
5929 if (n == "false") return false;
5930 if (n == null) return null;
5931 throw new core.ArgumentError("Invalid boolean: $n");
5932 }
5933 if (query.length > 0) {
5934 for (var part in query.split("&")) {
5935 var keyvalue = part.split("=");
5936 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5937 }
5938 }
5939 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5940 unittest.expect(queryMap["broadcastStatus"].first, unittest.equals(arg_b roadcastStatus));
5941 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5942 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
5943 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
5944 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5945 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
5946 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
5947
5948
5949 var h = {
5950 "content-type" : "application/json; charset=utf-8",
5951 };
5952 var resp = convert.JSON.encode(buildLiveBroadcastListResponse());
5953 return new async.Future.value(common_test.stringResponse(200, h, resp));
5954 }), true);
5955 res.list(arg_part, broadcastStatus: arg_broadcastStatus, id: arg_id, maxRe sults: arg_maxResults, mine: arg_mine, onBehalfOfContentOwner: arg_onBehalfOfCon tentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, pag eToken: arg_pageToken).then(unittest.expectAsync(((api.LiveBroadcastListResponse response) {
5956 checkLiveBroadcastListResponse(response);
5957 })));
5958 });
5959
5960 unittest.test("method--transition", () {
5961
5962 var mock = new common_test.HttpServerMock();
5963 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
5964 var arg_broadcastStatus = "foo";
5965 var arg_id = "foo";
5966 var arg_part = "foo";
5967 var arg_onBehalfOfContentOwner = "foo";
5968 var arg_onBehalfOfContentOwnerChannel = "foo";
5969 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
5970 var path = (req.url).path;
5971 var pathOffset = 0;
5972 var index;
5973 var subPart;
5974 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
5975 pathOffset += 12;
5976 unittest.expect(path.substring(pathOffset, pathOffset + 25), unittest.eq uals("liveBroadcasts/transition"));
5977 pathOffset += 25;
5978
5979 var query = (req.url).query;
5980 var queryOffset = 0;
5981 var queryMap = {};
5982 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
5983 parseBool(n) {
5984 if (n == "true") return true;
5985 if (n == "false") return false;
5986 if (n == null) return null;
5987 throw new core.ArgumentError("Invalid boolean: $n");
5988 }
5989 if (query.length > 0) {
5990 for (var part in query.split("&")) {
5991 var keyvalue = part.split("=");
5992 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
5993 }
5994 }
5995 unittest.expect(queryMap["broadcastStatus"].first, unittest.equals(arg_b roadcastStatus));
5996 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
5997 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
5998 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
5999 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6000
6001
6002 var h = {
6003 "content-type" : "application/json; charset=utf-8",
6004 };
6005 var resp = convert.JSON.encode(buildLiveBroadcast());
6006 return new async.Future.value(common_test.stringResponse(200, h, resp));
6007 }), true);
6008 res.transition(arg_broadcastStatus, arg_id, arg_part, onBehalfOfContentOwn er: arg_onBehalfOfContentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfCon tentOwnerChannel).then(unittest.expectAsync(((api.LiveBroadcast response) {
6009 checkLiveBroadcast(response);
6010 })));
6011 });
6012
6013 unittest.test("method--update", () {
6014
6015 var mock = new common_test.HttpServerMock();
6016 api.LiveBroadcastsResourceApi res = new api.YoutubeApi(mock).liveBroadcast s;
6017 var arg_request = buildLiveBroadcast();
6018 var arg_part = "foo";
6019 var arg_onBehalfOfContentOwner = "foo";
6020 var arg_onBehalfOfContentOwnerChannel = "foo";
6021 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6022 var obj = new api.LiveBroadcast.fromJson(json);
6023 checkLiveBroadcast(obj);
6024
6025 var path = (req.url).path;
6026 var pathOffset = 0;
6027 var index;
6028 var subPart;
6029 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6030 pathOffset += 12;
6031 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("liveBroadcasts"));
6032 pathOffset += 14;
6033
6034 var query = (req.url).query;
6035 var queryOffset = 0;
6036 var queryMap = {};
6037 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6038 parseBool(n) {
6039 if (n == "true") return true;
6040 if (n == "false") return false;
6041 if (n == null) return null;
6042 throw new core.ArgumentError("Invalid boolean: $n");
6043 }
6044 if (query.length > 0) {
6045 for (var part in query.split("&")) {
6046 var keyvalue = part.split("=");
6047 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6048 }
6049 }
6050 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6051 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6052 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6053
6054
6055 var h = {
6056 "content-type" : "application/json; charset=utf-8",
6057 };
6058 var resp = convert.JSON.encode(buildLiveBroadcast());
6059 return new async.Future.value(common_test.stringResponse(200, h, resp));
6060 }), true);
6061 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th en(unittest.expectAsync(((api.LiveBroadcast response) {
6062 checkLiveBroadcast(response);
6063 })));
6064 });
6065
6066 });
6067
6068
6069 unittest.group("resource-LiveStreamsResourceApi", () {
6070 unittest.test("method--delete", () {
6071
6072 var mock = new common_test.HttpServerMock();
6073 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams;
6074 var arg_id = "foo";
6075 var arg_onBehalfOfContentOwner = "foo";
6076 var arg_onBehalfOfContentOwnerChannel = "foo";
6077 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6078 var path = (req.url).path;
6079 var pathOffset = 0;
6080 var index;
6081 var subPart;
6082 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6083 pathOffset += 12;
6084 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("liveStreams"));
6085 pathOffset += 11;
6086
6087 var query = (req.url).query;
6088 var queryOffset = 0;
6089 var queryMap = {};
6090 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6091 parseBool(n) {
6092 if (n == "true") return true;
6093 if (n == "false") return false;
6094 if (n == null) return null;
6095 throw new core.ArgumentError("Invalid boolean: $n");
6096 }
6097 if (query.length > 0) {
6098 for (var part in query.split("&")) {
6099 var keyvalue = part.split("=");
6100 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6101 }
6102 }
6103 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6104 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6105 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6106
6107
6108 var h = {
6109 "content-type" : "application/json; charset=utf-8",
6110 };
6111 var resp = "";
6112 return new async.Future.value(common_test.stringResponse(200, h, resp));
6113 }), true);
6114 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onB ehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).then(unittest.exp ectAsync((_) {}));
6115 });
6116
6117 unittest.test("method--insert", () {
6118
6119 var mock = new common_test.HttpServerMock();
6120 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams;
6121 var arg_request = buildLiveStream();
6122 var arg_part = "foo";
6123 var arg_onBehalfOfContentOwner = "foo";
6124 var arg_onBehalfOfContentOwnerChannel = "foo";
6125 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6126 var obj = new api.LiveStream.fromJson(json);
6127 checkLiveStream(obj);
6128
6129 var path = (req.url).path;
6130 var pathOffset = 0;
6131 var index;
6132 var subPart;
6133 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6134 pathOffset += 12;
6135 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("liveStreams"));
6136 pathOffset += 11;
6137
6138 var query = (req.url).query;
6139 var queryOffset = 0;
6140 var queryMap = {};
6141 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6142 parseBool(n) {
6143 if (n == "true") return true;
6144 if (n == "false") return false;
6145 if (n == null) return null;
6146 throw new core.ArgumentError("Invalid boolean: $n");
6147 }
6148 if (query.length > 0) {
6149 for (var part in query.split("&")) {
6150 var keyvalue = part.split("=");
6151 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6152 }
6153 }
6154 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6155 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6156 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6157
6158
6159 var h = {
6160 "content-type" : "application/json; charset=utf-8",
6161 };
6162 var resp = convert.JSON.encode(buildLiveStream());
6163 return new async.Future.value(common_test.stringResponse(200, h, resp));
6164 }), true);
6165 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th en(unittest.expectAsync(((api.LiveStream response) {
6166 checkLiveStream(response);
6167 })));
6168 });
6169
6170 unittest.test("method--list", () {
6171
6172 var mock = new common_test.HttpServerMock();
6173 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams;
6174 var arg_part = "foo";
6175 var arg_id = "foo";
6176 var arg_maxResults = 42;
6177 var arg_mine = true;
6178 var arg_onBehalfOfContentOwner = "foo";
6179 var arg_onBehalfOfContentOwnerChannel = "foo";
6180 var arg_pageToken = "foo";
6181 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6182 var path = (req.url).path;
6183 var pathOffset = 0;
6184 var index;
6185 var subPart;
6186 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6187 pathOffset += 12;
6188 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("liveStreams"));
6189 pathOffset += 11;
6190
6191 var query = (req.url).query;
6192 var queryOffset = 0;
6193 var queryMap = {};
6194 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6195 parseBool(n) {
6196 if (n == "true") return true;
6197 if (n == "false") return false;
6198 if (n == null) return null;
6199 throw new core.ArgumentError("Invalid boolean: $n");
6200 }
6201 if (query.length > 0) {
6202 for (var part in query.split("&")) {
6203 var keyvalue = part.split("=");
6204 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6205 }
6206 }
6207 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6208 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6209 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
6210 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
6211 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6212 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6213 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
6214
6215
6216 var h = {
6217 "content-type" : "application/json; charset=utf-8",
6218 };
6219 var resp = convert.JSON.encode(buildLiveStreamListResponse());
6220 return new async.Future.value(common_test.stringResponse(200, h, resp));
6221 }), true);
6222 res.list(arg_part, id: arg_id, maxResults: arg_maxResults, mine: arg_mine, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onBehalfOfContentOwnerChann el: arg_onBehalfOfContentOwnerChannel, pageToken: arg_pageToken).then(unittest.e xpectAsync(((api.LiveStreamListResponse response) {
6223 checkLiveStreamListResponse(response);
6224 })));
6225 });
6226
6227 unittest.test("method--update", () {
6228
6229 var mock = new common_test.HttpServerMock();
6230 api.LiveStreamsResourceApi res = new api.YoutubeApi(mock).liveStreams;
6231 var arg_request = buildLiveStream();
6232 var arg_part = "foo";
6233 var arg_onBehalfOfContentOwner = "foo";
6234 var arg_onBehalfOfContentOwnerChannel = "foo";
6235 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6236 var obj = new api.LiveStream.fromJson(json);
6237 checkLiveStream(obj);
6238
6239 var path = (req.url).path;
6240 var pathOffset = 0;
6241 var index;
6242 var subPart;
6243 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6244 pathOffset += 12;
6245 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("liveStreams"));
6246 pathOffset += 11;
6247
6248 var query = (req.url).query;
6249 var queryOffset = 0;
6250 var queryMap = {};
6251 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6252 parseBool(n) {
6253 if (n == "true") return true;
6254 if (n == "false") return false;
6255 if (n == null) return null;
6256 throw new core.ArgumentError("Invalid boolean: $n");
6257 }
6258 if (query.length > 0) {
6259 for (var part in query.split("&")) {
6260 var keyvalue = part.split("=");
6261 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6262 }
6263 }
6264 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6265 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6266 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6267
6268
6269 var h = {
6270 "content-type" : "application/json; charset=utf-8",
6271 };
6272 var resp = convert.JSON.encode(buildLiveStream());
6273 return new async.Future.value(common_test.stringResponse(200, h, resp));
6274 }), true);
6275 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th en(unittest.expectAsync(((api.LiveStream response) {
6276 checkLiveStream(response);
6277 })));
6278 });
6279
6280 });
6281
6282
6283 unittest.group("resource-PlaylistItemsResourceApi", () {
6284 unittest.test("method--delete", () {
6285
6286 var mock = new common_test.HttpServerMock();
6287 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems;
6288 var arg_id = "foo";
6289 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6290 var path = (req.url).path;
6291 var pathOffset = 0;
6292 var index;
6293 var subPart;
6294 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6295 pathOffset += 12;
6296 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("playlistItems"));
6297 pathOffset += 13;
6298
6299 var query = (req.url).query;
6300 var queryOffset = 0;
6301 var queryMap = {};
6302 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6303 parseBool(n) {
6304 if (n == "true") return true;
6305 if (n == "false") return false;
6306 if (n == null) return null;
6307 throw new core.ArgumentError("Invalid boolean: $n");
6308 }
6309 if (query.length > 0) {
6310 for (var part in query.split("&")) {
6311 var keyvalue = part.split("=");
6312 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6313 }
6314 }
6315 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6316
6317
6318 var h = {
6319 "content-type" : "application/json; charset=utf-8",
6320 };
6321 var resp = "";
6322 return new async.Future.value(common_test.stringResponse(200, h, resp));
6323 }), true);
6324 res.delete(arg_id).then(unittest.expectAsync((_) {}));
6325 });
6326
6327 unittest.test("method--insert", () {
6328
6329 var mock = new common_test.HttpServerMock();
6330 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems;
6331 var arg_request = buildPlaylistItem();
6332 var arg_part = "foo";
6333 var arg_onBehalfOfContentOwner = "foo";
6334 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6335 var obj = new api.PlaylistItem.fromJson(json);
6336 checkPlaylistItem(obj);
6337
6338 var path = (req.url).path;
6339 var pathOffset = 0;
6340 var index;
6341 var subPart;
6342 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6343 pathOffset += 12;
6344 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("playlistItems"));
6345 pathOffset += 13;
6346
6347 var query = (req.url).query;
6348 var queryOffset = 0;
6349 var queryMap = {};
6350 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6351 parseBool(n) {
6352 if (n == "true") return true;
6353 if (n == "false") return false;
6354 if (n == null) return null;
6355 throw new core.ArgumentError("Invalid boolean: $n");
6356 }
6357 if (query.length > 0) {
6358 for (var part in query.split("&")) {
6359 var keyvalue = part.split("=");
6360 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6361 }
6362 }
6363 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6364 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6365
6366
6367 var h = {
6368 "content-type" : "application/json; charset=utf-8",
6369 };
6370 var resp = convert.JSON.encode(buildPlaylistItem());
6371 return new async.Future.value(common_test.stringResponse(200, h, resp));
6372 }), true);
6373 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner).then(unittest.expectAsync(((api.PlaylistItem response) {
6374 checkPlaylistItem(response);
6375 })));
6376 });
6377
6378 unittest.test("method--list", () {
6379
6380 var mock = new common_test.HttpServerMock();
6381 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems;
6382 var arg_part = "foo";
6383 var arg_id = "foo";
6384 var arg_maxResults = 42;
6385 var arg_onBehalfOfContentOwner = "foo";
6386 var arg_pageToken = "foo";
6387 var arg_playlistId = "foo";
6388 var arg_videoId = "foo";
6389 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6390 var path = (req.url).path;
6391 var pathOffset = 0;
6392 var index;
6393 var subPart;
6394 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6395 pathOffset += 12;
6396 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("playlistItems"));
6397 pathOffset += 13;
6398
6399 var query = (req.url).query;
6400 var queryOffset = 0;
6401 var queryMap = {};
6402 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6403 parseBool(n) {
6404 if (n == "true") return true;
6405 if (n == "false") return false;
6406 if (n == null) return null;
6407 throw new core.ArgumentError("Invalid boolean: $n");
6408 }
6409 if (query.length > 0) {
6410 for (var part in query.split("&")) {
6411 var keyvalue = part.split("=");
6412 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6413 }
6414 }
6415 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6416 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6417 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
6418 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6419 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
6420 unittest.expect(queryMap["playlistId"].first, unittest.equals(arg_playli stId));
6421 unittest.expect(queryMap["videoId"].first, unittest.equals(arg_videoId)) ;
6422
6423
6424 var h = {
6425 "content-type" : "application/json; charset=utf-8",
6426 };
6427 var resp = convert.JSON.encode(buildPlaylistItemListResponse());
6428 return new async.Future.value(common_test.stringResponse(200, h, resp));
6429 }), true);
6430 res.list(arg_part, id: arg_id, maxResults: arg_maxResults, onBehalfOfConte ntOwner: arg_onBehalfOfContentOwner, pageToken: arg_pageToken, playlistId: arg_p laylistId, videoId: arg_videoId).then(unittest.expectAsync(((api.PlaylistItemLis tResponse response) {
6431 checkPlaylistItemListResponse(response);
6432 })));
6433 });
6434
6435 unittest.test("method--update", () {
6436
6437 var mock = new common_test.HttpServerMock();
6438 api.PlaylistItemsResourceApi res = new api.YoutubeApi(mock).playlistItems;
6439 var arg_request = buildPlaylistItem();
6440 var arg_part = "foo";
6441 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6442 var obj = new api.PlaylistItem.fromJson(json);
6443 checkPlaylistItem(obj);
6444
6445 var path = (req.url).path;
6446 var pathOffset = 0;
6447 var index;
6448 var subPart;
6449 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6450 pathOffset += 12;
6451 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("playlistItems"));
6452 pathOffset += 13;
6453
6454 var query = (req.url).query;
6455 var queryOffset = 0;
6456 var queryMap = {};
6457 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6458 parseBool(n) {
6459 if (n == "true") return true;
6460 if (n == "false") return false;
6461 if (n == null) return null;
6462 throw new core.ArgumentError("Invalid boolean: $n");
6463 }
6464 if (query.length > 0) {
6465 for (var part in query.split("&")) {
6466 var keyvalue = part.split("=");
6467 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6468 }
6469 }
6470 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6471
6472
6473 var h = {
6474 "content-type" : "application/json; charset=utf-8",
6475 };
6476 var resp = convert.JSON.encode(buildPlaylistItem());
6477 return new async.Future.value(common_test.stringResponse(200, h, resp));
6478 }), true);
6479 res.update(arg_request, arg_part).then(unittest.expectAsync(((api.Playlist Item response) {
6480 checkPlaylistItem(response);
6481 })));
6482 });
6483
6484 });
6485
6486
6487 unittest.group("resource-PlaylistsResourceApi", () {
6488 unittest.test("method--delete", () {
6489
6490 var mock = new common_test.HttpServerMock();
6491 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists;
6492 var arg_id = "foo";
6493 var arg_onBehalfOfContentOwner = "foo";
6494 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6495 var path = (req.url).path;
6496 var pathOffset = 0;
6497 var index;
6498 var subPart;
6499 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6500 pathOffset += 12;
6501 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("playlists"));
6502 pathOffset += 9;
6503
6504 var query = (req.url).query;
6505 var queryOffset = 0;
6506 var queryMap = {};
6507 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6508 parseBool(n) {
6509 if (n == "true") return true;
6510 if (n == "false") return false;
6511 if (n == null) return null;
6512 throw new core.ArgumentError("Invalid boolean: $n");
6513 }
6514 if (query.length > 0) {
6515 for (var part in query.split("&")) {
6516 var keyvalue = part.split("=");
6517 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6518 }
6519 }
6520 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6521 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6522
6523
6524 var h = {
6525 "content-type" : "application/json; charset=utf-8",
6526 };
6527 var resp = "";
6528 return new async.Future.value(common_test.stringResponse(200, h, resp));
6529 }), true);
6530 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).the n(unittest.expectAsync((_) {}));
6531 });
6532
6533 unittest.test("method--insert", () {
6534
6535 var mock = new common_test.HttpServerMock();
6536 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists;
6537 var arg_request = buildPlaylist();
6538 var arg_part = "foo";
6539 var arg_onBehalfOfContentOwner = "foo";
6540 var arg_onBehalfOfContentOwnerChannel = "foo";
6541 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6542 var obj = new api.Playlist.fromJson(json);
6543 checkPlaylist(obj);
6544
6545 var path = (req.url).path;
6546 var pathOffset = 0;
6547 var index;
6548 var subPart;
6549 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6550 pathOffset += 12;
6551 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("playlists"));
6552 pathOffset += 9;
6553
6554 var query = (req.url).query;
6555 var queryOffset = 0;
6556 var queryMap = {};
6557 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6558 parseBool(n) {
6559 if (n == "true") return true;
6560 if (n == "false") return false;
6561 if (n == null) return null;
6562 throw new core.ArgumentError("Invalid boolean: $n");
6563 }
6564 if (query.length > 0) {
6565 for (var part in query.split("&")) {
6566 var keyvalue = part.split("=");
6567 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6568 }
6569 }
6570 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6571 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6572 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6573
6574
6575 var h = {
6576 "content-type" : "application/json; charset=utf-8",
6577 };
6578 var resp = convert.JSON.encode(buildPlaylist());
6579 return new async.Future.value(common_test.stringResponse(200, h, resp));
6580 }), true);
6581 res.insert(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner, onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel).th en(unittest.expectAsync(((api.Playlist response) {
6582 checkPlaylist(response);
6583 })));
6584 });
6585
6586 unittest.test("method--list", () {
6587
6588 var mock = new common_test.HttpServerMock();
6589 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists;
6590 var arg_part = "foo";
6591 var arg_channelId = "foo";
6592 var arg_id = "foo";
6593 var arg_maxResults = 42;
6594 var arg_mine = true;
6595 var arg_onBehalfOfContentOwner = "foo";
6596 var arg_onBehalfOfContentOwnerChannel = "foo";
6597 var arg_pageToken = "foo";
6598 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6599 var path = (req.url).path;
6600 var pathOffset = 0;
6601 var index;
6602 var subPart;
6603 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6604 pathOffset += 12;
6605 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("playlists"));
6606 pathOffset += 9;
6607
6608 var query = (req.url).query;
6609 var queryOffset = 0;
6610 var queryMap = {};
6611 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6612 parseBool(n) {
6613 if (n == "true") return true;
6614 if (n == "false") return false;
6615 if (n == null) return null;
6616 throw new core.ArgumentError("Invalid boolean: $n");
6617 }
6618 if (query.length > 0) {
6619 for (var part in query.split("&")) {
6620 var keyvalue = part.split("=");
6621 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6622 }
6623 }
6624 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6625 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
6626 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6627 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
6628 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
6629 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6630 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6631 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
6632
6633
6634 var h = {
6635 "content-type" : "application/json; charset=utf-8",
6636 };
6637 var resp = convert.JSON.encode(buildPlaylistListResponse());
6638 return new async.Future.value(common_test.stringResponse(200, h, resp));
6639 }), true);
6640 res.list(arg_part, channelId: arg_channelId, id: arg_id, maxResults: arg_m axResults, mine: arg_mine, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, o nBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, pageToken: arg_ pageToken).then(unittest.expectAsync(((api.PlaylistListResponse response) {
6641 checkPlaylistListResponse(response);
6642 })));
6643 });
6644
6645 unittest.test("method--update", () {
6646
6647 var mock = new common_test.HttpServerMock();
6648 api.PlaylistsResourceApi res = new api.YoutubeApi(mock).playlists;
6649 var arg_request = buildPlaylist();
6650 var arg_part = "foo";
6651 var arg_onBehalfOfContentOwner = "foo";
6652 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6653 var obj = new api.Playlist.fromJson(json);
6654 checkPlaylist(obj);
6655
6656 var path = (req.url).path;
6657 var pathOffset = 0;
6658 var index;
6659 var subPart;
6660 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6661 pathOffset += 12;
6662 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("playlists"));
6663 pathOffset += 9;
6664
6665 var query = (req.url).query;
6666 var queryOffset = 0;
6667 var queryMap = {};
6668 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6669 parseBool(n) {
6670 if (n == "true") return true;
6671 if (n == "false") return false;
6672 if (n == null) return null;
6673 throw new core.ArgumentError("Invalid boolean: $n");
6674 }
6675 if (query.length > 0) {
6676 for (var part in query.split("&")) {
6677 var keyvalue = part.split("=");
6678 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6679 }
6680 }
6681 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6682 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6683
6684
6685 var h = {
6686 "content-type" : "application/json; charset=utf-8",
6687 };
6688 var resp = convert.JSON.encode(buildPlaylist());
6689 return new async.Future.value(common_test.stringResponse(200, h, resp));
6690 }), true);
6691 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner).then(unittest.expectAsync(((api.Playlist response) {
6692 checkPlaylist(response);
6693 })));
6694 });
6695
6696 });
6697
6698
6699 unittest.group("resource-SearchResourceApi", () {
6700 unittest.test("method--list", () {
6701
6702 var mock = new common_test.HttpServerMock();
6703 api.SearchResourceApi res = new api.YoutubeApi(mock).search;
6704 var arg_part = "foo";
6705 var arg_channelId = "foo";
6706 var arg_channelType = "foo";
6707 var arg_eventType = "foo";
6708 var arg_forContentOwner = true;
6709 var arg_forMine = true;
6710 var arg_location = "foo";
6711 var arg_locationRadius = "foo";
6712 var arg_maxResults = 42;
6713 var arg_onBehalfOfContentOwner = "foo";
6714 var arg_order = "foo";
6715 var arg_pageToken = "foo";
6716 var arg_publishedAfter = core.DateTime.parse("2002-02-27T14:01:02");
6717 var arg_publishedBefore = core.DateTime.parse("2002-02-27T14:01:02");
6718 var arg_q = "foo";
6719 var arg_regionCode = "foo";
6720 var arg_relatedToVideoId = "foo";
6721 var arg_safeSearch = "foo";
6722 var arg_topicId = "foo";
6723 var arg_type = "foo";
6724 var arg_videoCaption = "foo";
6725 var arg_videoCategoryId = "foo";
6726 var arg_videoDefinition = "foo";
6727 var arg_videoDimension = "foo";
6728 var arg_videoDuration = "foo";
6729 var arg_videoEmbeddable = "foo";
6730 var arg_videoLicense = "foo";
6731 var arg_videoSyndicated = "foo";
6732 var arg_videoType = "foo";
6733 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6734 var path = (req.url).path;
6735 var pathOffset = 0;
6736 var index;
6737 var subPart;
6738 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6739 pathOffset += 12;
6740 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("search"));
6741 pathOffset += 6;
6742
6743 var query = (req.url).query;
6744 var queryOffset = 0;
6745 var queryMap = {};
6746 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6747 parseBool(n) {
6748 if (n == "true") return true;
6749 if (n == "false") return false;
6750 if (n == null) return null;
6751 throw new core.ArgumentError("Invalid boolean: $n");
6752 }
6753 if (query.length > 0) {
6754 for (var part in query.split("&")) {
6755 var keyvalue = part.split("=");
6756 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6757 }
6758 }
6759 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6760 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
6761 unittest.expect(queryMap["channelType"].first, unittest.equals(arg_chann elType));
6762 unittest.expect(queryMap["eventType"].first, unittest.equals(arg_eventTy pe));
6763 unittest.expect(queryMap["forContentOwner"].first, unittest.equals("$arg _forContentOwner"));
6764 unittest.expect(queryMap["forMine"].first, unittest.equals("$arg_forMine "));
6765 unittest.expect(queryMap["location"].first, unittest.equals(arg_location ));
6766 unittest.expect(queryMap["locationRadius"].first, unittest.equals(arg_lo cationRadius));
6767 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
6768 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6769 unittest.expect(queryMap["order"].first, unittest.equals(arg_order));
6770 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
6771 unittest.expect(core.DateTime.parse(queryMap["publishedAfter"].first), u nittest.equals(arg_publishedAfter));
6772 unittest.expect(core.DateTime.parse(queryMap["publishedBefore"].first), unittest.equals(arg_publishedBefore));
6773 unittest.expect(queryMap["q"].first, unittest.equals(arg_q));
6774 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region Code));
6775 unittest.expect(queryMap["relatedToVideoId"].first, unittest.equals(arg_ relatedToVideoId));
6776 unittest.expect(queryMap["safeSearch"].first, unittest.equals(arg_safeSe arch));
6777 unittest.expect(queryMap["topicId"].first, unittest.equals(arg_topicId)) ;
6778 unittest.expect(queryMap["type"].first, unittest.equals(arg_type));
6779 unittest.expect(queryMap["videoCaption"].first, unittest.equals(arg_vide oCaption));
6780 unittest.expect(queryMap["videoCategoryId"].first, unittest.equals(arg_v ideoCategoryId));
6781 unittest.expect(queryMap["videoDefinition"].first, unittest.equals(arg_v ideoDefinition));
6782 unittest.expect(queryMap["videoDimension"].first, unittest.equals(arg_vi deoDimension));
6783 unittest.expect(queryMap["videoDuration"].first, unittest.equals(arg_vid eoDuration));
6784 unittest.expect(queryMap["videoEmbeddable"].first, unittest.equals(arg_v ideoEmbeddable));
6785 unittest.expect(queryMap["videoLicense"].first, unittest.equals(arg_vide oLicense));
6786 unittest.expect(queryMap["videoSyndicated"].first, unittest.equals(arg_v ideoSyndicated));
6787 unittest.expect(queryMap["videoType"].first, unittest.equals(arg_videoTy pe));
6788
6789
6790 var h = {
6791 "content-type" : "application/json; charset=utf-8",
6792 };
6793 var resp = convert.JSON.encode(buildSearchListResponse());
6794 return new async.Future.value(common_test.stringResponse(200, h, resp));
6795 }), true);
6796 res.list(arg_part, channelId: arg_channelId, channelType: arg_channelType, eventType: arg_eventType, forContentOwner: arg_forContentOwner, forMine: arg_fo rMine, location: arg_location, locationRadius: arg_locationRadius, maxResults: a rg_maxResults, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, order: arg_or der, pageToken: arg_pageToken, publishedAfter: arg_publishedAfter, publishedBefo re: arg_publishedBefore, q: arg_q, regionCode: arg_regionCode, relatedToVideoId: arg_relatedToVideoId, safeSearch: arg_safeSearch, topicId: arg_topicId, type: a rg_type, videoCaption: arg_videoCaption, videoCategoryId: arg_videoCategoryId, v ideoDefinition: arg_videoDefinition, videoDimension: arg_videoDimension, videoDu ration: arg_videoDuration, videoEmbeddable: arg_videoEmbeddable, videoLicense: a rg_videoLicense, videoSyndicated: arg_videoSyndicated, videoType: arg_videoType) .then(unittest.expectAsync(((api.SearchListResponse response) {
6797 checkSearchListResponse(response);
6798 })));
6799 });
6800
6801 });
6802
6803
6804 unittest.group("resource-SubscriptionsResourceApi", () {
6805 unittest.test("method--delete", () {
6806
6807 var mock = new common_test.HttpServerMock();
6808 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions;
6809 var arg_id = "foo";
6810 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6811 var path = (req.url).path;
6812 var pathOffset = 0;
6813 var index;
6814 var subPart;
6815 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6816 pathOffset += 12;
6817 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("subscriptions"));
6818 pathOffset += 13;
6819
6820 var query = (req.url).query;
6821 var queryOffset = 0;
6822 var queryMap = {};
6823 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6824 parseBool(n) {
6825 if (n == "true") return true;
6826 if (n == "false") return false;
6827 if (n == null) return null;
6828 throw new core.ArgumentError("Invalid boolean: $n");
6829 }
6830 if (query.length > 0) {
6831 for (var part in query.split("&")) {
6832 var keyvalue = part.split("=");
6833 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6834 }
6835 }
6836 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6837
6838
6839 var h = {
6840 "content-type" : "application/json; charset=utf-8",
6841 };
6842 var resp = "";
6843 return new async.Future.value(common_test.stringResponse(200, h, resp));
6844 }), true);
6845 res.delete(arg_id).then(unittest.expectAsync((_) {}));
6846 });
6847
6848 unittest.test("method--insert", () {
6849
6850 var mock = new common_test.HttpServerMock();
6851 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions;
6852 var arg_request = buildSubscription();
6853 var arg_part = "foo";
6854 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6855 var obj = new api.Subscription.fromJson(json);
6856 checkSubscription(obj);
6857
6858 var path = (req.url).path;
6859 var pathOffset = 0;
6860 var index;
6861 var subPart;
6862 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6863 pathOffset += 12;
6864 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("subscriptions"));
6865 pathOffset += 13;
6866
6867 var query = (req.url).query;
6868 var queryOffset = 0;
6869 var queryMap = {};
6870 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6871 parseBool(n) {
6872 if (n == "true") return true;
6873 if (n == "false") return false;
6874 if (n == null) return null;
6875 throw new core.ArgumentError("Invalid boolean: $n");
6876 }
6877 if (query.length > 0) {
6878 for (var part in query.split("&")) {
6879 var keyvalue = part.split("=");
6880 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6881 }
6882 }
6883 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6884
6885
6886 var h = {
6887 "content-type" : "application/json; charset=utf-8",
6888 };
6889 var resp = convert.JSON.encode(buildSubscription());
6890 return new async.Future.value(common_test.stringResponse(200, h, resp));
6891 }), true);
6892 res.insert(arg_request, arg_part).then(unittest.expectAsync(((api.Subscrip tion response) {
6893 checkSubscription(response);
6894 })));
6895 });
6896
6897 unittest.test("method--list", () {
6898
6899 var mock = new common_test.HttpServerMock();
6900 api.SubscriptionsResourceApi res = new api.YoutubeApi(mock).subscriptions;
6901 var arg_part = "foo";
6902 var arg_channelId = "foo";
6903 var arg_forChannelId = "foo";
6904 var arg_id = "foo";
6905 var arg_maxResults = 42;
6906 var arg_mine = true;
6907 var arg_mySubscribers = true;
6908 var arg_onBehalfOfContentOwner = "foo";
6909 var arg_onBehalfOfContentOwnerChannel = "foo";
6910 var arg_order = "foo";
6911 var arg_pageToken = "foo";
6912 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6913 var path = (req.url).path;
6914 var pathOffset = 0;
6915 var index;
6916 var subPart;
6917 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6918 pathOffset += 12;
6919 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("subscriptions"));
6920 pathOffset += 13;
6921
6922 var query = (req.url).query;
6923 var queryOffset = 0;
6924 var queryMap = {};
6925 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6926 parseBool(n) {
6927 if (n == "true") return true;
6928 if (n == "false") return false;
6929 if (n == null) return null;
6930 throw new core.ArgumentError("Invalid boolean: $n");
6931 }
6932 if (query.length > 0) {
6933 for (var part in query.split("&")) {
6934 var keyvalue = part.split("=");
6935 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6936 }
6937 }
6938 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
6939 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
6940 unittest.expect(queryMap["forChannelId"].first, unittest.equals(arg_forC hannelId));
6941 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
6942 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
6943 unittest.expect(queryMap["mine"].first, unittest.equals("$arg_mine"));
6944 unittest.expect(queryMap["mySubscribers"].first, unittest.equals("$arg_m ySubscribers"));
6945 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
6946 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
6947 unittest.expect(queryMap["order"].first, unittest.equals(arg_order));
6948 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
6949
6950
6951 var h = {
6952 "content-type" : "application/json; charset=utf-8",
6953 };
6954 var resp = convert.JSON.encode(buildSubscriptionListResponse());
6955 return new async.Future.value(common_test.stringResponse(200, h, resp));
6956 }), true);
6957 res.list(arg_part, channelId: arg_channelId, forChannelId: arg_forChannelI d, id: arg_id, maxResults: arg_maxResults, mine: arg_mine, mySubscribers: arg_my Subscribers, onBehalfOfContentOwner: arg_onBehalfOfContentOwner, onBehalfOfConte ntOwnerChannel: arg_onBehalfOfContentOwnerChannel, order: arg_order, pageToken: arg_pageToken).then(unittest.expectAsync(((api.SubscriptionListResponse response ) {
6958 checkSubscriptionListResponse(response);
6959 })));
6960 });
6961
6962 });
6963
6964
6965 unittest.group("resource-ThumbnailsResourceApi", () {
6966 unittest.test("method--set", () {
6967 // TODO: Implement tests for media upload;
6968 // TODO: Implement tests for media download;
6969
6970 var mock = new common_test.HttpServerMock();
6971 api.ThumbnailsResourceApi res = new api.YoutubeApi(mock).thumbnails;
6972 var arg_videoId = "foo";
6973 var arg_onBehalfOfContentOwner = "foo";
6974 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
6975 var path = (req.url).path;
6976 var pathOffset = 0;
6977 var index;
6978 var subPart;
6979 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
6980 pathOffset += 12;
6981 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("thumbnails/set"));
6982 pathOffset += 14;
6983
6984 var query = (req.url).query;
6985 var queryOffset = 0;
6986 var queryMap = {};
6987 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
6988 parseBool(n) {
6989 if (n == "true") return true;
6990 if (n == "false") return false;
6991 if (n == null) return null;
6992 throw new core.ArgumentError("Invalid boolean: $n");
6993 }
6994 if (query.length > 0) {
6995 for (var part in query.split("&")) {
6996 var keyvalue = part.split("=");
6997 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
6998 }
6999 }
7000 unittest.expect(queryMap["videoId"].first, unittest.equals(arg_videoId)) ;
7001 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7002
7003
7004 var h = {
7005 "content-type" : "application/json; charset=utf-8",
7006 };
7007 var resp = convert.JSON.encode(buildThumbnailSetResponse());
7008 return new async.Future.value(common_test.stringResponse(200, h, resp));
7009 }), true);
7010 res.set(arg_videoId, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).t hen(unittest.expectAsync(((api.ThumbnailSetResponse response) {
7011 checkThumbnailSetResponse(response);
7012 })));
7013 });
7014
7015 });
7016
7017
7018 unittest.group("resource-VideoCategoriesResourceApi", () {
7019 unittest.test("method--list", () {
7020
7021 var mock = new common_test.HttpServerMock();
7022 api.VideoCategoriesResourceApi res = new api.YoutubeApi(mock).videoCategor ies;
7023 var arg_part = "foo";
7024 var arg_hl = "foo";
7025 var arg_id = "foo";
7026 var arg_regionCode = "foo";
7027 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7028 var path = (req.url).path;
7029 var pathOffset = 0;
7030 var index;
7031 var subPart;
7032 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7033 pathOffset += 12;
7034 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("videoCategories"));
7035 pathOffset += 15;
7036
7037 var query = (req.url).query;
7038 var queryOffset = 0;
7039 var queryMap = {};
7040 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7041 parseBool(n) {
7042 if (n == "true") return true;
7043 if (n == "false") return false;
7044 if (n == null) return null;
7045 throw new core.ArgumentError("Invalid boolean: $n");
7046 }
7047 if (query.length > 0) {
7048 for (var part in query.split("&")) {
7049 var keyvalue = part.split("=");
7050 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7051 }
7052 }
7053 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
7054 unittest.expect(queryMap["hl"].first, unittest.equals(arg_hl));
7055 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
7056 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region Code));
7057
7058
7059 var h = {
7060 "content-type" : "application/json; charset=utf-8",
7061 };
7062 var resp = convert.JSON.encode(buildVideoCategoryListResponse());
7063 return new async.Future.value(common_test.stringResponse(200, h, resp));
7064 }), true);
7065 res.list(arg_part, hl: arg_hl, id: arg_id, regionCode: arg_regionCode).the n(unittest.expectAsync(((api.VideoCategoryListResponse response) {
7066 checkVideoCategoryListResponse(response);
7067 })));
7068 });
7069
7070 });
7071
7072
7073 unittest.group("resource-VideosResourceApi", () {
7074 unittest.test("method--delete", () {
7075
7076 var mock = new common_test.HttpServerMock();
7077 api.VideosResourceApi res = new api.YoutubeApi(mock).videos;
7078 var arg_id = "foo";
7079 var arg_onBehalfOfContentOwner = "foo";
7080 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7081 var path = (req.url).path;
7082 var pathOffset = 0;
7083 var index;
7084 var subPart;
7085 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7086 pathOffset += 12;
7087 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("videos"));
7088 pathOffset += 6;
7089
7090 var query = (req.url).query;
7091 var queryOffset = 0;
7092 var queryMap = {};
7093 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7094 parseBool(n) {
7095 if (n == "true") return true;
7096 if (n == "false") return false;
7097 if (n == null) return null;
7098 throw new core.ArgumentError("Invalid boolean: $n");
7099 }
7100 if (query.length > 0) {
7101 for (var part in query.split("&")) {
7102 var keyvalue = part.split("=");
7103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7104 }
7105 }
7106 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
7107 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7108
7109
7110 var h = {
7111 "content-type" : "application/json; charset=utf-8",
7112 };
7113 var resp = "";
7114 return new async.Future.value(common_test.stringResponse(200, h, resp));
7115 }), true);
7116 res.delete(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner).the n(unittest.expectAsync((_) {}));
7117 });
7118
7119 unittest.test("method--getRating", () {
7120
7121 var mock = new common_test.HttpServerMock();
7122 api.VideosResourceApi res = new api.YoutubeApi(mock).videos;
7123 var arg_id = "foo";
7124 var arg_onBehalfOfContentOwner = "foo";
7125 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7126 var path = (req.url).path;
7127 var pathOffset = 0;
7128 var index;
7129 var subPart;
7130 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7131 pathOffset += 12;
7132 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("videos/getRating"));
7133 pathOffset += 16;
7134
7135 var query = (req.url).query;
7136 var queryOffset = 0;
7137 var queryMap = {};
7138 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7139 parseBool(n) {
7140 if (n == "true") return true;
7141 if (n == "false") return false;
7142 if (n == null) return null;
7143 throw new core.ArgumentError("Invalid boolean: $n");
7144 }
7145 if (query.length > 0) {
7146 for (var part in query.split("&")) {
7147 var keyvalue = part.split("=");
7148 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7149 }
7150 }
7151 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
7152 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7153
7154
7155 var h = {
7156 "content-type" : "application/json; charset=utf-8",
7157 };
7158 var resp = convert.JSON.encode(buildVideoGetRatingResponse());
7159 return new async.Future.value(common_test.stringResponse(200, h, resp));
7160 }), true);
7161 res.getRating(arg_id, onBehalfOfContentOwner: arg_onBehalfOfContentOwner). then(unittest.expectAsync(((api.VideoGetRatingResponse response) {
7162 checkVideoGetRatingResponse(response);
7163 })));
7164 });
7165
7166 unittest.test("method--insert", () {
7167 // TODO: Implement tests for media upload;
7168 // TODO: Implement tests for media download;
7169
7170 var mock = new common_test.HttpServerMock();
7171 api.VideosResourceApi res = new api.YoutubeApi(mock).videos;
7172 var arg_request = buildVideo();
7173 var arg_part = "foo";
7174 var arg_autoLevels = true;
7175 var arg_notifySubscribers = true;
7176 var arg_onBehalfOfContentOwner = "foo";
7177 var arg_onBehalfOfContentOwnerChannel = "foo";
7178 var arg_stabilize = true;
7179 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7180 var obj = new api.Video.fromJson(json);
7181 checkVideo(obj);
7182
7183 var path = (req.url).path;
7184 var pathOffset = 0;
7185 var index;
7186 var subPart;
7187 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7188 pathOffset += 12;
7189 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("videos"));
7190 pathOffset += 6;
7191
7192 var query = (req.url).query;
7193 var queryOffset = 0;
7194 var queryMap = {};
7195 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7196 parseBool(n) {
7197 if (n == "true") return true;
7198 if (n == "false") return false;
7199 if (n == null) return null;
7200 throw new core.ArgumentError("Invalid boolean: $n");
7201 }
7202 if (query.length > 0) {
7203 for (var part in query.split("&")) {
7204 var keyvalue = part.split("=");
7205 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7206 }
7207 }
7208 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
7209 unittest.expect(queryMap["autoLevels"].first, unittest.equals("$arg_auto Levels"));
7210 unittest.expect(queryMap["notifySubscribers"].first, unittest.equals("$a rg_notifySubscribers"));
7211 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7212 unittest.expect(queryMap["onBehalfOfContentOwnerChannel"].first, unittes t.equals(arg_onBehalfOfContentOwnerChannel));
7213 unittest.expect(queryMap["stabilize"].first, unittest.equals("$arg_stabi lize"));
7214
7215
7216 var h = {
7217 "content-type" : "application/json; charset=utf-8",
7218 };
7219 var resp = convert.JSON.encode(buildVideo());
7220 return new async.Future.value(common_test.stringResponse(200, h, resp));
7221 }), true);
7222 res.insert(arg_request, arg_part, autoLevels: arg_autoLevels, notifySubscr ibers: arg_notifySubscribers, onBehalfOfContentOwner: arg_onBehalfOfContentOwner , onBehalfOfContentOwnerChannel: arg_onBehalfOfContentOwnerChannel, stabilize: a rg_stabilize).then(unittest.expectAsync(((api.Video response) {
7223 checkVideo(response);
7224 })));
7225 });
7226
7227 unittest.test("method--list", () {
7228
7229 var mock = new common_test.HttpServerMock();
7230 api.VideosResourceApi res = new api.YoutubeApi(mock).videos;
7231 var arg_part = "foo";
7232 var arg_chart = "foo";
7233 var arg_id = "foo";
7234 var arg_locale = "foo";
7235 var arg_maxResults = 42;
7236 var arg_myRating = "foo";
7237 var arg_onBehalfOfContentOwner = "foo";
7238 var arg_pageToken = "foo";
7239 var arg_regionCode = "foo";
7240 var arg_videoCategoryId = "foo";
7241 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7242 var path = (req.url).path;
7243 var pathOffset = 0;
7244 var index;
7245 var subPart;
7246 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7247 pathOffset += 12;
7248 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("videos"));
7249 pathOffset += 6;
7250
7251 var query = (req.url).query;
7252 var queryOffset = 0;
7253 var queryMap = {};
7254 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7255 parseBool(n) {
7256 if (n == "true") return true;
7257 if (n == "false") return false;
7258 if (n == null) return null;
7259 throw new core.ArgumentError("Invalid boolean: $n");
7260 }
7261 if (query.length > 0) {
7262 for (var part in query.split("&")) {
7263 var keyvalue = part.split("=");
7264 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7265 }
7266 }
7267 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
7268 unittest.expect(queryMap["chart"].first, unittest.equals(arg_chart));
7269 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
7270 unittest.expect(queryMap["locale"].first, unittest.equals(arg_locale));
7271 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e quals(arg_maxResults));
7272 unittest.expect(queryMap["myRating"].first, unittest.equals(arg_myRating ));
7273 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7274 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
7275 unittest.expect(queryMap["regionCode"].first, unittest.equals(arg_region Code));
7276 unittest.expect(queryMap["videoCategoryId"].first, unittest.equals(arg_v ideoCategoryId));
7277
7278
7279 var h = {
7280 "content-type" : "application/json; charset=utf-8",
7281 };
7282 var resp = convert.JSON.encode(buildVideoListResponse());
7283 return new async.Future.value(common_test.stringResponse(200, h, resp));
7284 }), true);
7285 res.list(arg_part, chart: arg_chart, id: arg_id, locale: arg_locale, maxRe sults: arg_maxResults, myRating: arg_myRating, onBehalfOfContentOwner: arg_onBeh alfOfContentOwner, pageToken: arg_pageToken, regionCode: arg_regionCode, videoCa tegoryId: arg_videoCategoryId).then(unittest.expectAsync(((api.VideoListResponse response) {
7286 checkVideoListResponse(response);
7287 })));
7288 });
7289
7290 unittest.test("method--rate", () {
7291
7292 var mock = new common_test.HttpServerMock();
7293 api.VideosResourceApi res = new api.YoutubeApi(mock).videos;
7294 var arg_id = "foo";
7295 var arg_rating = "foo";
7296 var arg_onBehalfOfContentOwner = "foo";
7297 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7298 var path = (req.url).path;
7299 var pathOffset = 0;
7300 var index;
7301 var subPart;
7302 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7303 pathOffset += 12;
7304 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("videos/rate"));
7305 pathOffset += 11;
7306
7307 var query = (req.url).query;
7308 var queryOffset = 0;
7309 var queryMap = {};
7310 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7311 parseBool(n) {
7312 if (n == "true") return true;
7313 if (n == "false") return false;
7314 if (n == null) return null;
7315 throw new core.ArgumentError("Invalid boolean: $n");
7316 }
7317 if (query.length > 0) {
7318 for (var part in query.split("&")) {
7319 var keyvalue = part.split("=");
7320 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7321 }
7322 }
7323 unittest.expect(queryMap["id"].first, unittest.equals(arg_id));
7324 unittest.expect(queryMap["rating"].first, unittest.equals(arg_rating));
7325 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7326
7327
7328 var h = {
7329 "content-type" : "application/json; charset=utf-8",
7330 };
7331 var resp = "";
7332 return new async.Future.value(common_test.stringResponse(200, h, resp));
7333 }), true);
7334 res.rate(arg_id, arg_rating, onBehalfOfContentOwner: arg_onBehalfOfContent Owner).then(unittest.expectAsync((_) {}));
7335 });
7336
7337 unittest.test("method--update", () {
7338
7339 var mock = new common_test.HttpServerMock();
7340 api.VideosResourceApi res = new api.YoutubeApi(mock).videos;
7341 var arg_request = buildVideo();
7342 var arg_part = "foo";
7343 var arg_onBehalfOfContentOwner = "foo";
7344 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7345 var obj = new api.Video.fromJson(json);
7346 checkVideo(obj);
7347
7348 var path = (req.url).path;
7349 var pathOffset = 0;
7350 var index;
7351 var subPart;
7352 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7353 pathOffset += 12;
7354 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als("videos"));
7355 pathOffset += 6;
7356
7357 var query = (req.url).query;
7358 var queryOffset = 0;
7359 var queryMap = {};
7360 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7361 parseBool(n) {
7362 if (n == "true") return true;
7363 if (n == "false") return false;
7364 if (n == null) return null;
7365 throw new core.ArgumentError("Invalid boolean: $n");
7366 }
7367 if (query.length > 0) {
7368 for (var part in query.split("&")) {
7369 var keyvalue = part.split("=");
7370 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7371 }
7372 }
7373 unittest.expect(queryMap["part"].first, unittest.equals(arg_part));
7374 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7375
7376
7377 var h = {
7378 "content-type" : "application/json; charset=utf-8",
7379 };
7380 var resp = convert.JSON.encode(buildVideo());
7381 return new async.Future.value(common_test.stringResponse(200, h, resp));
7382 }), true);
7383 res.update(arg_request, arg_part, onBehalfOfContentOwner: arg_onBehalfOfCo ntentOwner).then(unittest.expectAsync(((api.Video response) {
7384 checkVideo(response);
7385 })));
7386 });
7387
7388 });
7389
7390
7391 unittest.group("resource-WatermarksResourceApi", () {
7392 unittest.test("method--set", () {
7393 // TODO: Implement tests for media upload;
7394 // TODO: Implement tests for media download;
7395
7396 var mock = new common_test.HttpServerMock();
7397 api.WatermarksResourceApi res = new api.YoutubeApi(mock).watermarks;
7398 var arg_request = buildInvideoBranding();
7399 var arg_channelId = "foo";
7400 var arg_onBehalfOfContentOwner = "foo";
7401 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7402 var obj = new api.InvideoBranding.fromJson(json);
7403 checkInvideoBranding(obj);
7404
7405 var path = (req.url).path;
7406 var pathOffset = 0;
7407 var index;
7408 var subPart;
7409 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7410 pathOffset += 12;
7411 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("watermarks/set"));
7412 pathOffset += 14;
7413
7414 var query = (req.url).query;
7415 var queryOffset = 0;
7416 var queryMap = {};
7417 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7418 parseBool(n) {
7419 if (n == "true") return true;
7420 if (n == "false") return false;
7421 if (n == null) return null;
7422 throw new core.ArgumentError("Invalid boolean: $n");
7423 }
7424 if (query.length > 0) {
7425 for (var part in query.split("&")) {
7426 var keyvalue = part.split("=");
7427 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7428 }
7429 }
7430 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
7431 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7432
7433
7434 var h = {
7435 "content-type" : "application/json; charset=utf-8",
7436 };
7437 var resp = "";
7438 return new async.Future.value(common_test.stringResponse(200, h, resp));
7439 }), true);
7440 res.set(arg_request, arg_channelId, onBehalfOfContentOwner: arg_onBehalfOf ContentOwner).then(unittest.expectAsync((_) {}));
7441 });
7442
7443 unittest.test("method--unset", () {
7444
7445 var mock = new common_test.HttpServerMock();
7446 api.WatermarksResourceApi res = new api.YoutubeApi(mock).watermarks;
7447 var arg_channelId = "foo";
7448 var arg_onBehalfOfContentOwner = "foo";
7449 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
7450 var path = (req.url).path;
7451 var pathOffset = 0;
7452 var index;
7453 var subPart;
7454 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/youtube/v3/"));
7455 pathOffset += 12;
7456 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("watermarks/unset"));
7457 pathOffset += 16;
7458
7459 var query = (req.url).query;
7460 var queryOffset = 0;
7461 var queryMap = {};
7462 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
7463 parseBool(n) {
7464 if (n == "true") return true;
7465 if (n == "false") return false;
7466 if (n == null) return null;
7467 throw new core.ArgumentError("Invalid boolean: $n");
7468 }
7469 if (query.length > 0) {
7470 for (var part in query.split("&")) {
7471 var keyvalue = part.split("=");
7472 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
7473 }
7474 }
7475 unittest.expect(queryMap["channelId"].first, unittest.equals(arg_channel Id));
7476 unittest.expect(queryMap["onBehalfOfContentOwner"].first, unittest.equal s(arg_onBehalfOfContentOwner));
7477
7478
7479 var h = {
7480 "content-type" : "application/json; charset=utf-8",
7481 };
7482 var resp = "";
7483 return new async.Future.value(common_test.stringResponse(200, h, resp));
7484 }), true);
7485 res.unset(arg_channelId, onBehalfOfContentOwner: arg_onBehalfOfContentOwne r).then(unittest.expectAsync((_) {}));
7486 });
7487
7488 });
7489
7490
7491 }
7492
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698