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

Side by Side Diff: generated/googleapis_beta/test/adexchangebuyer2/v2beta1_test.dart

Issue 2936613002: Api-Roll 50: 2017-06-12 (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis_beta.adexchangebuyer2.v2beta1.test; 1 library googleapis_beta.adexchangebuyer2.v2beta1.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection; 4 import "dart:collection" as collection;
5 import "dart:async" as async; 5 import "dart:async" as async;
6 import "dart:convert" as convert; 6 import "dart:convert" as convert;
7 7
8 import 'package:http/http.dart' as http; 8 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing; 9 import 'package:http/testing.dart' as http_testing;
10 import 'package:unittest/unittest.dart' as unittest; 10 import 'package:test/test.dart' as unittest;
11 11
12 import 'package:googleapis_beta/adexchangebuyer2/v2beta1.dart' as api; 12 import 'package:googleapis_beta/adexchangebuyer2/v2beta1.dart' as api;
13 13
14 class HttpServerMock extends http.BaseClient { 14 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 15 core.Function _callback;
16 core.bool _expectJson; 16 core.bool _expectJson;
17 17
18 void register(core.Function callback, core.bool expectJson) { 18 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 19 _callback = callback;
20 _expectJson = expectJson; 20 _expectJson = expectJson;
(...skipping 18 matching lines...) Expand all
39 } else { 39 } else {
40 return stream.toBytes().then((data) { 40 return stream.toBytes().then((data) {
41 return _callback(request, data); 41 return _callback(request, data);
42 }); 42 });
43 } 43 }
44 } 44 }
45 } 45 }
46 } 46 }
47 47
48 http.StreamedResponse stringResponse( 48 http.StreamedResponse stringResponse(
49 core.int status, core.Map headers, core.String body) { 49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 51 return new http.StreamedResponse(stream, status, headers: headers);
52 } 52 }
53 53
54 core.int buildCounterAbsoluteDateRange = 0;
55 buildAbsoluteDateRange() {
56 var o = new api.AbsoluteDateRange();
57 buildCounterAbsoluteDateRange++;
58 if (buildCounterAbsoluteDateRange < 3) {
59 o.endDate = buildDate();
60 o.startDate = buildDate();
61 }
62 buildCounterAbsoluteDateRange--;
63 return o;
64 }
65
66 checkAbsoluteDateRange(api.AbsoluteDateRange o) {
67 buildCounterAbsoluteDateRange++;
68 if (buildCounterAbsoluteDateRange < 3) {
69 checkDate(o.endDate);
70 checkDate(o.startDate);
71 }
72 buildCounterAbsoluteDateRange--;
73 }
74
54 core.int buildCounterAddDealAssociationRequest = 0; 75 core.int buildCounterAddDealAssociationRequest = 0;
55 buildAddDealAssociationRequest() { 76 buildAddDealAssociationRequest() {
56 var o = new api.AddDealAssociationRequest(); 77 var o = new api.AddDealAssociationRequest();
57 buildCounterAddDealAssociationRequest++; 78 buildCounterAddDealAssociationRequest++;
58 if (buildCounterAddDealAssociationRequest < 3) { 79 if (buildCounterAddDealAssociationRequest < 3) {
59 o.association = buildCreativeDealAssociation(); 80 o.association = buildCreativeDealAssociation();
60 } 81 }
61 buildCounterAddDealAssociationRequest--; 82 buildCounterAddDealAssociationRequest--;
62 return o; 83 return o;
63 } 84 }
64 85
65 checkAddDealAssociationRequest(api.AddDealAssociationRequest o) { 86 checkAddDealAssociationRequest(api.AddDealAssociationRequest o) {
66 buildCounterAddDealAssociationRequest++; 87 buildCounterAddDealAssociationRequest++;
67 if (buildCounterAddDealAssociationRequest < 3) { 88 if (buildCounterAddDealAssociationRequest < 3) {
68 checkCreativeDealAssociation(o.association); 89 checkCreativeDealAssociation(o.association);
69 } 90 }
70 buildCounterAddDealAssociationRequest--; 91 buildCounterAddDealAssociationRequest--;
71 } 92 }
72 93
73 buildUnnamed3931() { 94 buildUnnamed3407() {
74 var o = new core.List<core.String>(); 95 var o = new core.List<core.String>();
75 o.add("foo"); 96 o.add("foo");
76 o.add("foo"); 97 o.add("foo");
77 return o; 98 return o;
78 } 99 }
79 100
80 checkUnnamed3931(core.List<core.String> o) { 101 checkUnnamed3407(core.List<core.String> o) {
81 unittest.expect(o, unittest.hasLength(2)); 102 unittest.expect(o, unittest.hasLength(2));
82 unittest.expect(o[0], unittest.equals('foo')); 103 unittest.expect(o[0], unittest.equals('foo'));
83 unittest.expect(o[1], unittest.equals('foo')); 104 unittest.expect(o[1], unittest.equals('foo'));
84 } 105 }
85 106
86 core.int buildCounterAppContext = 0; 107 core.int buildCounterAppContext = 0;
87 buildAppContext() { 108 buildAppContext() {
88 var o = new api.AppContext(); 109 var o = new api.AppContext();
89 buildCounterAppContext++; 110 buildCounterAppContext++;
90 if (buildCounterAppContext < 3) { 111 if (buildCounterAppContext < 3) {
91 o.appTypes = buildUnnamed3931(); 112 o.appTypes = buildUnnamed3407();
92 } 113 }
93 buildCounterAppContext--; 114 buildCounterAppContext--;
94 return o; 115 return o;
95 } 116 }
96 117
97 checkAppContext(api.AppContext o) { 118 checkAppContext(api.AppContext o) {
98 buildCounterAppContext++; 119 buildCounterAppContext++;
99 if (buildCounterAppContext < 3) { 120 if (buildCounterAppContext < 3) {
100 checkUnnamed3931(o.appTypes); 121 checkUnnamed3407(o.appTypes);
101 } 122 }
102 buildCounterAppContext--; 123 buildCounterAppContext--;
103 } 124 }
104 125
105 buildUnnamed3932() { 126 buildUnnamed3408() {
106 var o = new core.List<core.String>(); 127 var o = new core.List<core.String>();
107 o.add("foo"); 128 o.add("foo");
108 o.add("foo"); 129 o.add("foo");
109 return o; 130 return o;
110 } 131 }
111 132
112 checkUnnamed3932(core.List<core.String> o) { 133 checkUnnamed3408(core.List<core.String> o) {
113 unittest.expect(o, unittest.hasLength(2)); 134 unittest.expect(o, unittest.hasLength(2));
114 unittest.expect(o[0], unittest.equals('foo')); 135 unittest.expect(o[0], unittest.equals('foo'));
115 unittest.expect(o[1], unittest.equals('foo')); 136 unittest.expect(o[1], unittest.equals('foo'));
116 } 137 }
117 138
118 core.int buildCounterAuctionContext = 0; 139 core.int buildCounterAuctionContext = 0;
119 buildAuctionContext() { 140 buildAuctionContext() {
120 var o = new api.AuctionContext(); 141 var o = new api.AuctionContext();
121 buildCounterAuctionContext++; 142 buildCounterAuctionContext++;
122 if (buildCounterAuctionContext < 3) { 143 if (buildCounterAuctionContext < 3) {
123 o.auctionTypes = buildUnnamed3932(); 144 o.auctionTypes = buildUnnamed3408();
124 } 145 }
125 buildCounterAuctionContext--; 146 buildCounterAuctionContext--;
126 return o; 147 return o;
127 } 148 }
128 149
129 checkAuctionContext(api.AuctionContext o) { 150 checkAuctionContext(api.AuctionContext o) {
130 buildCounterAuctionContext++; 151 buildCounterAuctionContext++;
131 if (buildCounterAuctionContext < 3) { 152 if (buildCounterAuctionContext < 3) {
132 checkUnnamed3932(o.auctionTypes); 153 checkUnnamed3408(o.auctionTypes);
133 } 154 }
134 buildCounterAuctionContext--; 155 buildCounterAuctionContext--;
135 } 156 }
136 157
158 core.int buildCounterBidMetricsRow = 0;
159 buildBidMetricsRow() {
160 var o = new api.BidMetricsRow();
161 buildCounterBidMetricsRow++;
162 if (buildCounterBidMetricsRow < 3) {
163 o.bids = buildMetricValue();
164 o.bidsInAuction = buildMetricValue();
165 o.billedImpressions = buildMetricValue();
166 o.impressionsWon = buildMetricValue();
167 o.rowDimensions = buildRowDimensions();
168 o.viewableImpressions = buildMetricValue();
169 }
170 buildCounterBidMetricsRow--;
171 return o;
172 }
173
174 checkBidMetricsRow(api.BidMetricsRow o) {
175 buildCounterBidMetricsRow++;
176 if (buildCounterBidMetricsRow < 3) {
177 checkMetricValue(o.bids);
178 checkMetricValue(o.bidsInAuction);
179 checkMetricValue(o.billedImpressions);
180 checkMetricValue(o.impressionsWon);
181 checkRowDimensions(o.rowDimensions);
182 checkMetricValue(o.viewableImpressions);
183 }
184 buildCounterBidMetricsRow--;
185 }
186
187 core.int buildCounterBidResponseWithoutBidsStatusRow = 0;
188 buildBidResponseWithoutBidsStatusRow() {
189 var o = new api.BidResponseWithoutBidsStatusRow();
190 buildCounterBidResponseWithoutBidsStatusRow++;
191 if (buildCounterBidResponseWithoutBidsStatusRow < 3) {
192 o.impressionCount = buildMetricValue();
193 o.rowDimensions = buildRowDimensions();
194 o.status = "foo";
195 }
196 buildCounterBidResponseWithoutBidsStatusRow--;
197 return o;
198 }
199
200 checkBidResponseWithoutBidsStatusRow(api.BidResponseWithoutBidsStatusRow o) {
201 buildCounterBidResponseWithoutBidsStatusRow++;
202 if (buildCounterBidResponseWithoutBidsStatusRow < 3) {
203 checkMetricValue(o.impressionCount);
204 checkRowDimensions(o.rowDimensions);
205 unittest.expect(o.status, unittest.equals('foo'));
206 }
207 buildCounterBidResponseWithoutBidsStatusRow--;
208 }
209
210 core.int buildCounterCalloutStatusRow = 0;
211 buildCalloutStatusRow() {
212 var o = new api.CalloutStatusRow();
213 buildCounterCalloutStatusRow++;
214 if (buildCounterCalloutStatusRow < 3) {
215 o.calloutStatusId = 42;
216 o.impressionCount = buildMetricValue();
217 o.rowDimensions = buildRowDimensions();
218 }
219 buildCounterCalloutStatusRow--;
220 return o;
221 }
222
223 checkCalloutStatusRow(api.CalloutStatusRow o) {
224 buildCounterCalloutStatusRow++;
225 if (buildCounterCalloutStatusRow < 3) {
226 unittest.expect(o.calloutStatusId, unittest.equals(42));
227 checkMetricValue(o.impressionCount);
228 checkRowDimensions(o.rowDimensions);
229 }
230 buildCounterCalloutStatusRow--;
231 }
232
137 core.int buildCounterClient = 0; 233 core.int buildCounterClient = 0;
138 buildClient() { 234 buildClient() {
139 var o = new api.Client(); 235 var o = new api.Client();
140 buildCounterClient++; 236 buildCounterClient++;
141 if (buildCounterClient < 3) { 237 if (buildCounterClient < 3) {
142 o.clientAccountId = "foo"; 238 o.clientAccountId = "foo";
143 o.clientName = "foo"; 239 o.clientName = "foo";
144 o.entityId = "foo"; 240 o.entityId = "foo";
145 o.entityName = "foo"; 241 o.entityName = "foo";
146 o.entityType = "foo"; 242 o.entityType = "foo";
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 checkClientUserInvitation(api.ClientUserInvitation o) { 304 checkClientUserInvitation(api.ClientUserInvitation o) {
209 buildCounterClientUserInvitation++; 305 buildCounterClientUserInvitation++;
210 if (buildCounterClientUserInvitation < 3) { 306 if (buildCounterClientUserInvitation < 3) {
211 unittest.expect(o.clientAccountId, unittest.equals('foo')); 307 unittest.expect(o.clientAccountId, unittest.equals('foo'));
212 unittest.expect(o.email, unittest.equals('foo')); 308 unittest.expect(o.email, unittest.equals('foo'));
213 unittest.expect(o.invitationId, unittest.equals('foo')); 309 unittest.expect(o.invitationId, unittest.equals('foo'));
214 } 310 }
215 buildCounterClientUserInvitation--; 311 buildCounterClientUserInvitation--;
216 } 312 }
217 313
218 buildUnnamed3933() { 314 buildUnnamed3409() {
219 var o = new core.List<api.ServingContext>(); 315 var o = new core.List<api.ServingContext>();
220 o.add(buildServingContext()); 316 o.add(buildServingContext());
221 o.add(buildServingContext()); 317 o.add(buildServingContext());
222 return o; 318 return o;
223 } 319 }
224 320
225 checkUnnamed3933(core.List<api.ServingContext> o) { 321 checkUnnamed3409(core.List<api.ServingContext> o) {
226 unittest.expect(o, unittest.hasLength(2)); 322 unittest.expect(o, unittest.hasLength(2));
227 checkServingContext(o[0]); 323 checkServingContext(o[0]);
228 checkServingContext(o[1]); 324 checkServingContext(o[1]);
229 } 325 }
230 326
231 buildUnnamed3934() { 327 buildUnnamed3410() {
232 var o = new core.List<core.String>(); 328 var o = new core.List<core.String>();
233 o.add("foo"); 329 o.add("foo");
234 o.add("foo"); 330 o.add("foo");
235 return o; 331 return o;
236 } 332 }
237 333
238 checkUnnamed3934(core.List<core.String> o) { 334 checkUnnamed3410(core.List<core.String> o) {
239 unittest.expect(o, unittest.hasLength(2)); 335 unittest.expect(o, unittest.hasLength(2));
240 unittest.expect(o[0], unittest.equals('foo')); 336 unittest.expect(o[0], unittest.equals('foo'));
241 unittest.expect(o[1], unittest.equals('foo')); 337 unittest.expect(o[1], unittest.equals('foo'));
242 } 338 }
243 339
244 core.int buildCounterCorrection = 0; 340 core.int buildCounterCorrection = 0;
245 buildCorrection() { 341 buildCorrection() {
246 var o = new api.Correction(); 342 var o = new api.Correction();
247 buildCounterCorrection++; 343 buildCounterCorrection++;
248 if (buildCounterCorrection < 3) { 344 if (buildCounterCorrection < 3) {
249 o.contexts = buildUnnamed3933(); 345 o.contexts = buildUnnamed3409();
250 o.details = buildUnnamed3934(); 346 o.details = buildUnnamed3410();
251 o.type = "foo"; 347 o.type = "foo";
252 } 348 }
253 buildCounterCorrection--; 349 buildCounterCorrection--;
254 return o; 350 return o;
255 } 351 }
256 352
257 checkCorrection(api.Correction o) { 353 checkCorrection(api.Correction o) {
258 buildCounterCorrection++; 354 buildCounterCorrection++;
259 if (buildCounterCorrection < 3) { 355 if (buildCounterCorrection < 3) {
260 checkUnnamed3933(o.contexts); 356 checkUnnamed3409(o.contexts);
261 checkUnnamed3934(o.details); 357 checkUnnamed3410(o.details);
262 unittest.expect(o.type, unittest.equals('foo')); 358 unittest.expect(o.type, unittest.equals('foo'));
263 } 359 }
264 buildCounterCorrection--; 360 buildCounterCorrection--;
265 } 361 }
266 362
267 buildUnnamed3935() { 363 buildUnnamed3411() {
268 var o = new core.List<core.String>(); 364 var o = new core.List<core.String>();
269 o.add("foo"); 365 o.add("foo");
270 o.add("foo"); 366 o.add("foo");
271 return o; 367 return o;
272 } 368 }
273 369
274 checkUnnamed3935(core.List<core.String> o) { 370 checkUnnamed3411(core.List<core.String> o) {
275 unittest.expect(o, unittest.hasLength(2)); 371 unittest.expect(o, unittest.hasLength(2));
276 unittest.expect(o[0], unittest.equals('foo')); 372 unittest.expect(o[0], unittest.equals('foo'));
277 unittest.expect(o[1], unittest.equals('foo')); 373 unittest.expect(o[1], unittest.equals('foo'));
278 } 374 }
279 375
280 buildUnnamed3936() { 376 buildUnnamed3412() {
281 var o = new core.List<core.String>(); 377 var o = new core.List<core.String>();
282 o.add("foo"); 378 o.add("foo");
283 o.add("foo"); 379 o.add("foo");
284 return o; 380 return o;
285 } 381 }
286 382
287 checkUnnamed3936(core.List<core.String> o) { 383 checkUnnamed3412(core.List<core.String> o) {
288 unittest.expect(o, unittest.hasLength(2)); 384 unittest.expect(o, unittest.hasLength(2));
289 unittest.expect(o[0], unittest.equals('foo')); 385 unittest.expect(o[0], unittest.equals('foo'));
290 unittest.expect(o[1], unittest.equals('foo')); 386 unittest.expect(o[1], unittest.equals('foo'));
291 } 387 }
292 388
293 buildUnnamed3937() { 389 buildUnnamed3413() {
294 var o = new core.List<api.Correction>(); 390 var o = new core.List<api.Correction>();
295 o.add(buildCorrection()); 391 o.add(buildCorrection());
296 o.add(buildCorrection()); 392 o.add(buildCorrection());
297 return o; 393 return o;
298 } 394 }
299 395
300 checkUnnamed3937(core.List<api.Correction> o) { 396 checkUnnamed3413(core.List<api.Correction> o) {
301 unittest.expect(o, unittest.hasLength(2)); 397 unittest.expect(o, unittest.hasLength(2));
302 checkCorrection(o[0]); 398 checkCorrection(o[0]);
303 checkCorrection(o[1]); 399 checkCorrection(o[1]);
304 } 400 }
305 401
306 buildUnnamed3938() { 402 buildUnnamed3414() {
307 var o = new core.List<core.String>(); 403 var o = new core.List<core.String>();
308 o.add("foo"); 404 o.add("foo");
309 o.add("foo"); 405 o.add("foo");
310 return o; 406 return o;
311 } 407 }
312 408
313 checkUnnamed3938(core.List<core.String> o) { 409 checkUnnamed3414(core.List<core.String> o) {
314 unittest.expect(o, unittest.hasLength(2)); 410 unittest.expect(o, unittest.hasLength(2));
315 unittest.expect(o[0], unittest.equals('foo')); 411 unittest.expect(o[0], unittest.equals('foo'));
316 unittest.expect(o[1], unittest.equals('foo')); 412 unittest.expect(o[1], unittest.equals('foo'));
317 } 413 }
318 414
319 buildUnnamed3939() { 415 buildUnnamed3415() {
320 var o = new core.List<core.String>(); 416 var o = new core.List<core.String>();
321 o.add("foo"); 417 o.add("foo");
322 o.add("foo"); 418 o.add("foo");
323 return o; 419 return o;
324 } 420 }
325 421
326 checkUnnamed3939(core.List<core.String> o) { 422 checkUnnamed3415(core.List<core.String> o) {
327 unittest.expect(o, unittest.hasLength(2)); 423 unittest.expect(o, unittest.hasLength(2));
328 unittest.expect(o[0], unittest.equals('foo')); 424 unittest.expect(o[0], unittest.equals('foo'));
329 unittest.expect(o[1], unittest.equals('foo')); 425 unittest.expect(o[1], unittest.equals('foo'));
330 } 426 }
331 427
332 buildUnnamed3940() { 428 buildUnnamed3416() {
333 var o = new core.List<core.String>(); 429 var o = new core.List<core.String>();
334 o.add("foo"); 430 o.add("foo");
335 o.add("foo"); 431 o.add("foo");
336 return o; 432 return o;
337 } 433 }
338 434
339 checkUnnamed3940(core.List<core.String> o) { 435 checkUnnamed3416(core.List<core.String> o) {
340 unittest.expect(o, unittest.hasLength(2)); 436 unittest.expect(o, unittest.hasLength(2));
341 unittest.expect(o[0], unittest.equals('foo')); 437 unittest.expect(o[0], unittest.equals('foo'));
342 unittest.expect(o[1], unittest.equals('foo')); 438 unittest.expect(o[1], unittest.equals('foo'));
343 } 439 }
344 440
345 buildUnnamed3941() { 441 buildUnnamed3417() {
346 var o = new core.List<core.int>(); 442 var o = new core.List<core.int>();
347 o.add(42); 443 o.add(42);
348 o.add(42); 444 o.add(42);
349 return o; 445 return o;
350 } 446 }
351 447
352 checkUnnamed3941(core.List<core.int> o) { 448 checkUnnamed3417(core.List<core.int> o) {
353 unittest.expect(o, unittest.hasLength(2)); 449 unittest.expect(o, unittest.hasLength(2));
354 unittest.expect(o[0], unittest.equals(42)); 450 unittest.expect(o[0], unittest.equals(42));
355 unittest.expect(o[1], unittest.equals(42)); 451 unittest.expect(o[1], unittest.equals(42));
356 } 452 }
357 453
358 buildUnnamed3942() { 454 buildUnnamed3418() {
359 var o = new core.List<core.int>(); 455 var o = new core.List<core.int>();
360 o.add(42); 456 o.add(42);
361 o.add(42); 457 o.add(42);
362 return o; 458 return o;
363 } 459 }
364 460
365 checkUnnamed3942(core.List<core.int> o) { 461 checkUnnamed3418(core.List<core.int> o) {
366 unittest.expect(o, unittest.hasLength(2)); 462 unittest.expect(o, unittest.hasLength(2));
367 unittest.expect(o[0], unittest.equals(42)); 463 unittest.expect(o[0], unittest.equals(42));
368 unittest.expect(o[1], unittest.equals(42)); 464 unittest.expect(o[1], unittest.equals(42));
369 } 465 }
370 466
371 buildUnnamed3943() { 467 buildUnnamed3419() {
372 var o = new core.List<core.String>(); 468 var o = new core.List<core.String>();
373 o.add("foo"); 469 o.add("foo");
374 o.add("foo"); 470 o.add("foo");
375 return o; 471 return o;
376 } 472 }
377 473
378 checkUnnamed3943(core.List<core.String> o) { 474 checkUnnamed3419(core.List<core.String> o) {
379 unittest.expect(o, unittest.hasLength(2)); 475 unittest.expect(o, unittest.hasLength(2));
380 unittest.expect(o[0], unittest.equals('foo')); 476 unittest.expect(o[0], unittest.equals('foo'));
381 unittest.expect(o[1], unittest.equals('foo')); 477 unittest.expect(o[1], unittest.equals('foo'));
382 } 478 }
383 479
384 buildUnnamed3944() { 480 buildUnnamed3420() {
385 var o = new core.List<core.String>(); 481 var o = new core.List<core.String>();
386 o.add("foo"); 482 o.add("foo");
387 o.add("foo"); 483 o.add("foo");
388 return o; 484 return o;
389 } 485 }
390 486
391 checkUnnamed3944(core.List<core.String> o) { 487 checkUnnamed3420(core.List<core.String> o) {
392 unittest.expect(o, unittest.hasLength(2)); 488 unittest.expect(o, unittest.hasLength(2));
393 unittest.expect(o[0], unittest.equals('foo')); 489 unittest.expect(o[0], unittest.equals('foo'));
394 unittest.expect(o[1], unittest.equals('foo')); 490 unittest.expect(o[1], unittest.equals('foo'));
395 } 491 }
396 492
397 buildUnnamed3945() { 493 buildUnnamed3421() {
398 var o = new core.List<api.ServingRestriction>(); 494 var o = new core.List<api.ServingRestriction>();
399 o.add(buildServingRestriction()); 495 o.add(buildServingRestriction());
400 o.add(buildServingRestriction()); 496 o.add(buildServingRestriction());
401 return o; 497 return o;
402 } 498 }
403 499
404 checkUnnamed3945(core.List<api.ServingRestriction> o) { 500 checkUnnamed3421(core.List<api.ServingRestriction> o) {
405 unittest.expect(o, unittest.hasLength(2)); 501 unittest.expect(o, unittest.hasLength(2));
406 checkServingRestriction(o[0]); 502 checkServingRestriction(o[0]);
407 checkServingRestriction(o[1]); 503 checkServingRestriction(o[1]);
408 } 504 }
409 505
410 buildUnnamed3946() { 506 buildUnnamed3422() {
411 var o = new core.List<core.int>(); 507 var o = new core.List<core.int>();
412 o.add(42); 508 o.add(42);
413 o.add(42); 509 o.add(42);
414 return o; 510 return o;
415 } 511 }
416 512
417 checkUnnamed3946(core.List<core.int> o) { 513 checkUnnamed3422(core.List<core.int> o) {
418 unittest.expect(o, unittest.hasLength(2)); 514 unittest.expect(o, unittest.hasLength(2));
419 unittest.expect(o[0], unittest.equals(42)); 515 unittest.expect(o[0], unittest.equals(42));
420 unittest.expect(o[1], unittest.equals(42)); 516 unittest.expect(o[1], unittest.equals(42));
421 } 517 }
422 518
423 core.int buildCounterCreative = 0; 519 core.int buildCounterCreative = 0;
424 buildCreative() { 520 buildCreative() {
425 var o = new api.Creative(); 521 var o = new api.Creative();
426 buildCounterCreative++; 522 buildCounterCreative++;
427 if (buildCounterCreative < 3) { 523 if (buildCounterCreative < 3) {
428 o.accountId = "foo"; 524 o.accountId = "foo";
429 o.adChoicesDestinationUrl = "foo"; 525 o.adChoicesDestinationUrl = "foo";
430 o.advertiserName = "foo"; 526 o.advertiserName = "foo";
431 o.agencyId = "foo"; 527 o.agencyId = "foo";
432 o.apiUpdateTime = "foo"; 528 o.apiUpdateTime = "foo";
433 o.attributes = buildUnnamed3935(); 529 o.attributes = buildUnnamed3411();
434 o.clickThroughUrls = buildUnnamed3936(); 530 o.clickThroughUrls = buildUnnamed3412();
435 o.corrections = buildUnnamed3937(); 531 o.corrections = buildUnnamed3413();
436 o.creativeId = "foo"; 532 o.creativeId = "foo";
437 o.dealsStatus = "foo"; 533 o.dealsStatus = "foo";
438 o.detectedAdvertiserIds = buildUnnamed3938(); 534 o.detectedAdvertiserIds = buildUnnamed3414();
439 o.detectedDomains = buildUnnamed3939(); 535 o.detectedDomains = buildUnnamed3415();
440 o.detectedLanguages = buildUnnamed3940(); 536 o.detectedLanguages = buildUnnamed3416();
441 o.detectedProductCategories = buildUnnamed3941(); 537 o.detectedProductCategories = buildUnnamed3417();
442 o.detectedSensitiveCategories = buildUnnamed3942(); 538 o.detectedSensitiveCategories = buildUnnamed3418();
443 o.filteringStats = buildFilteringStats(); 539 o.filteringStats = buildFilteringStats();
444 o.html = buildHtmlContent(); 540 o.html = buildHtmlContent();
445 o.impressionTrackingUrls = buildUnnamed3943(); 541 o.impressionTrackingUrls = buildUnnamed3419();
446 o.native = buildNativeContent(); 542 o.native = buildNativeContent();
447 o.openAuctionStatus = "foo"; 543 o.openAuctionStatus = "foo";
448 o.restrictedCategories = buildUnnamed3944(); 544 o.restrictedCategories = buildUnnamed3420();
449 o.servingRestrictions = buildUnnamed3945(); 545 o.servingRestrictions = buildUnnamed3421();
450 o.vendorIds = buildUnnamed3946(); 546 o.vendorIds = buildUnnamed3422();
451 o.version = 42; 547 o.version = 42;
452 o.video = buildVideoContent(); 548 o.video = buildVideoContent();
453 } 549 }
454 buildCounterCreative--; 550 buildCounterCreative--;
455 return o; 551 return o;
456 } 552 }
457 553
458 checkCreative(api.Creative o) { 554 checkCreative(api.Creative o) {
459 buildCounterCreative++; 555 buildCounterCreative++;
460 if (buildCounterCreative < 3) { 556 if (buildCounterCreative < 3) {
461 unittest.expect(o.accountId, unittest.equals('foo')); 557 unittest.expect(o.accountId, unittest.equals('foo'));
462 unittest.expect(o.adChoicesDestinationUrl, unittest.equals('foo')); 558 unittest.expect(o.adChoicesDestinationUrl, unittest.equals('foo'));
463 unittest.expect(o.advertiserName, unittest.equals('foo')); 559 unittest.expect(o.advertiserName, unittest.equals('foo'));
464 unittest.expect(o.agencyId, unittest.equals('foo')); 560 unittest.expect(o.agencyId, unittest.equals('foo'));
465 unittest.expect(o.apiUpdateTime, unittest.equals('foo')); 561 unittest.expect(o.apiUpdateTime, unittest.equals('foo'));
466 checkUnnamed3935(o.attributes); 562 checkUnnamed3411(o.attributes);
467 checkUnnamed3936(o.clickThroughUrls); 563 checkUnnamed3412(o.clickThroughUrls);
468 checkUnnamed3937(o.corrections); 564 checkUnnamed3413(o.corrections);
469 unittest.expect(o.creativeId, unittest.equals('foo')); 565 unittest.expect(o.creativeId, unittest.equals('foo'));
470 unittest.expect(o.dealsStatus, unittest.equals('foo')); 566 unittest.expect(o.dealsStatus, unittest.equals('foo'));
471 checkUnnamed3938(o.detectedAdvertiserIds); 567 checkUnnamed3414(o.detectedAdvertiserIds);
472 checkUnnamed3939(o.detectedDomains); 568 checkUnnamed3415(o.detectedDomains);
473 checkUnnamed3940(o.detectedLanguages); 569 checkUnnamed3416(o.detectedLanguages);
474 checkUnnamed3941(o.detectedProductCategories); 570 checkUnnamed3417(o.detectedProductCategories);
475 checkUnnamed3942(o.detectedSensitiveCategories); 571 checkUnnamed3418(o.detectedSensitiveCategories);
476 checkFilteringStats(o.filteringStats); 572 checkFilteringStats(o.filteringStats);
477 checkHtmlContent(o.html); 573 checkHtmlContent(o.html);
478 checkUnnamed3943(o.impressionTrackingUrls); 574 checkUnnamed3419(o.impressionTrackingUrls);
479 checkNativeContent(o.native); 575 checkNativeContent(o.native);
480 unittest.expect(o.openAuctionStatus, unittest.equals('foo')); 576 unittest.expect(o.openAuctionStatus, unittest.equals('foo'));
481 checkUnnamed3944(o.restrictedCategories); 577 checkUnnamed3420(o.restrictedCategories);
482 checkUnnamed3945(o.servingRestrictions); 578 checkUnnamed3421(o.servingRestrictions);
483 checkUnnamed3946(o.vendorIds); 579 checkUnnamed3422(o.vendorIds);
484 unittest.expect(o.version, unittest.equals(42)); 580 unittest.expect(o.version, unittest.equals(42));
485 checkVideoContent(o.video); 581 checkVideoContent(o.video);
486 } 582 }
487 buildCounterCreative--; 583 buildCounterCreative--;
488 } 584 }
489 585
490 core.int buildCounterCreativeDealAssociation = 0; 586 core.int buildCounterCreativeDealAssociation = 0;
491 buildCreativeDealAssociation() { 587 buildCreativeDealAssociation() {
492 var o = new api.CreativeDealAssociation(); 588 var o = new api.CreativeDealAssociation();
493 buildCounterCreativeDealAssociation++; 589 buildCounterCreativeDealAssociation++;
494 if (buildCounterCreativeDealAssociation < 3) { 590 if (buildCounterCreativeDealAssociation < 3) {
495 o.accountId = "foo"; 591 o.accountId = "foo";
496 o.creativeId = "foo"; 592 o.creativeId = "foo";
497 o.dealsId = "foo"; 593 o.dealsId = "foo";
498 } 594 }
499 buildCounterCreativeDealAssociation--; 595 buildCounterCreativeDealAssociation--;
500 return o; 596 return o;
501 } 597 }
502 598
503 checkCreativeDealAssociation(api.CreativeDealAssociation o) { 599 checkCreativeDealAssociation(api.CreativeDealAssociation o) {
504 buildCounterCreativeDealAssociation++; 600 buildCounterCreativeDealAssociation++;
505 if (buildCounterCreativeDealAssociation < 3) { 601 if (buildCounterCreativeDealAssociation < 3) {
506 unittest.expect(o.accountId, unittest.equals('foo')); 602 unittest.expect(o.accountId, unittest.equals('foo'));
507 unittest.expect(o.creativeId, unittest.equals('foo')); 603 unittest.expect(o.creativeId, unittest.equals('foo'));
508 unittest.expect(o.dealsId, unittest.equals('foo')); 604 unittest.expect(o.dealsId, unittest.equals('foo'));
509 } 605 }
510 buildCounterCreativeDealAssociation--; 606 buildCounterCreativeDealAssociation--;
511 } 607 }
512 608
609 core.int buildCounterCreativeStatusRow = 0;
610 buildCreativeStatusRow() {
611 var o = new api.CreativeStatusRow();
612 buildCounterCreativeStatusRow++;
613 if (buildCounterCreativeStatusRow < 3) {
614 o.bidCount = buildMetricValue();
615 o.creativeStatusId = 42;
616 o.rowDimensions = buildRowDimensions();
617 }
618 buildCounterCreativeStatusRow--;
619 return o;
620 }
621
622 checkCreativeStatusRow(api.CreativeStatusRow o) {
623 buildCounterCreativeStatusRow++;
624 if (buildCounterCreativeStatusRow < 3) {
625 checkMetricValue(o.bidCount);
626 unittest.expect(o.creativeStatusId, unittest.equals(42));
627 checkRowDimensions(o.rowDimensions);
628 }
629 buildCounterCreativeStatusRow--;
630 }
631
513 core.int buildCounterDate = 0; 632 core.int buildCounterDate = 0;
514 buildDate() { 633 buildDate() {
515 var o = new api.Date(); 634 var o = new api.Date();
516 buildCounterDate++; 635 buildCounterDate++;
517 if (buildCounterDate < 3) { 636 if (buildCounterDate < 3) {
518 o.day = 42; 637 o.day = 42;
519 o.month = 42; 638 o.month = 42;
520 o.year = 42; 639 o.year = 42;
521 } 640 }
522 buildCounterDate--; 641 buildCounterDate--;
523 return o; 642 return o;
524 } 643 }
525 644
526 checkDate(api.Date o) { 645 checkDate(api.Date o) {
527 buildCounterDate++; 646 buildCounterDate++;
528 if (buildCounterDate < 3) { 647 if (buildCounterDate < 3) {
529 unittest.expect(o.day, unittest.equals(42)); 648 unittest.expect(o.day, unittest.equals(42));
530 unittest.expect(o.month, unittest.equals(42)); 649 unittest.expect(o.month, unittest.equals(42));
531 unittest.expect(o.year, unittest.equals(42)); 650 unittest.expect(o.year, unittest.equals(42));
532 } 651 }
533 buildCounterDate--; 652 buildCounterDate--;
534 } 653 }
535 654
536 buildUnnamed3947() { 655 buildUnnamed3423() {
537 var o = new core.List<core.String>(); 656 var o = new core.List<core.String>();
538 o.add("foo"); 657 o.add("foo");
539 o.add("foo"); 658 o.add("foo");
540 return o; 659 return o;
541 } 660 }
542 661
543 checkUnnamed3947(core.List<core.String> o) { 662 checkUnnamed3423(core.List<core.String> o) {
544 unittest.expect(o, unittest.hasLength(2)); 663 unittest.expect(o, unittest.hasLength(2));
545 unittest.expect(o[0], unittest.equals('foo')); 664 unittest.expect(o[0], unittest.equals('foo'));
546 unittest.expect(o[1], unittest.equals('foo')); 665 unittest.expect(o[1], unittest.equals('foo'));
547 } 666 }
548 667
549 core.int buildCounterDisapproval = 0; 668 core.int buildCounterDisapproval = 0;
550 buildDisapproval() { 669 buildDisapproval() {
551 var o = new api.Disapproval(); 670 var o = new api.Disapproval();
552 buildCounterDisapproval++; 671 buildCounterDisapproval++;
553 if (buildCounterDisapproval < 3) { 672 if (buildCounterDisapproval < 3) {
554 o.details = buildUnnamed3947(); 673 o.details = buildUnnamed3423();
555 o.reason = "foo"; 674 o.reason = "foo";
556 } 675 }
557 buildCounterDisapproval--; 676 buildCounterDisapproval--;
558 return o; 677 return o;
559 } 678 }
560 679
561 checkDisapproval(api.Disapproval o) { 680 checkDisapproval(api.Disapproval o) {
562 buildCounterDisapproval++; 681 buildCounterDisapproval++;
563 if (buildCounterDisapproval < 3) { 682 if (buildCounterDisapproval < 3) {
564 checkUnnamed3947(o.details); 683 checkUnnamed3423(o.details);
565 unittest.expect(o.reason, unittest.equals('foo')); 684 unittest.expect(o.reason, unittest.equals('foo'));
566 } 685 }
567 buildCounterDisapproval--; 686 buildCounterDisapproval--;
568 } 687 }
569 688
570 core.int buildCounterEmpty = 0; 689 core.int buildCounterEmpty = 0;
571 buildEmpty() { 690 buildEmpty() {
572 var o = new api.Empty(); 691 var o = new api.Empty();
573 buildCounterEmpty++; 692 buildCounterEmpty++;
574 if (buildCounterEmpty < 3) { 693 if (buildCounterEmpty < 3) {
575 } 694 }
576 buildCounterEmpty--; 695 buildCounterEmpty--;
577 return o; 696 return o;
578 } 697 }
579 698
580 checkEmpty(api.Empty o) { 699 checkEmpty(api.Empty o) {
581 buildCounterEmpty++; 700 buildCounterEmpty++;
582 if (buildCounterEmpty < 3) { 701 if (buildCounterEmpty < 3) {
583 } 702 }
584 buildCounterEmpty--; 703 buildCounterEmpty--;
585 } 704 }
586 705
587 buildUnnamed3948() { 706 buildUnnamed3424() {
707 var o = new core.List<core.String>();
708 o.add("foo");
709 o.add("foo");
710 return o;
711 }
712
713 checkUnnamed3424(core.List<core.String> o) {
714 unittest.expect(o, unittest.hasLength(2));
715 unittest.expect(o[0], unittest.equals('foo'));
716 unittest.expect(o[1], unittest.equals('foo'));
717 }
718
719 buildUnnamed3425() {
720 var o = new core.List<core.int>();
721 o.add(42);
722 o.add(42);
723 return o;
724 }
725
726 checkUnnamed3425(core.List<core.int> o) {
727 unittest.expect(o, unittest.hasLength(2));
728 unittest.expect(o[0], unittest.equals(42));
729 unittest.expect(o[1], unittest.equals(42));
730 }
731
732 core.int buildCounterFilterSet = 0;
733 buildFilterSet() {
734 var o = new api.FilterSet();
735 buildCounterFilterSet++;
736 if (buildCounterFilterSet < 3) {
737 o.absoluteDateRange = buildAbsoluteDateRange();
738 o.buyerAccountId = "foo";
739 o.creativeId = "foo";
740 o.dealId = "foo";
741 o.environment = "foo";
742 o.filterSetId = "foo";
743 o.format = "foo";
744 o.ownerAccountId = "foo";
745 o.platforms = buildUnnamed3424();
746 o.realtimeTimeRange = buildRealtimeTimeRange();
747 o.relativeDateRange = buildRelativeDateRange();
748 o.sellerNetworkIds = buildUnnamed3425();
749 o.timeSeriesGranularity = "foo";
750 }
751 buildCounterFilterSet--;
752 return o;
753 }
754
755 checkFilterSet(api.FilterSet o) {
756 buildCounterFilterSet++;
757 if (buildCounterFilterSet < 3) {
758 checkAbsoluteDateRange(o.absoluteDateRange);
759 unittest.expect(o.buyerAccountId, unittest.equals('foo'));
760 unittest.expect(o.creativeId, unittest.equals('foo'));
761 unittest.expect(o.dealId, unittest.equals('foo'));
762 unittest.expect(o.environment, unittest.equals('foo'));
763 unittest.expect(o.filterSetId, unittest.equals('foo'));
764 unittest.expect(o.format, unittest.equals('foo'));
765 unittest.expect(o.ownerAccountId, unittest.equals('foo'));
766 checkUnnamed3424(o.platforms);
767 checkRealtimeTimeRange(o.realtimeTimeRange);
768 checkRelativeDateRange(o.relativeDateRange);
769 checkUnnamed3425(o.sellerNetworkIds);
770 unittest.expect(o.timeSeriesGranularity, unittest.equals('foo'));
771 }
772 buildCounterFilterSet--;
773 }
774
775 core.int buildCounterFilteredBidCreativeRow = 0;
776 buildFilteredBidCreativeRow() {
777 var o = new api.FilteredBidCreativeRow();
778 buildCounterFilteredBidCreativeRow++;
779 if (buildCounterFilteredBidCreativeRow < 3) {
780 o.bidCount = buildMetricValue();
781 o.creativeId = "foo";
782 o.rowDimensions = buildRowDimensions();
783 }
784 buildCounterFilteredBidCreativeRow--;
785 return o;
786 }
787
788 checkFilteredBidCreativeRow(api.FilteredBidCreativeRow o) {
789 buildCounterFilteredBidCreativeRow++;
790 if (buildCounterFilteredBidCreativeRow < 3) {
791 checkMetricValue(o.bidCount);
792 unittest.expect(o.creativeId, unittest.equals('foo'));
793 checkRowDimensions(o.rowDimensions);
794 }
795 buildCounterFilteredBidCreativeRow--;
796 }
797
798 core.int buildCounterFilteredBidDetailRow = 0;
799 buildFilteredBidDetailRow() {
800 var o = new api.FilteredBidDetailRow();
801 buildCounterFilteredBidDetailRow++;
802 if (buildCounterFilteredBidDetailRow < 3) {
803 o.bidCount = buildMetricValue();
804 o.detailId = 42;
805 o.rowDimensions = buildRowDimensions();
806 }
807 buildCounterFilteredBidDetailRow--;
808 return o;
809 }
810
811 checkFilteredBidDetailRow(api.FilteredBidDetailRow o) {
812 buildCounterFilteredBidDetailRow++;
813 if (buildCounterFilteredBidDetailRow < 3) {
814 checkMetricValue(o.bidCount);
815 unittest.expect(o.detailId, unittest.equals(42));
816 checkRowDimensions(o.rowDimensions);
817 }
818 buildCounterFilteredBidDetailRow--;
819 }
820
821 buildUnnamed3426() {
588 var o = new core.List<api.Reason>(); 822 var o = new core.List<api.Reason>();
589 o.add(buildReason()); 823 o.add(buildReason());
590 o.add(buildReason()); 824 o.add(buildReason());
591 return o; 825 return o;
592 } 826 }
593 827
594 checkUnnamed3948(core.List<api.Reason> o) { 828 checkUnnamed3426(core.List<api.Reason> o) {
595 unittest.expect(o, unittest.hasLength(2)); 829 unittest.expect(o, unittest.hasLength(2));
596 checkReason(o[0]); 830 checkReason(o[0]);
597 checkReason(o[1]); 831 checkReason(o[1]);
598 } 832 }
599 833
600 core.int buildCounterFilteringStats = 0; 834 core.int buildCounterFilteringStats = 0;
601 buildFilteringStats() { 835 buildFilteringStats() {
602 var o = new api.FilteringStats(); 836 var o = new api.FilteringStats();
603 buildCounterFilteringStats++; 837 buildCounterFilteringStats++;
604 if (buildCounterFilteringStats < 3) { 838 if (buildCounterFilteringStats < 3) {
605 o.date = buildDate(); 839 o.date = buildDate();
606 o.reasons = buildUnnamed3948(); 840 o.reasons = buildUnnamed3426();
607 } 841 }
608 buildCounterFilteringStats--; 842 buildCounterFilteringStats--;
609 return o; 843 return o;
610 } 844 }
611 845
612 checkFilteringStats(api.FilteringStats o) { 846 checkFilteringStats(api.FilteringStats o) {
613 buildCounterFilteringStats++; 847 buildCounterFilteringStats++;
614 if (buildCounterFilteringStats < 3) { 848 if (buildCounterFilteringStats < 3) {
615 checkDate(o.date); 849 checkDate(o.date);
616 checkUnnamed3948(o.reasons); 850 checkUnnamed3426(o.reasons);
617 } 851 }
618 buildCounterFilteringStats--; 852 buildCounterFilteringStats--;
619 } 853 }
620 854
621 core.int buildCounterHtmlContent = 0; 855 core.int buildCounterHtmlContent = 0;
622 buildHtmlContent() { 856 buildHtmlContent() {
623 var o = new api.HtmlContent(); 857 var o = new api.HtmlContent();
624 buildCounterHtmlContent++; 858 buildCounterHtmlContent++;
625 if (buildCounterHtmlContent < 3) { 859 if (buildCounterHtmlContent < 3) {
626 o.height = 42; 860 o.height = 42;
(...skipping 30 matching lines...) Expand all
657 checkImage(api.Image o) { 891 checkImage(api.Image o) {
658 buildCounterImage++; 892 buildCounterImage++;
659 if (buildCounterImage < 3) { 893 if (buildCounterImage < 3) {
660 unittest.expect(o.height, unittest.equals(42)); 894 unittest.expect(o.height, unittest.equals(42));
661 unittest.expect(o.url, unittest.equals('foo')); 895 unittest.expect(o.url, unittest.equals('foo'));
662 unittest.expect(o.width, unittest.equals(42)); 896 unittest.expect(o.width, unittest.equals(42));
663 } 897 }
664 buildCounterImage--; 898 buildCounterImage--;
665 } 899 }
666 900
667 buildUnnamed3949() { 901 core.int buildCounterImpressionMetricsRow = 0;
902 buildImpressionMetricsRow() {
903 var o = new api.ImpressionMetricsRow();
904 buildCounterImpressionMetricsRow++;
905 if (buildCounterImpressionMetricsRow < 3) {
906 o.availableImpressions = buildMetricValue();
907 o.bidRequests = buildMetricValue();
908 o.inventoryMatches = buildMetricValue();
909 o.responsesWithBids = buildMetricValue();
910 o.rowDimensions = buildRowDimensions();
911 o.successfulResponses = buildMetricValue();
912 }
913 buildCounterImpressionMetricsRow--;
914 return o;
915 }
916
917 checkImpressionMetricsRow(api.ImpressionMetricsRow o) {
918 buildCounterImpressionMetricsRow++;
919 if (buildCounterImpressionMetricsRow < 3) {
920 checkMetricValue(o.availableImpressions);
921 checkMetricValue(o.bidRequests);
922 checkMetricValue(o.inventoryMatches);
923 checkMetricValue(o.responsesWithBids);
924 checkRowDimensions(o.rowDimensions);
925 checkMetricValue(o.successfulResponses);
926 }
927 buildCounterImpressionMetricsRow--;
928 }
929
930 core.int buildCounterImpressionStatusRow = 0;
931 buildImpressionStatusRow() {
932 var o = new api.ImpressionStatusRow();
933 buildCounterImpressionStatusRow++;
934 if (buildCounterImpressionStatusRow < 3) {
935 o.impressionCount = buildMetricValue();
936 o.rowDimensions = buildRowDimensions();
937 o.status = "foo";
938 }
939 buildCounterImpressionStatusRow--;
940 return o;
941 }
942
943 checkImpressionStatusRow(api.ImpressionStatusRow o) {
944 buildCounterImpressionStatusRow++;
945 if (buildCounterImpressionStatusRow < 3) {
946 checkMetricValue(o.impressionCount);
947 checkRowDimensions(o.rowDimensions);
948 unittest.expect(o.status, unittest.equals('foo'));
949 }
950 buildCounterImpressionStatusRow--;
951 }
952
953 buildUnnamed3427() {
954 var o = new core.List<api.BidMetricsRow>();
955 o.add(buildBidMetricsRow());
956 o.add(buildBidMetricsRow());
957 return o;
958 }
959
960 checkUnnamed3427(core.List<api.BidMetricsRow> o) {
961 unittest.expect(o, unittest.hasLength(2));
962 checkBidMetricsRow(o[0]);
963 checkBidMetricsRow(o[1]);
964 }
965
966 core.int buildCounterListBidMetricsResponse = 0;
967 buildListBidMetricsResponse() {
968 var o = new api.ListBidMetricsResponse();
969 buildCounterListBidMetricsResponse++;
970 if (buildCounterListBidMetricsResponse < 3) {
971 o.bidMetricsRows = buildUnnamed3427();
972 o.nextPageToken = "foo";
973 }
974 buildCounterListBidMetricsResponse--;
975 return o;
976 }
977
978 checkListBidMetricsResponse(api.ListBidMetricsResponse o) {
979 buildCounterListBidMetricsResponse++;
980 if (buildCounterListBidMetricsResponse < 3) {
981 checkUnnamed3427(o.bidMetricsRows);
982 unittest.expect(o.nextPageToken, unittest.equals('foo'));
983 }
984 buildCounterListBidMetricsResponse--;
985 }
986
987 buildUnnamed3428() {
988 var o = new core.List<api.CalloutStatusRow>();
989 o.add(buildCalloutStatusRow());
990 o.add(buildCalloutStatusRow());
991 return o;
992 }
993
994 checkUnnamed3428(core.List<api.CalloutStatusRow> o) {
995 unittest.expect(o, unittest.hasLength(2));
996 checkCalloutStatusRow(o[0]);
997 checkCalloutStatusRow(o[1]);
998 }
999
1000 core.int buildCounterListBidResponseErrorsResponse = 0;
1001 buildListBidResponseErrorsResponse() {
1002 var o = new api.ListBidResponseErrorsResponse();
1003 buildCounterListBidResponseErrorsResponse++;
1004 if (buildCounterListBidResponseErrorsResponse < 3) {
1005 o.calloutStatusRows = buildUnnamed3428();
1006 o.nextPageToken = "foo";
1007 }
1008 buildCounterListBidResponseErrorsResponse--;
1009 return o;
1010 }
1011
1012 checkListBidResponseErrorsResponse(api.ListBidResponseErrorsResponse o) {
1013 buildCounterListBidResponseErrorsResponse++;
1014 if (buildCounterListBidResponseErrorsResponse < 3) {
1015 checkUnnamed3428(o.calloutStatusRows);
1016 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1017 }
1018 buildCounterListBidResponseErrorsResponse--;
1019 }
1020
1021 buildUnnamed3429() {
1022 var o = new core.List<api.BidResponseWithoutBidsStatusRow>();
1023 o.add(buildBidResponseWithoutBidsStatusRow());
1024 o.add(buildBidResponseWithoutBidsStatusRow());
1025 return o;
1026 }
1027
1028 checkUnnamed3429(core.List<api.BidResponseWithoutBidsStatusRow> o) {
1029 unittest.expect(o, unittest.hasLength(2));
1030 checkBidResponseWithoutBidsStatusRow(o[0]);
1031 checkBidResponseWithoutBidsStatusRow(o[1]);
1032 }
1033
1034 core.int buildCounterListBidResponsesWithoutBidsResponse = 0;
1035 buildListBidResponsesWithoutBidsResponse() {
1036 var o = new api.ListBidResponsesWithoutBidsResponse();
1037 buildCounterListBidResponsesWithoutBidsResponse++;
1038 if (buildCounterListBidResponsesWithoutBidsResponse < 3) {
1039 o.bidResponseWithoutBidsStatusRows = buildUnnamed3429();
1040 o.nextPageToken = "foo";
1041 }
1042 buildCounterListBidResponsesWithoutBidsResponse--;
1043 return o;
1044 }
1045
1046 checkListBidResponsesWithoutBidsResponse(api.ListBidResponsesWithoutBidsResponse o) {
1047 buildCounterListBidResponsesWithoutBidsResponse++;
1048 if (buildCounterListBidResponsesWithoutBidsResponse < 3) {
1049 checkUnnamed3429(o.bidResponseWithoutBidsStatusRows);
1050 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1051 }
1052 buildCounterListBidResponsesWithoutBidsResponse--;
1053 }
1054
1055 buildUnnamed3430() {
668 var o = new core.List<api.ClientUserInvitation>(); 1056 var o = new core.List<api.ClientUserInvitation>();
669 o.add(buildClientUserInvitation()); 1057 o.add(buildClientUserInvitation());
670 o.add(buildClientUserInvitation()); 1058 o.add(buildClientUserInvitation());
671 return o; 1059 return o;
672 } 1060 }
673 1061
674 checkUnnamed3949(core.List<api.ClientUserInvitation> o) { 1062 checkUnnamed3430(core.List<api.ClientUserInvitation> o) {
675 unittest.expect(o, unittest.hasLength(2)); 1063 unittest.expect(o, unittest.hasLength(2));
676 checkClientUserInvitation(o[0]); 1064 checkClientUserInvitation(o[0]);
677 checkClientUserInvitation(o[1]); 1065 checkClientUserInvitation(o[1]);
678 } 1066 }
679 1067
680 core.int buildCounterListClientUserInvitationsResponse = 0; 1068 core.int buildCounterListClientUserInvitationsResponse = 0;
681 buildListClientUserInvitationsResponse() { 1069 buildListClientUserInvitationsResponse() {
682 var o = new api.ListClientUserInvitationsResponse(); 1070 var o = new api.ListClientUserInvitationsResponse();
683 buildCounterListClientUserInvitationsResponse++; 1071 buildCounterListClientUserInvitationsResponse++;
684 if (buildCounterListClientUserInvitationsResponse < 3) { 1072 if (buildCounterListClientUserInvitationsResponse < 3) {
685 o.invitations = buildUnnamed3949(); 1073 o.invitations = buildUnnamed3430();
686 o.nextPageToken = "foo"; 1074 o.nextPageToken = "foo";
687 } 1075 }
688 buildCounterListClientUserInvitationsResponse--; 1076 buildCounterListClientUserInvitationsResponse--;
689 return o; 1077 return o;
690 } 1078 }
691 1079
692 checkListClientUserInvitationsResponse(api.ListClientUserInvitationsResponse o) { 1080 checkListClientUserInvitationsResponse(api.ListClientUserInvitationsResponse o) {
693 buildCounterListClientUserInvitationsResponse++; 1081 buildCounterListClientUserInvitationsResponse++;
694 if (buildCounterListClientUserInvitationsResponse < 3) { 1082 if (buildCounterListClientUserInvitationsResponse < 3) {
695 checkUnnamed3949(o.invitations); 1083 checkUnnamed3430(o.invitations);
696 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1084 unittest.expect(o.nextPageToken, unittest.equals('foo'));
697 } 1085 }
698 buildCounterListClientUserInvitationsResponse--; 1086 buildCounterListClientUserInvitationsResponse--;
699 } 1087 }
700 1088
701 buildUnnamed3950() { 1089 buildUnnamed3431() {
702 var o = new core.List<api.ClientUser>(); 1090 var o = new core.List<api.ClientUser>();
703 o.add(buildClientUser()); 1091 o.add(buildClientUser());
704 o.add(buildClientUser()); 1092 o.add(buildClientUser());
705 return o; 1093 return o;
706 } 1094 }
707 1095
708 checkUnnamed3950(core.List<api.ClientUser> o) { 1096 checkUnnamed3431(core.List<api.ClientUser> o) {
709 unittest.expect(o, unittest.hasLength(2)); 1097 unittest.expect(o, unittest.hasLength(2));
710 checkClientUser(o[0]); 1098 checkClientUser(o[0]);
711 checkClientUser(o[1]); 1099 checkClientUser(o[1]);
712 } 1100 }
713 1101
714 core.int buildCounterListClientUsersResponse = 0; 1102 core.int buildCounterListClientUsersResponse = 0;
715 buildListClientUsersResponse() { 1103 buildListClientUsersResponse() {
716 var o = new api.ListClientUsersResponse(); 1104 var o = new api.ListClientUsersResponse();
717 buildCounterListClientUsersResponse++; 1105 buildCounterListClientUsersResponse++;
718 if (buildCounterListClientUsersResponse < 3) { 1106 if (buildCounterListClientUsersResponse < 3) {
719 o.nextPageToken = "foo"; 1107 o.nextPageToken = "foo";
720 o.users = buildUnnamed3950(); 1108 o.users = buildUnnamed3431();
721 } 1109 }
722 buildCounterListClientUsersResponse--; 1110 buildCounterListClientUsersResponse--;
723 return o; 1111 return o;
724 } 1112 }
725 1113
726 checkListClientUsersResponse(api.ListClientUsersResponse o) { 1114 checkListClientUsersResponse(api.ListClientUsersResponse o) {
727 buildCounterListClientUsersResponse++; 1115 buildCounterListClientUsersResponse++;
728 if (buildCounterListClientUsersResponse < 3) { 1116 if (buildCounterListClientUsersResponse < 3) {
729 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1117 unittest.expect(o.nextPageToken, unittest.equals('foo'));
730 checkUnnamed3950(o.users); 1118 checkUnnamed3431(o.users);
731 } 1119 }
732 buildCounterListClientUsersResponse--; 1120 buildCounterListClientUsersResponse--;
733 } 1121 }
734 1122
735 buildUnnamed3951() { 1123 buildUnnamed3432() {
736 var o = new core.List<api.Client>(); 1124 var o = new core.List<api.Client>();
737 o.add(buildClient()); 1125 o.add(buildClient());
738 o.add(buildClient()); 1126 o.add(buildClient());
739 return o; 1127 return o;
740 } 1128 }
741 1129
742 checkUnnamed3951(core.List<api.Client> o) { 1130 checkUnnamed3432(core.List<api.Client> o) {
743 unittest.expect(o, unittest.hasLength(2)); 1131 unittest.expect(o, unittest.hasLength(2));
744 checkClient(o[0]); 1132 checkClient(o[0]);
745 checkClient(o[1]); 1133 checkClient(o[1]);
746 } 1134 }
747 1135
748 core.int buildCounterListClientsResponse = 0; 1136 core.int buildCounterListClientsResponse = 0;
749 buildListClientsResponse() { 1137 buildListClientsResponse() {
750 var o = new api.ListClientsResponse(); 1138 var o = new api.ListClientsResponse();
751 buildCounterListClientsResponse++; 1139 buildCounterListClientsResponse++;
752 if (buildCounterListClientsResponse < 3) { 1140 if (buildCounterListClientsResponse < 3) {
753 o.clients = buildUnnamed3951(); 1141 o.clients = buildUnnamed3432();
754 o.nextPageToken = "foo"; 1142 o.nextPageToken = "foo";
755 } 1143 }
756 buildCounterListClientsResponse--; 1144 buildCounterListClientsResponse--;
757 return o; 1145 return o;
758 } 1146 }
759 1147
760 checkListClientsResponse(api.ListClientsResponse o) { 1148 checkListClientsResponse(api.ListClientsResponse o) {
761 buildCounterListClientsResponse++; 1149 buildCounterListClientsResponse++;
762 if (buildCounterListClientsResponse < 3) { 1150 if (buildCounterListClientsResponse < 3) {
763 checkUnnamed3951(o.clients); 1151 checkUnnamed3432(o.clients);
764 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1152 unittest.expect(o.nextPageToken, unittest.equals('foo'));
765 } 1153 }
766 buildCounterListClientsResponse--; 1154 buildCounterListClientsResponse--;
767 } 1155 }
768 1156
769 buildUnnamed3952() { 1157 buildUnnamed3433() {
1158 var o = new core.List<api.FilteredBidDetailRow>();
1159 o.add(buildFilteredBidDetailRow());
1160 o.add(buildFilteredBidDetailRow());
1161 return o;
1162 }
1163
1164 checkUnnamed3433(core.List<api.FilteredBidDetailRow> o) {
1165 unittest.expect(o, unittest.hasLength(2));
1166 checkFilteredBidDetailRow(o[0]);
1167 checkFilteredBidDetailRow(o[1]);
1168 }
1169
1170 core.int buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse = 0;
1171 buildListCreativeStatusAndCreativeBreakdownByDetailResponse() {
1172 var o = new api.ListCreativeStatusAndCreativeBreakdownByDetailResponse();
1173 buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse++;
1174 if (buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse < 3) {
1175 o.detailType = "foo";
1176 o.filteredBidDetailRows = buildUnnamed3433();
1177 o.nextPageToken = "foo";
1178 }
1179 buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse--;
1180 return o;
1181 }
1182
1183 checkListCreativeStatusAndCreativeBreakdownByDetailResponse(api.ListCreativeStat usAndCreativeBreakdownByDetailResponse o) {
1184 buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse++;
1185 if (buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse < 3) {
1186 unittest.expect(o.detailType, unittest.equals('foo'));
1187 checkUnnamed3433(o.filteredBidDetailRows);
1188 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1189 }
1190 buildCounterListCreativeStatusAndCreativeBreakdownByDetailResponse--;
1191 }
1192
1193 buildUnnamed3434() {
1194 var o = new core.List<api.FilteredBidCreativeRow>();
1195 o.add(buildFilteredBidCreativeRow());
1196 o.add(buildFilteredBidCreativeRow());
1197 return o;
1198 }
1199
1200 checkUnnamed3434(core.List<api.FilteredBidCreativeRow> o) {
1201 unittest.expect(o, unittest.hasLength(2));
1202 checkFilteredBidCreativeRow(o[0]);
1203 checkFilteredBidCreativeRow(o[1]);
1204 }
1205
1206 core.int buildCounterListCreativeStatusBreakdownByCreativeResponse = 0;
1207 buildListCreativeStatusBreakdownByCreativeResponse() {
1208 var o = new api.ListCreativeStatusBreakdownByCreativeResponse();
1209 buildCounterListCreativeStatusBreakdownByCreativeResponse++;
1210 if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) {
1211 o.filteredBidCreativeRows = buildUnnamed3434();
1212 o.nextPageToken = "foo";
1213 }
1214 buildCounterListCreativeStatusBreakdownByCreativeResponse--;
1215 return o;
1216 }
1217
1218 checkListCreativeStatusBreakdownByCreativeResponse(api.ListCreativeStatusBreakdo wnByCreativeResponse o) {
1219 buildCounterListCreativeStatusBreakdownByCreativeResponse++;
1220 if (buildCounterListCreativeStatusBreakdownByCreativeResponse < 3) {
1221 checkUnnamed3434(o.filteredBidCreativeRows);
1222 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1223 }
1224 buildCounterListCreativeStatusBreakdownByCreativeResponse--;
1225 }
1226
1227 buildUnnamed3435() {
1228 var o = new core.List<api.FilteredBidDetailRow>();
1229 o.add(buildFilteredBidDetailRow());
1230 o.add(buildFilteredBidDetailRow());
1231 return o;
1232 }
1233
1234 checkUnnamed3435(core.List<api.FilteredBidDetailRow> o) {
1235 unittest.expect(o, unittest.hasLength(2));
1236 checkFilteredBidDetailRow(o[0]);
1237 checkFilteredBidDetailRow(o[1]);
1238 }
1239
1240 core.int buildCounterListCreativeStatusBreakdownByDetailResponse = 0;
1241 buildListCreativeStatusBreakdownByDetailResponse() {
1242 var o = new api.ListCreativeStatusBreakdownByDetailResponse();
1243 buildCounterListCreativeStatusBreakdownByDetailResponse++;
1244 if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) {
1245 o.detailType = "foo";
1246 o.filteredBidDetailRows = buildUnnamed3435();
1247 o.nextPageToken = "foo";
1248 }
1249 buildCounterListCreativeStatusBreakdownByDetailResponse--;
1250 return o;
1251 }
1252
1253 checkListCreativeStatusBreakdownByDetailResponse(api.ListCreativeStatusBreakdown ByDetailResponse o) {
1254 buildCounterListCreativeStatusBreakdownByDetailResponse++;
1255 if (buildCounterListCreativeStatusBreakdownByDetailResponse < 3) {
1256 unittest.expect(o.detailType, unittest.equals('foo'));
1257 checkUnnamed3435(o.filteredBidDetailRows);
1258 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1259 }
1260 buildCounterListCreativeStatusBreakdownByDetailResponse--;
1261 }
1262
1263 buildUnnamed3436() {
770 var o = new core.List<api.Creative>(); 1264 var o = new core.List<api.Creative>();
771 o.add(buildCreative()); 1265 o.add(buildCreative());
772 o.add(buildCreative()); 1266 o.add(buildCreative());
773 return o; 1267 return o;
774 } 1268 }
775 1269
776 checkUnnamed3952(core.List<api.Creative> o) { 1270 checkUnnamed3436(core.List<api.Creative> o) {
777 unittest.expect(o, unittest.hasLength(2)); 1271 unittest.expect(o, unittest.hasLength(2));
778 checkCreative(o[0]); 1272 checkCreative(o[0]);
779 checkCreative(o[1]); 1273 checkCreative(o[1]);
780 } 1274 }
781 1275
782 core.int buildCounterListCreativesResponse = 0; 1276 core.int buildCounterListCreativesResponse = 0;
783 buildListCreativesResponse() { 1277 buildListCreativesResponse() {
784 var o = new api.ListCreativesResponse(); 1278 var o = new api.ListCreativesResponse();
785 buildCounterListCreativesResponse++; 1279 buildCounterListCreativesResponse++;
786 if (buildCounterListCreativesResponse < 3) { 1280 if (buildCounterListCreativesResponse < 3) {
787 o.creatives = buildUnnamed3952(); 1281 o.creatives = buildUnnamed3436();
788 o.nextPageToken = "foo"; 1282 o.nextPageToken = "foo";
789 } 1283 }
790 buildCounterListCreativesResponse--; 1284 buildCounterListCreativesResponse--;
791 return o; 1285 return o;
792 } 1286 }
793 1287
794 checkListCreativesResponse(api.ListCreativesResponse o) { 1288 checkListCreativesResponse(api.ListCreativesResponse o) {
795 buildCounterListCreativesResponse++; 1289 buildCounterListCreativesResponse++;
796 if (buildCounterListCreativesResponse < 3) { 1290 if (buildCounterListCreativesResponse < 3) {
797 checkUnnamed3952(o.creatives); 1291 checkUnnamed3436(o.creatives);
798 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1292 unittest.expect(o.nextPageToken, unittest.equals('foo'));
799 } 1293 }
800 buildCounterListCreativesResponse--; 1294 buildCounterListCreativesResponse--;
801 } 1295 }
802 1296
803 buildUnnamed3953() { 1297 buildUnnamed3437() {
804 var o = new core.List<api.CreativeDealAssociation>(); 1298 var o = new core.List<api.CreativeDealAssociation>();
805 o.add(buildCreativeDealAssociation()); 1299 o.add(buildCreativeDealAssociation());
806 o.add(buildCreativeDealAssociation()); 1300 o.add(buildCreativeDealAssociation());
807 return o; 1301 return o;
808 } 1302 }
809 1303
810 checkUnnamed3953(core.List<api.CreativeDealAssociation> o) { 1304 checkUnnamed3437(core.List<api.CreativeDealAssociation> o) {
811 unittest.expect(o, unittest.hasLength(2)); 1305 unittest.expect(o, unittest.hasLength(2));
812 checkCreativeDealAssociation(o[0]); 1306 checkCreativeDealAssociation(o[0]);
813 checkCreativeDealAssociation(o[1]); 1307 checkCreativeDealAssociation(o[1]);
814 } 1308 }
815 1309
816 core.int buildCounterListDealAssociationsResponse = 0; 1310 core.int buildCounterListDealAssociationsResponse = 0;
817 buildListDealAssociationsResponse() { 1311 buildListDealAssociationsResponse() {
818 var o = new api.ListDealAssociationsResponse(); 1312 var o = new api.ListDealAssociationsResponse();
819 buildCounterListDealAssociationsResponse++; 1313 buildCounterListDealAssociationsResponse++;
820 if (buildCounterListDealAssociationsResponse < 3) { 1314 if (buildCounterListDealAssociationsResponse < 3) {
821 o.associations = buildUnnamed3953(); 1315 o.associations = buildUnnamed3437();
822 o.nextPageToken = "foo"; 1316 o.nextPageToken = "foo";
823 } 1317 }
824 buildCounterListDealAssociationsResponse--; 1318 buildCounterListDealAssociationsResponse--;
825 return o; 1319 return o;
826 } 1320 }
827 1321
828 checkListDealAssociationsResponse(api.ListDealAssociationsResponse o) { 1322 checkListDealAssociationsResponse(api.ListDealAssociationsResponse o) {
829 buildCounterListDealAssociationsResponse++; 1323 buildCounterListDealAssociationsResponse++;
830 if (buildCounterListDealAssociationsResponse < 3) { 1324 if (buildCounterListDealAssociationsResponse < 3) {
831 checkUnnamed3953(o.associations); 1325 checkUnnamed3437(o.associations);
832 unittest.expect(o.nextPageToken, unittest.equals('foo')); 1326 unittest.expect(o.nextPageToken, unittest.equals('foo'));
833 } 1327 }
834 buildCounterListDealAssociationsResponse--; 1328 buildCounterListDealAssociationsResponse--;
835 } 1329 }
836 1330
837 buildUnnamed3954() { 1331 buildUnnamed3438() {
1332 var o = new core.List<api.FilterSet>();
1333 o.add(buildFilterSet());
1334 o.add(buildFilterSet());
1335 return o;
1336 }
1337
1338 checkUnnamed3438(core.List<api.FilterSet> o) {
1339 unittest.expect(o, unittest.hasLength(2));
1340 checkFilterSet(o[0]);
1341 checkFilterSet(o[1]);
1342 }
1343
1344 core.int buildCounterListFilterSetsResponse = 0;
1345 buildListFilterSetsResponse() {
1346 var o = new api.ListFilterSetsResponse();
1347 buildCounterListFilterSetsResponse++;
1348 if (buildCounterListFilterSetsResponse < 3) {
1349 o.filterSets = buildUnnamed3438();
1350 o.nextPageToken = "foo";
1351 }
1352 buildCounterListFilterSetsResponse--;
1353 return o;
1354 }
1355
1356 checkListFilterSetsResponse(api.ListFilterSetsResponse o) {
1357 buildCounterListFilterSetsResponse++;
1358 if (buildCounterListFilterSetsResponse < 3) {
1359 checkUnnamed3438(o.filterSets);
1360 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1361 }
1362 buildCounterListFilterSetsResponse--;
1363 }
1364
1365 buildUnnamed3439() {
1366 var o = new core.List<api.CalloutStatusRow>();
1367 o.add(buildCalloutStatusRow());
1368 o.add(buildCalloutStatusRow());
1369 return o;
1370 }
1371
1372 checkUnnamed3439(core.List<api.CalloutStatusRow> o) {
1373 unittest.expect(o, unittest.hasLength(2));
1374 checkCalloutStatusRow(o[0]);
1375 checkCalloutStatusRow(o[1]);
1376 }
1377
1378 core.int buildCounterListFilteredBidRequestsResponse = 0;
1379 buildListFilteredBidRequestsResponse() {
1380 var o = new api.ListFilteredBidRequestsResponse();
1381 buildCounterListFilteredBidRequestsResponse++;
1382 if (buildCounterListFilteredBidRequestsResponse < 3) {
1383 o.calloutStatusRows = buildUnnamed3439();
1384 o.nextPageToken = "foo";
1385 }
1386 buildCounterListFilteredBidRequestsResponse--;
1387 return o;
1388 }
1389
1390 checkListFilteredBidRequestsResponse(api.ListFilteredBidRequestsResponse o) {
1391 buildCounterListFilteredBidRequestsResponse++;
1392 if (buildCounterListFilteredBidRequestsResponse < 3) {
1393 checkUnnamed3439(o.calloutStatusRows);
1394 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1395 }
1396 buildCounterListFilteredBidRequestsResponse--;
1397 }
1398
1399 buildUnnamed3440() {
1400 var o = new core.List<api.CreativeStatusRow>();
1401 o.add(buildCreativeStatusRow());
1402 o.add(buildCreativeStatusRow());
1403 return o;
1404 }
1405
1406 checkUnnamed3440(core.List<api.CreativeStatusRow> o) {
1407 unittest.expect(o, unittest.hasLength(2));
1408 checkCreativeStatusRow(o[0]);
1409 checkCreativeStatusRow(o[1]);
1410 }
1411
1412 core.int buildCounterListFilteredBidsResponse = 0;
1413 buildListFilteredBidsResponse() {
1414 var o = new api.ListFilteredBidsResponse();
1415 buildCounterListFilteredBidsResponse++;
1416 if (buildCounterListFilteredBidsResponse < 3) {
1417 o.creativeStatusRows = buildUnnamed3440();
1418 o.nextPageToken = "foo";
1419 }
1420 buildCounterListFilteredBidsResponse--;
1421 return o;
1422 }
1423
1424 checkListFilteredBidsResponse(api.ListFilteredBidsResponse o) {
1425 buildCounterListFilteredBidsResponse++;
1426 if (buildCounterListFilteredBidsResponse < 3) {
1427 checkUnnamed3440(o.creativeStatusRows);
1428 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1429 }
1430 buildCounterListFilteredBidsResponse--;
1431 }
1432
1433 buildUnnamed3441() {
1434 var o = new core.List<api.ImpressionStatusRow>();
1435 o.add(buildImpressionStatusRow());
1436 o.add(buildImpressionStatusRow());
1437 return o;
1438 }
1439
1440 checkUnnamed3441(core.List<api.ImpressionStatusRow> o) {
1441 unittest.expect(o, unittest.hasLength(2));
1442 checkImpressionStatusRow(o[0]);
1443 checkImpressionStatusRow(o[1]);
1444 }
1445
1446 core.int buildCounterListFilteredImpressionsResponse = 0;
1447 buildListFilteredImpressionsResponse() {
1448 var o = new api.ListFilteredImpressionsResponse();
1449 buildCounterListFilteredImpressionsResponse++;
1450 if (buildCounterListFilteredImpressionsResponse < 3) {
1451 o.impressionsStatusRows = buildUnnamed3441();
1452 o.nextPageToken = "foo";
1453 }
1454 buildCounterListFilteredImpressionsResponse--;
1455 return o;
1456 }
1457
1458 checkListFilteredImpressionsResponse(api.ListFilteredImpressionsResponse o) {
1459 buildCounterListFilteredImpressionsResponse++;
1460 if (buildCounterListFilteredImpressionsResponse < 3) {
1461 checkUnnamed3441(o.impressionsStatusRows);
1462 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1463 }
1464 buildCounterListFilteredImpressionsResponse--;
1465 }
1466
1467 buildUnnamed3442() {
1468 var o = new core.List<api.ImpressionMetricsRow>();
1469 o.add(buildImpressionMetricsRow());
1470 o.add(buildImpressionMetricsRow());
1471 return o;
1472 }
1473
1474 checkUnnamed3442(core.List<api.ImpressionMetricsRow> o) {
1475 unittest.expect(o, unittest.hasLength(2));
1476 checkImpressionMetricsRow(o[0]);
1477 checkImpressionMetricsRow(o[1]);
1478 }
1479
1480 core.int buildCounterListImpressionMetricsResponse = 0;
1481 buildListImpressionMetricsResponse() {
1482 var o = new api.ListImpressionMetricsResponse();
1483 buildCounterListImpressionMetricsResponse++;
1484 if (buildCounterListImpressionMetricsResponse < 3) {
1485 o.impressionMetricsRows = buildUnnamed3442();
1486 o.nextPageToken = "foo";
1487 }
1488 buildCounterListImpressionMetricsResponse--;
1489 return o;
1490 }
1491
1492 checkListImpressionMetricsResponse(api.ListImpressionMetricsResponse o) {
1493 buildCounterListImpressionMetricsResponse++;
1494 if (buildCounterListImpressionMetricsResponse < 3) {
1495 checkUnnamed3442(o.impressionMetricsRows);
1496 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1497 }
1498 buildCounterListImpressionMetricsResponse--;
1499 }
1500
1501 buildUnnamed3443() {
1502 var o = new core.List<api.CreativeStatusRow>();
1503 o.add(buildCreativeStatusRow());
1504 o.add(buildCreativeStatusRow());
1505 return o;
1506 }
1507
1508 checkUnnamed3443(core.List<api.CreativeStatusRow> o) {
1509 unittest.expect(o, unittest.hasLength(2));
1510 checkCreativeStatusRow(o[0]);
1511 checkCreativeStatusRow(o[1]);
1512 }
1513
1514 core.int buildCounterListLosingBidsResponse = 0;
1515 buildListLosingBidsResponse() {
1516 var o = new api.ListLosingBidsResponse();
1517 buildCounterListLosingBidsResponse++;
1518 if (buildCounterListLosingBidsResponse < 3) {
1519 o.creativeStatusRows = buildUnnamed3443();
1520 o.nextPageToken = "foo";
1521 }
1522 buildCounterListLosingBidsResponse--;
1523 return o;
1524 }
1525
1526 checkListLosingBidsResponse(api.ListLosingBidsResponse o) {
1527 buildCounterListLosingBidsResponse++;
1528 if (buildCounterListLosingBidsResponse < 3) {
1529 checkUnnamed3443(o.creativeStatusRows);
1530 unittest.expect(o.nextPageToken, unittest.equals('foo'));
1531 }
1532 buildCounterListLosingBidsResponse--;
1533 }
1534
1535 buildUnnamed3444() {
838 var o = new core.List<core.int>(); 1536 var o = new core.List<core.int>();
839 o.add(42); 1537 o.add(42);
840 o.add(42); 1538 o.add(42);
841 return o; 1539 return o;
842 } 1540 }
843 1541
844 checkUnnamed3954(core.List<core.int> o) { 1542 checkUnnamed3444(core.List<core.int> o) {
845 unittest.expect(o, unittest.hasLength(2)); 1543 unittest.expect(o, unittest.hasLength(2));
846 unittest.expect(o[0], unittest.equals(42)); 1544 unittest.expect(o[0], unittest.equals(42));
847 unittest.expect(o[1], unittest.equals(42)); 1545 unittest.expect(o[1], unittest.equals(42));
848 } 1546 }
849 1547
850 core.int buildCounterLocationContext = 0; 1548 core.int buildCounterLocationContext = 0;
851 buildLocationContext() { 1549 buildLocationContext() {
852 var o = new api.LocationContext(); 1550 var o = new api.LocationContext();
853 buildCounterLocationContext++; 1551 buildCounterLocationContext++;
854 if (buildCounterLocationContext < 3) { 1552 if (buildCounterLocationContext < 3) {
855 o.geoCriteriaIds = buildUnnamed3954(); 1553 o.geoCriteriaIds = buildUnnamed3444();
856 } 1554 }
857 buildCounterLocationContext--; 1555 buildCounterLocationContext--;
858 return o; 1556 return o;
859 } 1557 }
860 1558
861 checkLocationContext(api.LocationContext o) { 1559 checkLocationContext(api.LocationContext o) {
862 buildCounterLocationContext++; 1560 buildCounterLocationContext++;
863 if (buildCounterLocationContext < 3) { 1561 if (buildCounterLocationContext < 3) {
864 checkUnnamed3954(o.geoCriteriaIds); 1562 checkUnnamed3444(o.geoCriteriaIds);
865 } 1563 }
866 buildCounterLocationContext--; 1564 buildCounterLocationContext--;
867 } 1565 }
868 1566
1567 core.int buildCounterMetricValue = 0;
1568 buildMetricValue() {
1569 var o = new api.MetricValue();
1570 buildCounterMetricValue++;
1571 if (buildCounterMetricValue < 3) {
1572 o.value = "foo";
1573 o.variance = "foo";
1574 }
1575 buildCounterMetricValue--;
1576 return o;
1577 }
1578
1579 checkMetricValue(api.MetricValue o) {
1580 buildCounterMetricValue++;
1581 if (buildCounterMetricValue < 3) {
1582 unittest.expect(o.value, unittest.equals('foo'));
1583 unittest.expect(o.variance, unittest.equals('foo'));
1584 }
1585 buildCounterMetricValue--;
1586 }
1587
869 core.int buildCounterNativeContent = 0; 1588 core.int buildCounterNativeContent = 0;
870 buildNativeContent() { 1589 buildNativeContent() {
871 var o = new api.NativeContent(); 1590 var o = new api.NativeContent();
872 buildCounterNativeContent++; 1591 buildCounterNativeContent++;
873 if (buildCounterNativeContent < 3) { 1592 if (buildCounterNativeContent < 3) {
874 o.advertiserName = "foo"; 1593 o.advertiserName = "foo";
875 o.appIcon = buildImage(); 1594 o.appIcon = buildImage();
876 o.body = "foo"; 1595 o.body = "foo";
877 o.callToAction = "foo"; 1596 o.callToAction = "foo";
878 o.clickLinkUrl = "foo"; 1597 o.clickLinkUrl = "foo";
(...skipping 23 matching lines...) Expand all
902 checkImage(o.image); 1621 checkImage(o.image);
903 checkImage(o.logo); 1622 checkImage(o.logo);
904 unittest.expect(o.priceDisplayText, unittest.equals('foo')); 1623 unittest.expect(o.priceDisplayText, unittest.equals('foo'));
905 unittest.expect(o.starRating, unittest.equals(42.0)); 1624 unittest.expect(o.starRating, unittest.equals(42.0));
906 unittest.expect(o.storeUrl, unittest.equals('foo')); 1625 unittest.expect(o.storeUrl, unittest.equals('foo'));
907 unittest.expect(o.videoUrl, unittest.equals('foo')); 1626 unittest.expect(o.videoUrl, unittest.equals('foo'));
908 } 1627 }
909 buildCounterNativeContent--; 1628 buildCounterNativeContent--;
910 } 1629 }
911 1630
912 buildUnnamed3955() { 1631 buildUnnamed3445() {
913 var o = new core.List<core.String>(); 1632 var o = new core.List<core.String>();
914 o.add("foo"); 1633 o.add("foo");
915 o.add("foo"); 1634 o.add("foo");
916 return o; 1635 return o;
917 } 1636 }
918 1637
919 checkUnnamed3955(core.List<core.String> o) { 1638 checkUnnamed3445(core.List<core.String> o) {
920 unittest.expect(o, unittest.hasLength(2)); 1639 unittest.expect(o, unittest.hasLength(2));
921 unittest.expect(o[0], unittest.equals('foo')); 1640 unittest.expect(o[0], unittest.equals('foo'));
922 unittest.expect(o[1], unittest.equals('foo')); 1641 unittest.expect(o[1], unittest.equals('foo'));
923 } 1642 }
924 1643
925 core.int buildCounterPlatformContext = 0; 1644 core.int buildCounterPlatformContext = 0;
926 buildPlatformContext() { 1645 buildPlatformContext() {
927 var o = new api.PlatformContext(); 1646 var o = new api.PlatformContext();
928 buildCounterPlatformContext++; 1647 buildCounterPlatformContext++;
929 if (buildCounterPlatformContext < 3) { 1648 if (buildCounterPlatformContext < 3) {
930 o.platforms = buildUnnamed3955(); 1649 o.platforms = buildUnnamed3445();
931 } 1650 }
932 buildCounterPlatformContext--; 1651 buildCounterPlatformContext--;
933 return o; 1652 return o;
934 } 1653 }
935 1654
936 checkPlatformContext(api.PlatformContext o) { 1655 checkPlatformContext(api.PlatformContext o) {
937 buildCounterPlatformContext++; 1656 buildCounterPlatformContext++;
938 if (buildCounterPlatformContext < 3) { 1657 if (buildCounterPlatformContext < 3) {
939 checkUnnamed3955(o.platforms); 1658 checkUnnamed3445(o.platforms);
940 } 1659 }
941 buildCounterPlatformContext--; 1660 buildCounterPlatformContext--;
942 } 1661 }
943 1662
1663 core.int buildCounterRealtimeTimeRange = 0;
1664 buildRealtimeTimeRange() {
1665 var o = new api.RealtimeTimeRange();
1666 buildCounterRealtimeTimeRange++;
1667 if (buildCounterRealtimeTimeRange < 3) {
1668 o.startTimestamp = "foo";
1669 }
1670 buildCounterRealtimeTimeRange--;
1671 return o;
1672 }
1673
1674 checkRealtimeTimeRange(api.RealtimeTimeRange o) {
1675 buildCounterRealtimeTimeRange++;
1676 if (buildCounterRealtimeTimeRange < 3) {
1677 unittest.expect(o.startTimestamp, unittest.equals('foo'));
1678 }
1679 buildCounterRealtimeTimeRange--;
1680 }
1681
944 core.int buildCounterReason = 0; 1682 core.int buildCounterReason = 0;
945 buildReason() { 1683 buildReason() {
946 var o = new api.Reason(); 1684 var o = new api.Reason();
947 buildCounterReason++; 1685 buildCounterReason++;
948 if (buildCounterReason < 3) { 1686 if (buildCounterReason < 3) {
949 o.count = "foo"; 1687 o.count = "foo";
950 o.status = 42; 1688 o.status = 42;
951 } 1689 }
952 buildCounterReason--; 1690 buildCounterReason--;
953 return o; 1691 return o;
954 } 1692 }
955 1693
956 checkReason(api.Reason o) { 1694 checkReason(api.Reason o) {
957 buildCounterReason++; 1695 buildCounterReason++;
958 if (buildCounterReason < 3) { 1696 if (buildCounterReason < 3) {
959 unittest.expect(o.count, unittest.equals('foo')); 1697 unittest.expect(o.count, unittest.equals('foo'));
960 unittest.expect(o.status, unittest.equals(42)); 1698 unittest.expect(o.status, unittest.equals(42));
961 } 1699 }
962 buildCounterReason--; 1700 buildCounterReason--;
963 } 1701 }
964 1702
1703 core.int buildCounterRelativeDateRange = 0;
1704 buildRelativeDateRange() {
1705 var o = new api.RelativeDateRange();
1706 buildCounterRelativeDateRange++;
1707 if (buildCounterRelativeDateRange < 3) {
1708 o.durationDays = 42;
1709 o.offsetDays = 42;
1710 }
1711 buildCounterRelativeDateRange--;
1712 return o;
1713 }
1714
1715 checkRelativeDateRange(api.RelativeDateRange o) {
1716 buildCounterRelativeDateRange++;
1717 if (buildCounterRelativeDateRange < 3) {
1718 unittest.expect(o.durationDays, unittest.equals(42));
1719 unittest.expect(o.offsetDays, unittest.equals(42));
1720 }
1721 buildCounterRelativeDateRange--;
1722 }
1723
965 core.int buildCounterRemoveDealAssociationRequest = 0; 1724 core.int buildCounterRemoveDealAssociationRequest = 0;
966 buildRemoveDealAssociationRequest() { 1725 buildRemoveDealAssociationRequest() {
967 var o = new api.RemoveDealAssociationRequest(); 1726 var o = new api.RemoveDealAssociationRequest();
968 buildCounterRemoveDealAssociationRequest++; 1727 buildCounterRemoveDealAssociationRequest++;
969 if (buildCounterRemoveDealAssociationRequest < 3) { 1728 if (buildCounterRemoveDealAssociationRequest < 3) {
970 o.association = buildCreativeDealAssociation(); 1729 o.association = buildCreativeDealAssociation();
971 } 1730 }
972 buildCounterRemoveDealAssociationRequest--; 1731 buildCounterRemoveDealAssociationRequest--;
973 return o; 1732 return o;
974 } 1733 }
975 1734
976 checkRemoveDealAssociationRequest(api.RemoveDealAssociationRequest o) { 1735 checkRemoveDealAssociationRequest(api.RemoveDealAssociationRequest o) {
977 buildCounterRemoveDealAssociationRequest++; 1736 buildCounterRemoveDealAssociationRequest++;
978 if (buildCounterRemoveDealAssociationRequest < 3) { 1737 if (buildCounterRemoveDealAssociationRequest < 3) {
979 checkCreativeDealAssociation(o.association); 1738 checkCreativeDealAssociation(o.association);
980 } 1739 }
981 buildCounterRemoveDealAssociationRequest--; 1740 buildCounterRemoveDealAssociationRequest--;
982 } 1741 }
983 1742
984 buildUnnamed3956() { 1743 core.int buildCounterRowDimensions = 0;
1744 buildRowDimensions() {
1745 var o = new api.RowDimensions();
1746 buildCounterRowDimensions++;
1747 if (buildCounterRowDimensions < 3) {
1748 o.timeInterval = buildTimeInterval();
1749 }
1750 buildCounterRowDimensions--;
1751 return o;
1752 }
1753
1754 checkRowDimensions(api.RowDimensions o) {
1755 buildCounterRowDimensions++;
1756 if (buildCounterRowDimensions < 3) {
1757 checkTimeInterval(o.timeInterval);
1758 }
1759 buildCounterRowDimensions--;
1760 }
1761
1762 buildUnnamed3446() {
985 var o = new core.List<core.String>(); 1763 var o = new core.List<core.String>();
986 o.add("foo"); 1764 o.add("foo");
987 o.add("foo"); 1765 o.add("foo");
988 return o; 1766 return o;
989 } 1767 }
990 1768
991 checkUnnamed3956(core.List<core.String> o) { 1769 checkUnnamed3446(core.List<core.String> o) {
992 unittest.expect(o, unittest.hasLength(2)); 1770 unittest.expect(o, unittest.hasLength(2));
993 unittest.expect(o[0], unittest.equals('foo')); 1771 unittest.expect(o[0], unittest.equals('foo'));
994 unittest.expect(o[1], unittest.equals('foo')); 1772 unittest.expect(o[1], unittest.equals('foo'));
995 } 1773 }
996 1774
997 core.int buildCounterSecurityContext = 0; 1775 core.int buildCounterSecurityContext = 0;
998 buildSecurityContext() { 1776 buildSecurityContext() {
999 var o = new api.SecurityContext(); 1777 var o = new api.SecurityContext();
1000 buildCounterSecurityContext++; 1778 buildCounterSecurityContext++;
1001 if (buildCounterSecurityContext < 3) { 1779 if (buildCounterSecurityContext < 3) {
1002 o.securities = buildUnnamed3956(); 1780 o.securities = buildUnnamed3446();
1003 } 1781 }
1004 buildCounterSecurityContext--; 1782 buildCounterSecurityContext--;
1005 return o; 1783 return o;
1006 } 1784 }
1007 1785
1008 checkSecurityContext(api.SecurityContext o) { 1786 checkSecurityContext(api.SecurityContext o) {
1009 buildCounterSecurityContext++; 1787 buildCounterSecurityContext++;
1010 if (buildCounterSecurityContext < 3) { 1788 if (buildCounterSecurityContext < 3) {
1011 checkUnnamed3956(o.securities); 1789 checkUnnamed3446(o.securities);
1012 } 1790 }
1013 buildCounterSecurityContext--; 1791 buildCounterSecurityContext--;
1014 } 1792 }
1015 1793
1016 core.int buildCounterServingContext = 0; 1794 core.int buildCounterServingContext = 0;
1017 buildServingContext() { 1795 buildServingContext() {
1018 var o = new api.ServingContext(); 1796 var o = new api.ServingContext();
1019 buildCounterServingContext++; 1797 buildCounterServingContext++;
1020 if (buildCounterServingContext < 3) { 1798 if (buildCounterServingContext < 3) {
1021 o.all = "foo"; 1799 o.all = "foo";
(...skipping 13 matching lines...) Expand all
1035 unittest.expect(o.all, unittest.equals('foo')); 1813 unittest.expect(o.all, unittest.equals('foo'));
1036 checkAppContext(o.appType); 1814 checkAppContext(o.appType);
1037 checkAuctionContext(o.auctionType); 1815 checkAuctionContext(o.auctionType);
1038 checkLocationContext(o.location); 1816 checkLocationContext(o.location);
1039 checkPlatformContext(o.platform); 1817 checkPlatformContext(o.platform);
1040 checkSecurityContext(o.securityType); 1818 checkSecurityContext(o.securityType);
1041 } 1819 }
1042 buildCounterServingContext--; 1820 buildCounterServingContext--;
1043 } 1821 }
1044 1822
1045 buildUnnamed3957() { 1823 buildUnnamed3447() {
1046 var o = new core.List<api.ServingContext>(); 1824 var o = new core.List<api.ServingContext>();
1047 o.add(buildServingContext()); 1825 o.add(buildServingContext());
1048 o.add(buildServingContext()); 1826 o.add(buildServingContext());
1049 return o; 1827 return o;
1050 } 1828 }
1051 1829
1052 checkUnnamed3957(core.List<api.ServingContext> o) { 1830 checkUnnamed3447(core.List<api.ServingContext> o) {
1053 unittest.expect(o, unittest.hasLength(2)); 1831 unittest.expect(o, unittest.hasLength(2));
1054 checkServingContext(o[0]); 1832 checkServingContext(o[0]);
1055 checkServingContext(o[1]); 1833 checkServingContext(o[1]);
1056 } 1834 }
1057 1835
1058 buildUnnamed3958() { 1836 buildUnnamed3448() {
1059 var o = new core.List<api.Disapproval>(); 1837 var o = new core.List<api.Disapproval>();
1060 o.add(buildDisapproval()); 1838 o.add(buildDisapproval());
1061 o.add(buildDisapproval()); 1839 o.add(buildDisapproval());
1062 return o; 1840 return o;
1063 } 1841 }
1064 1842
1065 checkUnnamed3958(core.List<api.Disapproval> o) { 1843 checkUnnamed3448(core.List<api.Disapproval> o) {
1066 unittest.expect(o, unittest.hasLength(2)); 1844 unittest.expect(o, unittest.hasLength(2));
1067 checkDisapproval(o[0]); 1845 checkDisapproval(o[0]);
1068 checkDisapproval(o[1]); 1846 checkDisapproval(o[1]);
1069 } 1847 }
1070 1848
1071 core.int buildCounterServingRestriction = 0; 1849 core.int buildCounterServingRestriction = 0;
1072 buildServingRestriction() { 1850 buildServingRestriction() {
1073 var o = new api.ServingRestriction(); 1851 var o = new api.ServingRestriction();
1074 buildCounterServingRestriction++; 1852 buildCounterServingRestriction++;
1075 if (buildCounterServingRestriction < 3) { 1853 if (buildCounterServingRestriction < 3) {
1076 o.contexts = buildUnnamed3957(); 1854 o.contexts = buildUnnamed3447();
1077 o.disapprovalReasons = buildUnnamed3958(); 1855 o.disapprovalReasons = buildUnnamed3448();
1078 o.status = "foo"; 1856 o.status = "foo";
1079 } 1857 }
1080 buildCounterServingRestriction--; 1858 buildCounterServingRestriction--;
1081 return o; 1859 return o;
1082 } 1860 }
1083 1861
1084 checkServingRestriction(api.ServingRestriction o) { 1862 checkServingRestriction(api.ServingRestriction o) {
1085 buildCounterServingRestriction++; 1863 buildCounterServingRestriction++;
1086 if (buildCounterServingRestriction < 3) { 1864 if (buildCounterServingRestriction < 3) {
1087 checkUnnamed3957(o.contexts); 1865 checkUnnamed3447(o.contexts);
1088 checkUnnamed3958(o.disapprovalReasons); 1866 checkUnnamed3448(o.disapprovalReasons);
1089 unittest.expect(o.status, unittest.equals('foo')); 1867 unittest.expect(o.status, unittest.equals('foo'));
1090 } 1868 }
1091 buildCounterServingRestriction--; 1869 buildCounterServingRestriction--;
1092 } 1870 }
1093 1871
1094 core.int buildCounterStopWatchingCreativeRequest = 0; 1872 core.int buildCounterStopWatchingCreativeRequest = 0;
1095 buildStopWatchingCreativeRequest() { 1873 buildStopWatchingCreativeRequest() {
1096 var o = new api.StopWatchingCreativeRequest(); 1874 var o = new api.StopWatchingCreativeRequest();
1097 buildCounterStopWatchingCreativeRequest++; 1875 buildCounterStopWatchingCreativeRequest++;
1098 if (buildCounterStopWatchingCreativeRequest < 3) { 1876 if (buildCounterStopWatchingCreativeRequest < 3) {
1099 } 1877 }
1100 buildCounterStopWatchingCreativeRequest--; 1878 buildCounterStopWatchingCreativeRequest--;
1101 return o; 1879 return o;
1102 } 1880 }
1103 1881
1104 checkStopWatchingCreativeRequest(api.StopWatchingCreativeRequest o) { 1882 checkStopWatchingCreativeRequest(api.StopWatchingCreativeRequest o) {
1105 buildCounterStopWatchingCreativeRequest++; 1883 buildCounterStopWatchingCreativeRequest++;
1106 if (buildCounterStopWatchingCreativeRequest < 3) { 1884 if (buildCounterStopWatchingCreativeRequest < 3) {
1107 } 1885 }
1108 buildCounterStopWatchingCreativeRequest--; 1886 buildCounterStopWatchingCreativeRequest--;
1109 } 1887 }
1110 1888
1889 core.int buildCounterTimeInterval = 0;
1890 buildTimeInterval() {
1891 var o = new api.TimeInterval();
1892 buildCounterTimeInterval++;
1893 if (buildCounterTimeInterval < 3) {
1894 o.endTime = "foo";
1895 o.startTime = "foo";
1896 }
1897 buildCounterTimeInterval--;
1898 return o;
1899 }
1900
1901 checkTimeInterval(api.TimeInterval o) {
1902 buildCounterTimeInterval++;
1903 if (buildCounterTimeInterval < 3) {
1904 unittest.expect(o.endTime, unittest.equals('foo'));
1905 unittest.expect(o.startTime, unittest.equals('foo'));
1906 }
1907 buildCounterTimeInterval--;
1908 }
1909
1111 core.int buildCounterVideoContent = 0; 1910 core.int buildCounterVideoContent = 0;
1112 buildVideoContent() { 1911 buildVideoContent() {
1113 var o = new api.VideoContent(); 1912 var o = new api.VideoContent();
1114 buildCounterVideoContent++; 1913 buildCounterVideoContent++;
1115 if (buildCounterVideoContent < 3) { 1914 if (buildCounterVideoContent < 3) {
1116 o.videoUrl = "foo"; 1915 o.videoUrl = "foo";
1117 } 1916 }
1118 buildCounterVideoContent--; 1917 buildCounterVideoContent--;
1119 return o; 1918 return o;
1120 } 1919 }
(...skipping 20 matching lines...) Expand all
1141 checkWatchCreativeRequest(api.WatchCreativeRequest o) { 1940 checkWatchCreativeRequest(api.WatchCreativeRequest o) {
1142 buildCounterWatchCreativeRequest++; 1941 buildCounterWatchCreativeRequest++;
1143 if (buildCounterWatchCreativeRequest < 3) { 1942 if (buildCounterWatchCreativeRequest < 3) {
1144 unittest.expect(o.topic, unittest.equals('foo')); 1943 unittest.expect(o.topic, unittest.equals('foo'));
1145 } 1944 }
1146 buildCounterWatchCreativeRequest--; 1945 buildCounterWatchCreativeRequest--;
1147 } 1946 }
1148 1947
1149 1948
1150 main() { 1949 main() {
1950 unittest.group("obj-schema-AbsoluteDateRange", () {
1951 unittest.test("to-json--from-json", () {
1952 var o = buildAbsoluteDateRange();
1953 var od = new api.AbsoluteDateRange.fromJson(o.toJson());
1954 checkAbsoluteDateRange(od);
1955 });
1956 });
1957
1958
1151 unittest.group("obj-schema-AddDealAssociationRequest", () { 1959 unittest.group("obj-schema-AddDealAssociationRequest", () {
1152 unittest.test("to-json--from-json", () { 1960 unittest.test("to-json--from-json", () {
1153 var o = buildAddDealAssociationRequest(); 1961 var o = buildAddDealAssociationRequest();
1154 var od = new api.AddDealAssociationRequest.fromJson(o.toJson()); 1962 var od = new api.AddDealAssociationRequest.fromJson(o.toJson());
1155 checkAddDealAssociationRequest(od); 1963 checkAddDealAssociationRequest(od);
1156 }); 1964 });
1157 }); 1965 });
1158 1966
1159 1967
1160 unittest.group("obj-schema-AppContext", () { 1968 unittest.group("obj-schema-AppContext", () {
1161 unittest.test("to-json--from-json", () { 1969 unittest.test("to-json--from-json", () {
1162 var o = buildAppContext(); 1970 var o = buildAppContext();
1163 var od = new api.AppContext.fromJson(o.toJson()); 1971 var od = new api.AppContext.fromJson(o.toJson());
1164 checkAppContext(od); 1972 checkAppContext(od);
1165 }); 1973 });
1166 }); 1974 });
1167 1975
1168 1976
1169 unittest.group("obj-schema-AuctionContext", () { 1977 unittest.group("obj-schema-AuctionContext", () {
1170 unittest.test("to-json--from-json", () { 1978 unittest.test("to-json--from-json", () {
1171 var o = buildAuctionContext(); 1979 var o = buildAuctionContext();
1172 var od = new api.AuctionContext.fromJson(o.toJson()); 1980 var od = new api.AuctionContext.fromJson(o.toJson());
1173 checkAuctionContext(od); 1981 checkAuctionContext(od);
1174 }); 1982 });
1175 }); 1983 });
1176 1984
1177 1985
1986 unittest.group("obj-schema-BidMetricsRow", () {
1987 unittest.test("to-json--from-json", () {
1988 var o = buildBidMetricsRow();
1989 var od = new api.BidMetricsRow.fromJson(o.toJson());
1990 checkBidMetricsRow(od);
1991 });
1992 });
1993
1994
1995 unittest.group("obj-schema-BidResponseWithoutBidsStatusRow", () {
1996 unittest.test("to-json--from-json", () {
1997 var o = buildBidResponseWithoutBidsStatusRow();
1998 var od = new api.BidResponseWithoutBidsStatusRow.fromJson(o.toJson());
1999 checkBidResponseWithoutBidsStatusRow(od);
2000 });
2001 });
2002
2003
2004 unittest.group("obj-schema-CalloutStatusRow", () {
2005 unittest.test("to-json--from-json", () {
2006 var o = buildCalloutStatusRow();
2007 var od = new api.CalloutStatusRow.fromJson(o.toJson());
2008 checkCalloutStatusRow(od);
2009 });
2010 });
2011
2012
1178 unittest.group("obj-schema-Client", () { 2013 unittest.group("obj-schema-Client", () {
1179 unittest.test("to-json--from-json", () { 2014 unittest.test("to-json--from-json", () {
1180 var o = buildClient(); 2015 var o = buildClient();
1181 var od = new api.Client.fromJson(o.toJson()); 2016 var od = new api.Client.fromJson(o.toJson());
1182 checkClient(od); 2017 checkClient(od);
1183 }); 2018 });
1184 }); 2019 });
1185 2020
1186 2021
1187 unittest.group("obj-schema-ClientUser", () { 2022 unittest.group("obj-schema-ClientUser", () {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 2057
1223 unittest.group("obj-schema-CreativeDealAssociation", () { 2058 unittest.group("obj-schema-CreativeDealAssociation", () {
1224 unittest.test("to-json--from-json", () { 2059 unittest.test("to-json--from-json", () {
1225 var o = buildCreativeDealAssociation(); 2060 var o = buildCreativeDealAssociation();
1226 var od = new api.CreativeDealAssociation.fromJson(o.toJson()); 2061 var od = new api.CreativeDealAssociation.fromJson(o.toJson());
1227 checkCreativeDealAssociation(od); 2062 checkCreativeDealAssociation(od);
1228 }); 2063 });
1229 }); 2064 });
1230 2065
1231 2066
2067 unittest.group("obj-schema-CreativeStatusRow", () {
2068 unittest.test("to-json--from-json", () {
2069 var o = buildCreativeStatusRow();
2070 var od = new api.CreativeStatusRow.fromJson(o.toJson());
2071 checkCreativeStatusRow(od);
2072 });
2073 });
2074
2075
1232 unittest.group("obj-schema-Date", () { 2076 unittest.group("obj-schema-Date", () {
1233 unittest.test("to-json--from-json", () { 2077 unittest.test("to-json--from-json", () {
1234 var o = buildDate(); 2078 var o = buildDate();
1235 var od = new api.Date.fromJson(o.toJson()); 2079 var od = new api.Date.fromJson(o.toJson());
1236 checkDate(od); 2080 checkDate(od);
1237 }); 2081 });
1238 }); 2082 });
1239 2083
1240 2084
1241 unittest.group("obj-schema-Disapproval", () { 2085 unittest.group("obj-schema-Disapproval", () {
1242 unittest.test("to-json--from-json", () { 2086 unittest.test("to-json--from-json", () {
1243 var o = buildDisapproval(); 2087 var o = buildDisapproval();
1244 var od = new api.Disapproval.fromJson(o.toJson()); 2088 var od = new api.Disapproval.fromJson(o.toJson());
1245 checkDisapproval(od); 2089 checkDisapproval(od);
1246 }); 2090 });
1247 }); 2091 });
1248 2092
1249 2093
1250 unittest.group("obj-schema-Empty", () { 2094 unittest.group("obj-schema-Empty", () {
1251 unittest.test("to-json--from-json", () { 2095 unittest.test("to-json--from-json", () {
1252 var o = buildEmpty(); 2096 var o = buildEmpty();
1253 var od = new api.Empty.fromJson(o.toJson()); 2097 var od = new api.Empty.fromJson(o.toJson());
1254 checkEmpty(od); 2098 checkEmpty(od);
1255 }); 2099 });
1256 }); 2100 });
1257 2101
1258 2102
2103 unittest.group("obj-schema-FilterSet", () {
2104 unittest.test("to-json--from-json", () {
2105 var o = buildFilterSet();
2106 var od = new api.FilterSet.fromJson(o.toJson());
2107 checkFilterSet(od);
2108 });
2109 });
2110
2111
2112 unittest.group("obj-schema-FilteredBidCreativeRow", () {
2113 unittest.test("to-json--from-json", () {
2114 var o = buildFilteredBidCreativeRow();
2115 var od = new api.FilteredBidCreativeRow.fromJson(o.toJson());
2116 checkFilteredBidCreativeRow(od);
2117 });
2118 });
2119
2120
2121 unittest.group("obj-schema-FilteredBidDetailRow", () {
2122 unittest.test("to-json--from-json", () {
2123 var o = buildFilteredBidDetailRow();
2124 var od = new api.FilteredBidDetailRow.fromJson(o.toJson());
2125 checkFilteredBidDetailRow(od);
2126 });
2127 });
2128
2129
1259 unittest.group("obj-schema-FilteringStats", () { 2130 unittest.group("obj-schema-FilteringStats", () {
1260 unittest.test("to-json--from-json", () { 2131 unittest.test("to-json--from-json", () {
1261 var o = buildFilteringStats(); 2132 var o = buildFilteringStats();
1262 var od = new api.FilteringStats.fromJson(o.toJson()); 2133 var od = new api.FilteringStats.fromJson(o.toJson());
1263 checkFilteringStats(od); 2134 checkFilteringStats(od);
1264 }); 2135 });
1265 }); 2136 });
1266 2137
1267 2138
1268 unittest.group("obj-schema-HtmlContent", () { 2139 unittest.group("obj-schema-HtmlContent", () {
1269 unittest.test("to-json--from-json", () { 2140 unittest.test("to-json--from-json", () {
1270 var o = buildHtmlContent(); 2141 var o = buildHtmlContent();
1271 var od = new api.HtmlContent.fromJson(o.toJson()); 2142 var od = new api.HtmlContent.fromJson(o.toJson());
1272 checkHtmlContent(od); 2143 checkHtmlContent(od);
1273 }); 2144 });
1274 }); 2145 });
1275 2146
1276 2147
1277 unittest.group("obj-schema-Image", () { 2148 unittest.group("obj-schema-Image", () {
1278 unittest.test("to-json--from-json", () { 2149 unittest.test("to-json--from-json", () {
1279 var o = buildImage(); 2150 var o = buildImage();
1280 var od = new api.Image.fromJson(o.toJson()); 2151 var od = new api.Image.fromJson(o.toJson());
1281 checkImage(od); 2152 checkImage(od);
1282 }); 2153 });
1283 }); 2154 });
1284 2155
1285 2156
2157 unittest.group("obj-schema-ImpressionMetricsRow", () {
2158 unittest.test("to-json--from-json", () {
2159 var o = buildImpressionMetricsRow();
2160 var od = new api.ImpressionMetricsRow.fromJson(o.toJson());
2161 checkImpressionMetricsRow(od);
2162 });
2163 });
2164
2165
2166 unittest.group("obj-schema-ImpressionStatusRow", () {
2167 unittest.test("to-json--from-json", () {
2168 var o = buildImpressionStatusRow();
2169 var od = new api.ImpressionStatusRow.fromJson(o.toJson());
2170 checkImpressionStatusRow(od);
2171 });
2172 });
2173
2174
2175 unittest.group("obj-schema-ListBidMetricsResponse", () {
2176 unittest.test("to-json--from-json", () {
2177 var o = buildListBidMetricsResponse();
2178 var od = new api.ListBidMetricsResponse.fromJson(o.toJson());
2179 checkListBidMetricsResponse(od);
2180 });
2181 });
2182
2183
2184 unittest.group("obj-schema-ListBidResponseErrorsResponse", () {
2185 unittest.test("to-json--from-json", () {
2186 var o = buildListBidResponseErrorsResponse();
2187 var od = new api.ListBidResponseErrorsResponse.fromJson(o.toJson());
2188 checkListBidResponseErrorsResponse(od);
2189 });
2190 });
2191
2192
2193 unittest.group("obj-schema-ListBidResponsesWithoutBidsResponse", () {
2194 unittest.test("to-json--from-json", () {
2195 var o = buildListBidResponsesWithoutBidsResponse();
2196 var od = new api.ListBidResponsesWithoutBidsResponse.fromJson(o.toJson());
2197 checkListBidResponsesWithoutBidsResponse(od);
2198 });
2199 });
2200
2201
1286 unittest.group("obj-schema-ListClientUserInvitationsResponse", () { 2202 unittest.group("obj-schema-ListClientUserInvitationsResponse", () {
1287 unittest.test("to-json--from-json", () { 2203 unittest.test("to-json--from-json", () {
1288 var o = buildListClientUserInvitationsResponse(); 2204 var o = buildListClientUserInvitationsResponse();
1289 var od = new api.ListClientUserInvitationsResponse.fromJson(o.toJson()); 2205 var od = new api.ListClientUserInvitationsResponse.fromJson(o.toJson());
1290 checkListClientUserInvitationsResponse(od); 2206 checkListClientUserInvitationsResponse(od);
1291 }); 2207 });
1292 }); 2208 });
1293 2209
1294 2210
1295 unittest.group("obj-schema-ListClientUsersResponse", () { 2211 unittest.group("obj-schema-ListClientUsersResponse", () {
1296 unittest.test("to-json--from-json", () { 2212 unittest.test("to-json--from-json", () {
1297 var o = buildListClientUsersResponse(); 2213 var o = buildListClientUsersResponse();
1298 var od = new api.ListClientUsersResponse.fromJson(o.toJson()); 2214 var od = new api.ListClientUsersResponse.fromJson(o.toJson());
1299 checkListClientUsersResponse(od); 2215 checkListClientUsersResponse(od);
1300 }); 2216 });
1301 }); 2217 });
1302 2218
1303 2219
1304 unittest.group("obj-schema-ListClientsResponse", () { 2220 unittest.group("obj-schema-ListClientsResponse", () {
1305 unittest.test("to-json--from-json", () { 2221 unittest.test("to-json--from-json", () {
1306 var o = buildListClientsResponse(); 2222 var o = buildListClientsResponse();
1307 var od = new api.ListClientsResponse.fromJson(o.toJson()); 2223 var od = new api.ListClientsResponse.fromJson(o.toJson());
1308 checkListClientsResponse(od); 2224 checkListClientsResponse(od);
1309 }); 2225 });
1310 }); 2226 });
1311 2227
1312 2228
2229 unittest.group("obj-schema-ListCreativeStatusAndCreativeBreakdownByDetailRespo nse", () {
2230 unittest.test("to-json--from-json", () {
2231 var o = buildListCreativeStatusAndCreativeBreakdownByDetailResponse();
2232 var od = new api.ListCreativeStatusAndCreativeBreakdownByDetailResponse.fr omJson(o.toJson());
2233 checkListCreativeStatusAndCreativeBreakdownByDetailResponse(od);
2234 });
2235 });
2236
2237
2238 unittest.group("obj-schema-ListCreativeStatusBreakdownByCreativeResponse", () {
2239 unittest.test("to-json--from-json", () {
2240 var o = buildListCreativeStatusBreakdownByCreativeResponse();
2241 var od = new api.ListCreativeStatusBreakdownByCreativeResponse.fromJson(o. toJson());
2242 checkListCreativeStatusBreakdownByCreativeResponse(od);
2243 });
2244 });
2245
2246
2247 unittest.group("obj-schema-ListCreativeStatusBreakdownByDetailResponse", () {
2248 unittest.test("to-json--from-json", () {
2249 var o = buildListCreativeStatusBreakdownByDetailResponse();
2250 var od = new api.ListCreativeStatusBreakdownByDetailResponse.fromJson(o.to Json());
2251 checkListCreativeStatusBreakdownByDetailResponse(od);
2252 });
2253 });
2254
2255
1313 unittest.group("obj-schema-ListCreativesResponse", () { 2256 unittest.group("obj-schema-ListCreativesResponse", () {
1314 unittest.test("to-json--from-json", () { 2257 unittest.test("to-json--from-json", () {
1315 var o = buildListCreativesResponse(); 2258 var o = buildListCreativesResponse();
1316 var od = new api.ListCreativesResponse.fromJson(o.toJson()); 2259 var od = new api.ListCreativesResponse.fromJson(o.toJson());
1317 checkListCreativesResponse(od); 2260 checkListCreativesResponse(od);
1318 }); 2261 });
1319 }); 2262 });
1320 2263
1321 2264
1322 unittest.group("obj-schema-ListDealAssociationsResponse", () { 2265 unittest.group("obj-schema-ListDealAssociationsResponse", () {
1323 unittest.test("to-json--from-json", () { 2266 unittest.test("to-json--from-json", () {
1324 var o = buildListDealAssociationsResponse(); 2267 var o = buildListDealAssociationsResponse();
1325 var od = new api.ListDealAssociationsResponse.fromJson(o.toJson()); 2268 var od = new api.ListDealAssociationsResponse.fromJson(o.toJson());
1326 checkListDealAssociationsResponse(od); 2269 checkListDealAssociationsResponse(od);
1327 }); 2270 });
1328 }); 2271 });
1329 2272
1330 2273
2274 unittest.group("obj-schema-ListFilterSetsResponse", () {
2275 unittest.test("to-json--from-json", () {
2276 var o = buildListFilterSetsResponse();
2277 var od = new api.ListFilterSetsResponse.fromJson(o.toJson());
2278 checkListFilterSetsResponse(od);
2279 });
2280 });
2281
2282
2283 unittest.group("obj-schema-ListFilteredBidRequestsResponse", () {
2284 unittest.test("to-json--from-json", () {
2285 var o = buildListFilteredBidRequestsResponse();
2286 var od = new api.ListFilteredBidRequestsResponse.fromJson(o.toJson());
2287 checkListFilteredBidRequestsResponse(od);
2288 });
2289 });
2290
2291
2292 unittest.group("obj-schema-ListFilteredBidsResponse", () {
2293 unittest.test("to-json--from-json", () {
2294 var o = buildListFilteredBidsResponse();
2295 var od = new api.ListFilteredBidsResponse.fromJson(o.toJson());
2296 checkListFilteredBidsResponse(od);
2297 });
2298 });
2299
2300
2301 unittest.group("obj-schema-ListFilteredImpressionsResponse", () {
2302 unittest.test("to-json--from-json", () {
2303 var o = buildListFilteredImpressionsResponse();
2304 var od = new api.ListFilteredImpressionsResponse.fromJson(o.toJson());
2305 checkListFilteredImpressionsResponse(od);
2306 });
2307 });
2308
2309
2310 unittest.group("obj-schema-ListImpressionMetricsResponse", () {
2311 unittest.test("to-json--from-json", () {
2312 var o = buildListImpressionMetricsResponse();
2313 var od = new api.ListImpressionMetricsResponse.fromJson(o.toJson());
2314 checkListImpressionMetricsResponse(od);
2315 });
2316 });
2317
2318
2319 unittest.group("obj-schema-ListLosingBidsResponse", () {
2320 unittest.test("to-json--from-json", () {
2321 var o = buildListLosingBidsResponse();
2322 var od = new api.ListLosingBidsResponse.fromJson(o.toJson());
2323 checkListLosingBidsResponse(od);
2324 });
2325 });
2326
2327
1331 unittest.group("obj-schema-LocationContext", () { 2328 unittest.group("obj-schema-LocationContext", () {
1332 unittest.test("to-json--from-json", () { 2329 unittest.test("to-json--from-json", () {
1333 var o = buildLocationContext(); 2330 var o = buildLocationContext();
1334 var od = new api.LocationContext.fromJson(o.toJson()); 2331 var od = new api.LocationContext.fromJson(o.toJson());
1335 checkLocationContext(od); 2332 checkLocationContext(od);
1336 }); 2333 });
1337 }); 2334 });
1338 2335
1339 2336
2337 unittest.group("obj-schema-MetricValue", () {
2338 unittest.test("to-json--from-json", () {
2339 var o = buildMetricValue();
2340 var od = new api.MetricValue.fromJson(o.toJson());
2341 checkMetricValue(od);
2342 });
2343 });
2344
2345
1340 unittest.group("obj-schema-NativeContent", () { 2346 unittest.group("obj-schema-NativeContent", () {
1341 unittest.test("to-json--from-json", () { 2347 unittest.test("to-json--from-json", () {
1342 var o = buildNativeContent(); 2348 var o = buildNativeContent();
1343 var od = new api.NativeContent.fromJson(o.toJson()); 2349 var od = new api.NativeContent.fromJson(o.toJson());
1344 checkNativeContent(od); 2350 checkNativeContent(od);
1345 }); 2351 });
1346 }); 2352 });
1347 2353
1348 2354
1349 unittest.group("obj-schema-PlatformContext", () { 2355 unittest.group("obj-schema-PlatformContext", () {
1350 unittest.test("to-json--from-json", () { 2356 unittest.test("to-json--from-json", () {
1351 var o = buildPlatformContext(); 2357 var o = buildPlatformContext();
1352 var od = new api.PlatformContext.fromJson(o.toJson()); 2358 var od = new api.PlatformContext.fromJson(o.toJson());
1353 checkPlatformContext(od); 2359 checkPlatformContext(od);
1354 }); 2360 });
1355 }); 2361 });
1356 2362
1357 2363
2364 unittest.group("obj-schema-RealtimeTimeRange", () {
2365 unittest.test("to-json--from-json", () {
2366 var o = buildRealtimeTimeRange();
2367 var od = new api.RealtimeTimeRange.fromJson(o.toJson());
2368 checkRealtimeTimeRange(od);
2369 });
2370 });
2371
2372
1358 unittest.group("obj-schema-Reason", () { 2373 unittest.group("obj-schema-Reason", () {
1359 unittest.test("to-json--from-json", () { 2374 unittest.test("to-json--from-json", () {
1360 var o = buildReason(); 2375 var o = buildReason();
1361 var od = new api.Reason.fromJson(o.toJson()); 2376 var od = new api.Reason.fromJson(o.toJson());
1362 checkReason(od); 2377 checkReason(od);
1363 }); 2378 });
1364 }); 2379 });
1365 2380
1366 2381
2382 unittest.group("obj-schema-RelativeDateRange", () {
2383 unittest.test("to-json--from-json", () {
2384 var o = buildRelativeDateRange();
2385 var od = new api.RelativeDateRange.fromJson(o.toJson());
2386 checkRelativeDateRange(od);
2387 });
2388 });
2389
2390
1367 unittest.group("obj-schema-RemoveDealAssociationRequest", () { 2391 unittest.group("obj-schema-RemoveDealAssociationRequest", () {
1368 unittest.test("to-json--from-json", () { 2392 unittest.test("to-json--from-json", () {
1369 var o = buildRemoveDealAssociationRequest(); 2393 var o = buildRemoveDealAssociationRequest();
1370 var od = new api.RemoveDealAssociationRequest.fromJson(o.toJson()); 2394 var od = new api.RemoveDealAssociationRequest.fromJson(o.toJson());
1371 checkRemoveDealAssociationRequest(od); 2395 checkRemoveDealAssociationRequest(od);
1372 }); 2396 });
1373 }); 2397 });
1374 2398
1375 2399
2400 unittest.group("obj-schema-RowDimensions", () {
2401 unittest.test("to-json--from-json", () {
2402 var o = buildRowDimensions();
2403 var od = new api.RowDimensions.fromJson(o.toJson());
2404 checkRowDimensions(od);
2405 });
2406 });
2407
2408
1376 unittest.group("obj-schema-SecurityContext", () { 2409 unittest.group("obj-schema-SecurityContext", () {
1377 unittest.test("to-json--from-json", () { 2410 unittest.test("to-json--from-json", () {
1378 var o = buildSecurityContext(); 2411 var o = buildSecurityContext();
1379 var od = new api.SecurityContext.fromJson(o.toJson()); 2412 var od = new api.SecurityContext.fromJson(o.toJson());
1380 checkSecurityContext(od); 2413 checkSecurityContext(od);
1381 }); 2414 });
1382 }); 2415 });
1383 2416
1384 2417
1385 unittest.group("obj-schema-ServingContext", () { 2418 unittest.group("obj-schema-ServingContext", () {
(...skipping 16 matching lines...) Expand all
1402 2435
1403 unittest.group("obj-schema-StopWatchingCreativeRequest", () { 2436 unittest.group("obj-schema-StopWatchingCreativeRequest", () {
1404 unittest.test("to-json--from-json", () { 2437 unittest.test("to-json--from-json", () {
1405 var o = buildStopWatchingCreativeRequest(); 2438 var o = buildStopWatchingCreativeRequest();
1406 var od = new api.StopWatchingCreativeRequest.fromJson(o.toJson()); 2439 var od = new api.StopWatchingCreativeRequest.fromJson(o.toJson());
1407 checkStopWatchingCreativeRequest(od); 2440 checkStopWatchingCreativeRequest(od);
1408 }); 2441 });
1409 }); 2442 });
1410 2443
1411 2444
2445 unittest.group("obj-schema-TimeInterval", () {
2446 unittest.test("to-json--from-json", () {
2447 var o = buildTimeInterval();
2448 var od = new api.TimeInterval.fromJson(o.toJson());
2449 checkTimeInterval(od);
2450 });
2451 });
2452
2453
1412 unittest.group("obj-schema-VideoContent", () { 2454 unittest.group("obj-schema-VideoContent", () {
1413 unittest.test("to-json--from-json", () { 2455 unittest.test("to-json--from-json", () {
1414 var o = buildVideoContent(); 2456 var o = buildVideoContent();
1415 var od = new api.VideoContent.fromJson(o.toJson()); 2457 var od = new api.VideoContent.fromJson(o.toJson());
1416 checkVideoContent(od); 2458 checkVideoContent(od);
1417 }); 2459 });
1418 }); 2460 });
1419 2461
1420 2462
1421 unittest.group("obj-schema-WatchCreativeRequest", () { 2463 unittest.group("obj-schema-WatchCreativeRequest", () {
1422 unittest.test("to-json--from-json", () { 2464 unittest.test("to-json--from-json", () {
1423 var o = buildWatchCreativeRequest(); 2465 var o = buildWatchCreativeRequest();
1424 var od = new api.WatchCreativeRequest.fromJson(o.toJson()); 2466 var od = new api.WatchCreativeRequest.fromJson(o.toJson());
1425 checkWatchCreativeRequest(od); 2467 checkWatchCreativeRequest(od);
1426 }); 2468 });
1427 }); 2469 });
1428 2470
1429 2471
1430 unittest.group("resource-AccountsClientsResourceApi", () { 2472 unittest.group("resource-AccountsClientsResourceApi", () {
1431 unittest.test("method--create", () { 2473 unittest.test("method--create", () {
1432 2474
1433 var mock = new HttpServerMock(); 2475 var mock = new HttpServerMock();
1434 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients; 2476 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients;
1435 var arg_request = buildClient(); 2477 var arg_request = buildClient();
1436 var arg_accountId = "foo"; 2478 var arg_accountId = "foo";
1437 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2479 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1438 var obj = new api.Client.fromJson(json); 2480 var obj = new api.Client.fromJson(json);
1439 checkClient(obj); 2481 checkClient(obj);
1440 2482
1441 var path = (req.url).path; 2483 var path = (req.url).path;
1442 var pathOffset = 0; 2484 var pathOffset = 0;
1443 var index; 2485 var index;
1444 var subPart; 2486 var subPart;
1445 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2487 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1446 pathOffset += 1; 2488 pathOffset += 1;
1447 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2489 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
(...skipping 23 matching lines...) Expand all
1471 } 2513 }
1472 } 2514 }
1473 2515
1474 2516
1475 var h = { 2517 var h = {
1476 "content-type" : "application/json; charset=utf-8", 2518 "content-type" : "application/json; charset=utf-8",
1477 }; 2519 };
1478 var resp = convert.JSON.encode(buildClient()); 2520 var resp = convert.JSON.encode(buildClient());
1479 return new async.Future.value(stringResponse(200, h, resp)); 2521 return new async.Future.value(stringResponse(200, h, resp));
1480 }), true); 2522 }), true);
1481 res.create(arg_request, arg_accountId).then(unittest.expectAsync(((api.Cli ent response) { 2523 res.create(arg_request, arg_accountId).then(unittest.expectAsync1(((api.Cl ient response) {
1482 checkClient(response); 2524 checkClient(response);
1483 }))); 2525 })));
1484 }); 2526 });
1485 2527
1486 unittest.test("method--get", () { 2528 unittest.test("method--get", () {
1487 2529
1488 var mock = new HttpServerMock(); 2530 var mock = new HttpServerMock();
1489 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients; 2531 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients;
1490 var arg_accountId = "foo"; 2532 var arg_accountId = "foo";
1491 var arg_clientAccountId = "foo"; 2533 var arg_clientAccountId = "foo";
1492 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2534 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1493 var path = (req.url).path; 2535 var path = (req.url).path;
1494 var pathOffset = 0; 2536 var pathOffset = 0;
1495 var index; 2537 var index;
1496 var subPart; 2538 var subPart;
1497 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2539 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1498 pathOffset += 1; 2540 pathOffset += 1;
1499 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2541 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1500 pathOffset += 17; 2542 pathOffset += 17;
1501 index = path.indexOf("/clients/", pathOffset); 2543 index = path.indexOf("/clients/", pathOffset);
1502 unittest.expect(index >= 0, unittest.isTrue); 2544 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 23 matching lines...) Expand all
1526 } 2568 }
1527 } 2569 }
1528 2570
1529 2571
1530 var h = { 2572 var h = {
1531 "content-type" : "application/json; charset=utf-8", 2573 "content-type" : "application/json; charset=utf-8",
1532 }; 2574 };
1533 var resp = convert.JSON.encode(buildClient()); 2575 var resp = convert.JSON.encode(buildClient());
1534 return new async.Future.value(stringResponse(200, h, resp)); 2576 return new async.Future.value(stringResponse(200, h, resp));
1535 }), true); 2577 }), true);
1536 res.get(arg_accountId, arg_clientAccountId).then(unittest.expectAsync(((ap i.Client response) { 2578 res.get(arg_accountId, arg_clientAccountId).then(unittest.expectAsync1(((a pi.Client response) {
1537 checkClient(response); 2579 checkClient(response);
1538 }))); 2580 })));
1539 }); 2581 });
1540 2582
1541 unittest.test("method--list", () { 2583 unittest.test("method--list", () {
1542 2584
1543 var mock = new HttpServerMock(); 2585 var mock = new HttpServerMock();
1544 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients; 2586 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients;
1545 var arg_accountId = "foo"; 2587 var arg_accountId = "foo";
1546 var arg_pageToken = "foo"; 2588 var arg_pageToken = "foo";
1547 var arg_pageSize = 42; 2589 var arg_pageSize = 42;
1548 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2590 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1549 var path = (req.url).path; 2591 var path = (req.url).path;
1550 var pathOffset = 0; 2592 var pathOffset = 0;
1551 var index; 2593 var index;
1552 var subPart; 2594 var subPart;
1553 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2595 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1554 pathOffset += 1; 2596 pathOffset += 1;
1555 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2597 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1556 pathOffset += 17; 2598 pathOffset += 17;
1557 index = path.indexOf("/clients", pathOffset); 2599 index = path.indexOf("/clients", pathOffset);
1558 unittest.expect(index >= 0, unittest.isTrue); 2600 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 22 matching lines...) Expand all
1581 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2623 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1582 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 2624 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1583 2625
1584 2626
1585 var h = { 2627 var h = {
1586 "content-type" : "application/json; charset=utf-8", 2628 "content-type" : "application/json; charset=utf-8",
1587 }; 2629 };
1588 var resp = convert.JSON.encode(buildListClientsResponse()); 2630 var resp = convert.JSON.encode(buildListClientsResponse());
1589 return new async.Future.value(stringResponse(200, h, resp)); 2631 return new async.Future.value(stringResponse(200, h, resp));
1590 }), true); 2632 }), true);
1591 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize). then(unittest.expectAsync(((api.ListClientsResponse response) { 2633 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize). then(unittest.expectAsync1(((api.ListClientsResponse response) {
1592 checkListClientsResponse(response); 2634 checkListClientsResponse(response);
1593 }))); 2635 })));
1594 }); 2636 });
1595 2637
1596 unittest.test("method--update", () { 2638 unittest.test("method--update", () {
1597 2639
1598 var mock = new HttpServerMock(); 2640 var mock = new HttpServerMock();
1599 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients; 2641 api.AccountsClientsResourceApi res = new api.Adexchangebuyer2Api(mock).acc ounts.clients;
1600 var arg_request = buildClient(); 2642 var arg_request = buildClient();
1601 var arg_accountId = "foo"; 2643 var arg_accountId = "foo";
1602 var arg_clientAccountId = "foo"; 2644 var arg_clientAccountId = "foo";
1603 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2645 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1604 var obj = new api.Client.fromJson(json); 2646 var obj = new api.Client.fromJson(json);
1605 checkClient(obj); 2647 checkClient(obj);
1606 2648
1607 var path = (req.url).path; 2649 var path = (req.url).path;
1608 var pathOffset = 0; 2650 var pathOffset = 0;
1609 var index; 2651 var index;
1610 var subPart; 2652 var subPart;
1611 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2653 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1612 pathOffset += 1; 2654 pathOffset += 1;
1613 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2655 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
(...skipping 26 matching lines...) Expand all
1640 } 2682 }
1641 } 2683 }
1642 2684
1643 2685
1644 var h = { 2686 var h = {
1645 "content-type" : "application/json; charset=utf-8", 2687 "content-type" : "application/json; charset=utf-8",
1646 }; 2688 };
1647 var resp = convert.JSON.encode(buildClient()); 2689 var resp = convert.JSON.encode(buildClient());
1648 return new async.Future.value(stringResponse(200, h, resp)); 2690 return new async.Future.value(stringResponse(200, h, resp));
1649 }), true); 2691 }), true);
1650 res.update(arg_request, arg_accountId, arg_clientAccountId).then(unittest. expectAsync(((api.Client response) { 2692 res.update(arg_request, arg_accountId, arg_clientAccountId).then(unittest. expectAsync1(((api.Client response) {
1651 checkClient(response); 2693 checkClient(response);
1652 }))); 2694 })));
1653 }); 2695 });
1654 2696
1655 }); 2697 });
1656 2698
1657 2699
1658 unittest.group("resource-AccountsClientsInvitationsResourceApi", () { 2700 unittest.group("resource-AccountsClientsInvitationsResourceApi", () {
1659 unittest.test("method--create", () { 2701 unittest.test("method--create", () {
1660 2702
1661 var mock = new HttpServerMock(); 2703 var mock = new HttpServerMock();
1662 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap i(mock).accounts.clients.invitations; 2704 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap i(mock).accounts.clients.invitations;
1663 var arg_request = buildClientUserInvitation(); 2705 var arg_request = buildClientUserInvitation();
1664 var arg_accountId = "foo"; 2706 var arg_accountId = "foo";
1665 var arg_clientAccountId = "foo"; 2707 var arg_clientAccountId = "foo";
1666 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2708 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1667 var obj = new api.ClientUserInvitation.fromJson(json); 2709 var obj = new api.ClientUserInvitation.fromJson(json);
1668 checkClientUserInvitation(obj); 2710 checkClientUserInvitation(obj);
1669 2711
1670 var path = (req.url).path; 2712 var path = (req.url).path;
1671 var pathOffset = 0; 2713 var pathOffset = 0;
1672 var index; 2714 var index;
1673 var subPart; 2715 var subPart;
1674 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2716 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1675 pathOffset += 1; 2717 pathOffset += 1;
1676 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2718 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
(...skipping 30 matching lines...) Expand all
1707 } 2749 }
1708 } 2750 }
1709 2751
1710 2752
1711 var h = { 2753 var h = {
1712 "content-type" : "application/json; charset=utf-8", 2754 "content-type" : "application/json; charset=utf-8",
1713 }; 2755 };
1714 var resp = convert.JSON.encode(buildClientUserInvitation()); 2756 var resp = convert.JSON.encode(buildClientUserInvitation());
1715 return new async.Future.value(stringResponse(200, h, resp)); 2757 return new async.Future.value(stringResponse(200, h, resp));
1716 }), true); 2758 }), true);
1717 res.create(arg_request, arg_accountId, arg_clientAccountId).then(unittest. expectAsync(((api.ClientUserInvitation response) { 2759 res.create(arg_request, arg_accountId, arg_clientAccountId).then(unittest. expectAsync1(((api.ClientUserInvitation response) {
1718 checkClientUserInvitation(response); 2760 checkClientUserInvitation(response);
1719 }))); 2761 })));
1720 }); 2762 });
1721 2763
1722 unittest.test("method--get", () { 2764 unittest.test("method--get", () {
1723 2765
1724 var mock = new HttpServerMock(); 2766 var mock = new HttpServerMock();
1725 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap i(mock).accounts.clients.invitations; 2767 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap i(mock).accounts.clients.invitations;
1726 var arg_accountId = "foo"; 2768 var arg_accountId = "foo";
1727 var arg_clientAccountId = "foo"; 2769 var arg_clientAccountId = "foo";
1728 var arg_invitationId = "foo"; 2770 var arg_invitationId = "foo";
1729 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2771 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1730 var path = (req.url).path; 2772 var path = (req.url).path;
1731 var pathOffset = 0; 2773 var pathOffset = 0;
1732 var index; 2774 var index;
1733 var subPart; 2775 var subPart;
1734 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2776 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1735 pathOffset += 1; 2777 pathOffset += 1;
1736 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2778 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1737 pathOffset += 17; 2779 pathOffset += 17;
1738 index = path.indexOf("/clients/", pathOffset); 2780 index = path.indexOf("/clients/", pathOffset);
1739 unittest.expect(index >= 0, unittest.isTrue); 2781 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 30 matching lines...) Expand all
1770 } 2812 }
1771 } 2813 }
1772 2814
1773 2815
1774 var h = { 2816 var h = {
1775 "content-type" : "application/json; charset=utf-8", 2817 "content-type" : "application/json; charset=utf-8",
1776 }; 2818 };
1777 var resp = convert.JSON.encode(buildClientUserInvitation()); 2819 var resp = convert.JSON.encode(buildClientUserInvitation());
1778 return new async.Future.value(stringResponse(200, h, resp)); 2820 return new async.Future.value(stringResponse(200, h, resp));
1779 }), true); 2821 }), true);
1780 res.get(arg_accountId, arg_clientAccountId, arg_invitationId).then(unittes t.expectAsync(((api.ClientUserInvitation response) { 2822 res.get(arg_accountId, arg_clientAccountId, arg_invitationId).then(unittes t.expectAsync1(((api.ClientUserInvitation response) {
1781 checkClientUserInvitation(response); 2823 checkClientUserInvitation(response);
1782 }))); 2824 })));
1783 }); 2825 });
1784 2826
1785 unittest.test("method--list", () { 2827 unittest.test("method--list", () {
1786 2828
1787 var mock = new HttpServerMock(); 2829 var mock = new HttpServerMock();
1788 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap i(mock).accounts.clients.invitations; 2830 api.AccountsClientsInvitationsResourceApi res = new api.Adexchangebuyer2Ap i(mock).accounts.clients.invitations;
1789 var arg_accountId = "foo"; 2831 var arg_accountId = "foo";
1790 var arg_clientAccountId = "foo"; 2832 var arg_clientAccountId = "foo";
1791 var arg_pageToken = "foo"; 2833 var arg_pageToken = "foo";
1792 var arg_pageSize = 42; 2834 var arg_pageSize = 42;
1793 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2835 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1794 var path = (req.url).path; 2836 var path = (req.url).path;
1795 var pathOffset = 0; 2837 var pathOffset = 0;
1796 var index; 2838 var index;
1797 var subPart; 2839 var subPart;
1798 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2840 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1799 pathOffset += 1; 2841 pathOffset += 1;
1800 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2842 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1801 pathOffset += 17; 2843 pathOffset += 17;
1802 index = path.indexOf("/clients/", pathOffset); 2844 index = path.indexOf("/clients/", pathOffset);
1803 unittest.expect(index >= 0, unittest.isTrue); 2845 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 29 matching lines...) Expand all
1833 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2875 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1834 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 2876 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1835 2877
1836 2878
1837 var h = { 2879 var h = {
1838 "content-type" : "application/json; charset=utf-8", 2880 "content-type" : "application/json; charset=utf-8",
1839 }; 2881 };
1840 var resp = convert.JSON.encode(buildListClientUserInvitationsResponse()) ; 2882 var resp = convert.JSON.encode(buildListClientUserInvitationsResponse()) ;
1841 return new async.Future.value(stringResponse(200, h, resp)); 2883 return new async.Future.value(stringResponse(200, h, resp));
1842 }), true); 2884 }), true);
1843 res.list(arg_accountId, arg_clientAccountId, pageToken: arg_pageToken, pag eSize: arg_pageSize).then(unittest.expectAsync(((api.ListClientUserInvitationsRe sponse response) { 2885 res.list(arg_accountId, arg_clientAccountId, pageToken: arg_pageToken, pag eSize: arg_pageSize).then(unittest.expectAsync1(((api.ListClientUserInvitationsR esponse response) {
1844 checkListClientUserInvitationsResponse(response); 2886 checkListClientUserInvitationsResponse(response);
1845 }))); 2887 })));
1846 }); 2888 });
1847 2889
1848 }); 2890 });
1849 2891
1850 2892
1851 unittest.group("resource-AccountsClientsUsersResourceApi", () { 2893 unittest.group("resource-AccountsClientsUsersResourceApi", () {
1852 unittest.test("method--get", () { 2894 unittest.test("method--get", () {
1853 2895
1854 var mock = new HttpServerMock(); 2896 var mock = new HttpServerMock();
1855 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock ).accounts.clients.users; 2897 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock ).accounts.clients.users;
1856 var arg_accountId = "foo"; 2898 var arg_accountId = "foo";
1857 var arg_clientAccountId = "foo"; 2899 var arg_clientAccountId = "foo";
1858 var arg_userId = "foo"; 2900 var arg_userId = "foo";
1859 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 2901 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1860 var path = (req.url).path; 2902 var path = (req.url).path;
1861 var pathOffset = 0; 2903 var pathOffset = 0;
1862 var index; 2904 var index;
1863 var subPart; 2905 var subPart;
1864 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2906 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1865 pathOffset += 1; 2907 pathOffset += 1;
1866 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2908 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1867 pathOffset += 17; 2909 pathOffset += 17;
1868 index = path.indexOf("/clients/", pathOffset); 2910 index = path.indexOf("/clients/", pathOffset);
1869 unittest.expect(index >= 0, unittest.isTrue); 2911 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 30 matching lines...) Expand all
1900 } 2942 }
1901 } 2943 }
1902 2944
1903 2945
1904 var h = { 2946 var h = {
1905 "content-type" : "application/json; charset=utf-8", 2947 "content-type" : "application/json; charset=utf-8",
1906 }; 2948 };
1907 var resp = convert.JSON.encode(buildClientUser()); 2949 var resp = convert.JSON.encode(buildClientUser());
1908 return new async.Future.value(stringResponse(200, h, resp)); 2950 return new async.Future.value(stringResponse(200, h, resp));
1909 }), true); 2951 }), true);
1910 res.get(arg_accountId, arg_clientAccountId, arg_userId).then(unittest.expe ctAsync(((api.ClientUser response) { 2952 res.get(arg_accountId, arg_clientAccountId, arg_userId).then(unittest.expe ctAsync1(((api.ClientUser response) {
1911 checkClientUser(response); 2953 checkClientUser(response);
1912 }))); 2954 })));
1913 }); 2955 });
1914 2956
1915 unittest.test("method--list", () { 2957 unittest.test("method--list", () {
1916 2958
1917 var mock = new HttpServerMock(); 2959 var mock = new HttpServerMock();
1918 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock ).accounts.clients.users; 2960 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock ).accounts.clients.users;
1919 var arg_accountId = "foo"; 2961 var arg_accountId = "foo";
1920 var arg_clientAccountId = "foo"; 2962 var arg_clientAccountId = "foo";
2963 var arg_pageToken = "foo";
1921 var arg_pageSize = 42; 2964 var arg_pageSize = 42;
1922 var arg_pageToken = "foo"; 2965 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1923 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
1924 var path = (req.url).path; 2966 var path = (req.url).path;
1925 var pathOffset = 0; 2967 var pathOffset = 0;
1926 var index; 2968 var index;
1927 var subPart; 2969 var subPart;
1928 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2970 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1929 pathOffset += 1; 2971 pathOffset += 1;
1930 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 2972 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1931 pathOffset += 17; 2973 pathOffset += 17;
1932 index = path.indexOf("/clients/", pathOffset); 2974 index = path.indexOf("/clients/", pathOffset);
1933 unittest.expect(index >= 0, unittest.isTrue); 2975 unittest.expect(index >= 0, unittest.isTrue);
(...skipping 19 matching lines...) Expand all
1953 if (n == "false") return false; 2995 if (n == "false") return false;
1954 if (n == null) return null; 2996 if (n == null) return null;
1955 throw new core.ArgumentError("Invalid boolean: $n"); 2997 throw new core.ArgumentError("Invalid boolean: $n");
1956 } 2998 }
1957 if (query.length > 0) { 2999 if (query.length > 0) {
1958 for (var part in query.split("&")) { 3000 for (var part in query.split("&")) {
1959 var keyvalue = part.split("="); 3001 var keyvalue = part.split("=");
1960 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3002 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
1961 } 3003 }
1962 } 3004 }
3005 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1963 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 3006 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1964 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1965 3007
1966 3008
1967 var h = { 3009 var h = {
1968 "content-type" : "application/json; charset=utf-8", 3010 "content-type" : "application/json; charset=utf-8",
1969 }; 3011 };
1970 var resp = convert.JSON.encode(buildListClientUsersResponse()); 3012 var resp = convert.JSON.encode(buildListClientUsersResponse());
1971 return new async.Future.value(stringResponse(200, h, resp)); 3013 return new async.Future.value(stringResponse(200, h, resp));
1972 }), true); 3014 }), true);
1973 res.list(arg_accountId, arg_clientAccountId, pageSize: arg_pageSize, pageT oken: arg_pageToken).then(unittest.expectAsync(((api.ListClientUsersResponse res ponse) { 3015 res.list(arg_accountId, arg_clientAccountId, pageToken: arg_pageToken, pag eSize: arg_pageSize).then(unittest.expectAsync1(((api.ListClientUsersResponse re sponse) {
1974 checkListClientUsersResponse(response); 3016 checkListClientUsersResponse(response);
1975 }))); 3017 })));
1976 }); 3018 });
1977 3019
1978 unittest.test("method--update", () { 3020 unittest.test("method--update", () {
1979 3021
1980 var mock = new HttpServerMock(); 3022 var mock = new HttpServerMock();
1981 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock ).accounts.clients.users; 3023 api.AccountsClientsUsersResourceApi res = new api.Adexchangebuyer2Api(mock ).accounts.clients.users;
1982 var arg_request = buildClientUser(); 3024 var arg_request = buildClientUser();
1983 var arg_accountId = "foo"; 3025 var arg_accountId = "foo";
1984 var arg_clientAccountId = "foo"; 3026 var arg_clientAccountId = "foo";
1985 var arg_userId = "foo"; 3027 var arg_userId = "foo";
1986 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 3028 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1987 var obj = new api.ClientUser.fromJson(json); 3029 var obj = new api.ClientUser.fromJson(json);
1988 checkClientUser(obj); 3030 checkClientUser(obj);
1989 3031
1990 var path = (req.url).path; 3032 var path = (req.url).path;
1991 var pathOffset = 0; 3033 var pathOffset = 0;
1992 var index; 3034 var index;
3035 var subPart;
3036 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3037 pathOffset += 1;
3038 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3039 pathOffset += 17;
3040 index = path.indexOf("/clients/", pathOffset);
3041 unittest.expect(index >= 0, unittest.isTrue);
3042 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3043 pathOffset = index;
3044 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3045 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/clients/"));
3046 pathOffset += 9;
3047 index = path.indexOf("/users/", pathOffset);
3048 unittest.expect(index >= 0, unittest.isTrue);
3049 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3050 pathOffset = index;
3051 unittest.expect(subPart, unittest.equals("$arg_clientAccountId"));
3052 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("/users/"));
3053 pathOffset += 7;
3054 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3055 pathOffset = path.length;
3056 unittest.expect(subPart, unittest.equals("$arg_userId"));
3057
3058 var query = (req.url).query;
3059 var queryOffset = 0;
3060 var queryMap = {};
3061 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3062 parseBool(n) {
3063 if (n == "true") return true;
3064 if (n == "false") return false;
3065 if (n == null) return null;
3066 throw new core.ArgumentError("Invalid boolean: $n");
3067 }
3068 if (query.length > 0) {
3069 for (var part in query.split("&")) {
3070 var keyvalue = part.split("=");
3071 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3072 }
3073 }
3074
3075
3076 var h = {
3077 "content-type" : "application/json; charset=utf-8",
3078 };
3079 var resp = convert.JSON.encode(buildClientUser());
3080 return new async.Future.value(stringResponse(200, h, resp));
3081 }), true);
3082 res.update(arg_request, arg_accountId, arg_clientAccountId, arg_userId).th en(unittest.expectAsync1(((api.ClientUser response) {
3083 checkClientUser(response);
3084 })));
3085 });
3086
3087 });
3088
3089
3090 unittest.group("resource-AccountsCreativesResourceApi", () {
3091 unittest.test("method--create", () {
3092
3093 var mock = new HttpServerMock();
3094 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives;
3095 var arg_request = buildCreative();
3096 var arg_accountId = "foo";
3097 var arg_duplicateIdMode = "foo";
3098 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3099 var obj = new api.Creative.fromJson(json);
3100 checkCreative(obj);
3101
3102 var path = (req.url).path;
3103 var pathOffset = 0;
3104 var index;
3105 var subPart;
3106 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3107 pathOffset += 1;
3108 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3109 pathOffset += 17;
3110 index = path.indexOf("/creatives", pathOffset);
3111 unittest.expect(index >= 0, unittest.isTrue);
3112 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3113 pathOffset = index;
3114 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3115 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/creatives"));
3116 pathOffset += 10;
3117
3118 var query = (req.url).query;
3119 var queryOffset = 0;
3120 var queryMap = {};
3121 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3122 parseBool(n) {
3123 if (n == "true") return true;
3124 if (n == "false") return false;
3125 if (n == null) return null;
3126 throw new core.ArgumentError("Invalid boolean: $n");
3127 }
3128 if (query.length > 0) {
3129 for (var part in query.split("&")) {
3130 var keyvalue = part.split("=");
3131 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3132 }
3133 }
3134 unittest.expect(queryMap["duplicateIdMode"].first, unittest.equals(arg_d uplicateIdMode));
3135
3136
3137 var h = {
3138 "content-type" : "application/json; charset=utf-8",
3139 };
3140 var resp = convert.JSON.encode(buildCreative());
3141 return new async.Future.value(stringResponse(200, h, resp));
3142 }), true);
3143 res.create(arg_request, arg_accountId, duplicateIdMode: arg_duplicateIdMod e).then(unittest.expectAsync1(((api.Creative response) {
3144 checkCreative(response);
3145 })));
3146 });
3147
3148 unittest.test("method--get", () {
3149
3150 var mock = new HttpServerMock();
3151 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives;
3152 var arg_accountId = "foo";
3153 var arg_creativeId = "foo";
3154 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3155 var path = (req.url).path;
3156 var pathOffset = 0;
3157 var index;
3158 var subPart;
3159 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3160 pathOffset += 1;
3161 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3162 pathOffset += 17;
3163 index = path.indexOf("/creatives/", pathOffset);
3164 unittest.expect(index >= 0, unittest.isTrue);
3165 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3166 pathOffset = index;
3167 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3168 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3169 pathOffset += 11;
3170 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3171 pathOffset = path.length;
3172 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3173
3174 var query = (req.url).query;
3175 var queryOffset = 0;
3176 var queryMap = {};
3177 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3178 parseBool(n) {
3179 if (n == "true") return true;
3180 if (n == "false") return false;
3181 if (n == null) return null;
3182 throw new core.ArgumentError("Invalid boolean: $n");
3183 }
3184 if (query.length > 0) {
3185 for (var part in query.split("&")) {
3186 var keyvalue = part.split("=");
3187 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3188 }
3189 }
3190
3191
3192 var h = {
3193 "content-type" : "application/json; charset=utf-8",
3194 };
3195 var resp = convert.JSON.encode(buildCreative());
3196 return new async.Future.value(stringResponse(200, h, resp));
3197 }), true);
3198 res.get(arg_accountId, arg_creativeId).then(unittest.expectAsync1(((api.Cr eative response) {
3199 checkCreative(response);
3200 })));
3201 });
3202
3203 unittest.test("method--list", () {
3204
3205 var mock = new HttpServerMock();
3206 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives;
3207 var arg_accountId = "foo";
3208 var arg_pageToken = "foo";
3209 var arg_pageSize = 42;
3210 var arg_query = "foo";
3211 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3212 var path = (req.url).path;
3213 var pathOffset = 0;
3214 var index;
3215 var subPart;
3216 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3217 pathOffset += 1;
3218 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3219 pathOffset += 17;
3220 index = path.indexOf("/creatives", pathOffset);
3221 unittest.expect(index >= 0, unittest.isTrue);
3222 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3223 pathOffset = index;
3224 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3225 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/creatives"));
3226 pathOffset += 10;
3227
3228 var query = (req.url).query;
3229 var queryOffset = 0;
3230 var queryMap = {};
3231 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3232 parseBool(n) {
3233 if (n == "true") return true;
3234 if (n == "false") return false;
3235 if (n == null) return null;
3236 throw new core.ArgumentError("Invalid boolean: $n");
3237 }
3238 if (query.length > 0) {
3239 for (var part in query.split("&")) {
3240 var keyvalue = part.split("=");
3241 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3242 }
3243 }
3244 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3245 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3246 unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
3247
3248
3249 var h = {
3250 "content-type" : "application/json; charset=utf-8",
3251 };
3252 var resp = convert.JSON.encode(buildListCreativesResponse());
3253 return new async.Future.value(stringResponse(200, h, resp));
3254 }), true);
3255 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize, query: arg_query).then(unittest.expectAsync1(((api.ListCreativesResponse respons e) {
3256 checkListCreativesResponse(response);
3257 })));
3258 });
3259
3260 unittest.test("method--stopWatching", () {
3261
3262 var mock = new HttpServerMock();
3263 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives;
3264 var arg_request = buildStopWatchingCreativeRequest();
3265 var arg_accountId = "foo";
3266 var arg_creativeId = "foo";
3267 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3268 var obj = new api.StopWatchingCreativeRequest.fromJson(json);
3269 checkStopWatchingCreativeRequest(obj);
3270
3271 var path = (req.url).path;
3272 var pathOffset = 0;
3273 var index;
3274 var subPart;
3275 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3276 pathOffset += 1;
3277 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3278 pathOffset += 17;
3279 index = path.indexOf("/creatives/", pathOffset);
3280 unittest.expect(index >= 0, unittest.isTrue);
3281 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3282 pathOffset = index;
3283 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3284 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3285 pathOffset += 11;
3286 index = path.indexOf(":stopWatching", pathOffset);
3287 unittest.expect(index >= 0, unittest.isTrue);
3288 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3289 pathOffset = index;
3290 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3291 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals(":stopWatching"));
3292 pathOffset += 13;
3293
3294 var query = (req.url).query;
3295 var queryOffset = 0;
3296 var queryMap = {};
3297 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3298 parseBool(n) {
3299 if (n == "true") return true;
3300 if (n == "false") return false;
3301 if (n == null) return null;
3302 throw new core.ArgumentError("Invalid boolean: $n");
3303 }
3304 if (query.length > 0) {
3305 for (var part in query.split("&")) {
3306 var keyvalue = part.split("=");
3307 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3308 }
3309 }
3310
3311
3312 var h = {
3313 "content-type" : "application/json; charset=utf-8",
3314 };
3315 var resp = convert.JSON.encode(buildEmpty());
3316 return new async.Future.value(stringResponse(200, h, resp));
3317 }), true);
3318 res.stopWatching(arg_request, arg_accountId, arg_creativeId).then(unittest .expectAsync1(((api.Empty response) {
3319 checkEmpty(response);
3320 })));
3321 });
3322
3323 unittest.test("method--update", () {
3324
3325 var mock = new HttpServerMock();
3326 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives;
3327 var arg_request = buildCreative();
3328 var arg_accountId = "foo";
3329 var arg_creativeId = "foo";
3330 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3331 var obj = new api.Creative.fromJson(json);
3332 checkCreative(obj);
3333
3334 var path = (req.url).path;
3335 var pathOffset = 0;
3336 var index;
3337 var subPart;
3338 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3339 pathOffset += 1;
3340 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3341 pathOffset += 17;
3342 index = path.indexOf("/creatives/", pathOffset);
3343 unittest.expect(index >= 0, unittest.isTrue);
3344 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3345 pathOffset = index;
3346 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3347 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3348 pathOffset += 11;
3349 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3350 pathOffset = path.length;
3351 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3352
3353 var query = (req.url).query;
3354 var queryOffset = 0;
3355 var queryMap = {};
3356 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3357 parseBool(n) {
3358 if (n == "true") return true;
3359 if (n == "false") return false;
3360 if (n == null) return null;
3361 throw new core.ArgumentError("Invalid boolean: $n");
3362 }
3363 if (query.length > 0) {
3364 for (var part in query.split("&")) {
3365 var keyvalue = part.split("=");
3366 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3367 }
3368 }
3369
3370
3371 var h = {
3372 "content-type" : "application/json; charset=utf-8",
3373 };
3374 var resp = convert.JSON.encode(buildCreative());
3375 return new async.Future.value(stringResponse(200, h, resp));
3376 }), true);
3377 res.update(arg_request, arg_accountId, arg_creativeId).then(unittest.expec tAsync1(((api.Creative response) {
3378 checkCreative(response);
3379 })));
3380 });
3381
3382 unittest.test("method--watch", () {
3383
3384 var mock = new HttpServerMock();
3385 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives;
3386 var arg_request = buildWatchCreativeRequest();
3387 var arg_accountId = "foo";
3388 var arg_creativeId = "foo";
3389 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3390 var obj = new api.WatchCreativeRequest.fromJson(json);
3391 checkWatchCreativeRequest(obj);
3392
3393 var path = (req.url).path;
3394 var pathOffset = 0;
3395 var index;
3396 var subPart;
3397 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3398 pathOffset += 1;
3399 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3400 pathOffset += 17;
3401 index = path.indexOf("/creatives/", pathOffset);
3402 unittest.expect(index >= 0, unittest.isTrue);
3403 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3404 pathOffset = index;
3405 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3406 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3407 pathOffset += 11;
3408 index = path.indexOf(":watch", pathOffset);
3409 unittest.expect(index >= 0, unittest.isTrue);
3410 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3411 pathOffset = index;
3412 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3413 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als(":watch"));
3414 pathOffset += 6;
3415
3416 var query = (req.url).query;
3417 var queryOffset = 0;
3418 var queryMap = {};
3419 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3420 parseBool(n) {
3421 if (n == "true") return true;
3422 if (n == "false") return false;
3423 if (n == null) return null;
3424 throw new core.ArgumentError("Invalid boolean: $n");
3425 }
3426 if (query.length > 0) {
3427 for (var part in query.split("&")) {
3428 var keyvalue = part.split("=");
3429 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3430 }
3431 }
3432
3433
3434 var h = {
3435 "content-type" : "application/json; charset=utf-8",
3436 };
3437 var resp = convert.JSON.encode(buildEmpty());
3438 return new async.Future.value(stringResponse(200, h, resp));
3439 }), true);
3440 res.watch(arg_request, arg_accountId, arg_creativeId).then(unittest.expect Async1(((api.Empty response) {
3441 checkEmpty(response);
3442 })));
3443 });
3444
3445 });
3446
3447
3448 unittest.group("resource-AccountsCreativesDealAssociationsResourceApi", () {
3449 unittest.test("method--add", () {
3450
3451 var mock = new HttpServerMock();
3452 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb uyer2Api(mock).accounts.creatives.dealAssociations;
3453 var arg_request = buildAddDealAssociationRequest();
3454 var arg_accountId = "foo";
3455 var arg_creativeId = "foo";
3456 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3457 var obj = new api.AddDealAssociationRequest.fromJson(json);
3458 checkAddDealAssociationRequest(obj);
3459
3460 var path = (req.url).path;
3461 var pathOffset = 0;
3462 var index;
3463 var subPart;
3464 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3465 pathOffset += 1;
3466 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3467 pathOffset += 17;
3468 index = path.indexOf("/creatives/", pathOffset);
3469 unittest.expect(index >= 0, unittest.isTrue);
3470 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3471 pathOffset = index;
3472 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3473 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3474 pathOffset += 11;
3475 index = path.indexOf("/dealAssociations:add", pathOffset);
3476 unittest.expect(index >= 0, unittest.isTrue);
3477 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3478 pathOffset = index;
3479 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3480 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("/dealAssociations:add"));
3481 pathOffset += 21;
3482
3483 var query = (req.url).query;
3484 var queryOffset = 0;
3485 var queryMap = {};
3486 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3487 parseBool(n) {
3488 if (n == "true") return true;
3489 if (n == "false") return false;
3490 if (n == null) return null;
3491 throw new core.ArgumentError("Invalid boolean: $n");
3492 }
3493 if (query.length > 0) {
3494 for (var part in query.split("&")) {
3495 var keyvalue = part.split("=");
3496 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3497 }
3498 }
3499
3500
3501 var h = {
3502 "content-type" : "application/json; charset=utf-8",
3503 };
3504 var resp = convert.JSON.encode(buildEmpty());
3505 return new async.Future.value(stringResponse(200, h, resp));
3506 }), true);
3507 res.add(arg_request, arg_accountId, arg_creativeId).then(unittest.expectAs ync1(((api.Empty response) {
3508 checkEmpty(response);
3509 })));
3510 });
3511
3512 unittest.test("method--list", () {
3513
3514 var mock = new HttpServerMock();
3515 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb uyer2Api(mock).accounts.creatives.dealAssociations;
3516 var arg_accountId = "foo";
3517 var arg_creativeId = "foo";
3518 var arg_pageToken = "foo";
3519 var arg_pageSize = 42;
3520 var arg_query = "foo";
3521 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3522 var path = (req.url).path;
3523 var pathOffset = 0;
3524 var index;
3525 var subPart;
3526 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3527 pathOffset += 1;
3528 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3529 pathOffset += 17;
3530 index = path.indexOf("/creatives/", pathOffset);
3531 unittest.expect(index >= 0, unittest.isTrue);
3532 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3533 pathOffset = index;
3534 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3535 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3536 pathOffset += 11;
3537 index = path.indexOf("/dealAssociations", pathOffset);
3538 unittest.expect(index >= 0, unittest.isTrue);
3539 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3540 pathOffset = index;
3541 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3542 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("/dealAssociations"));
3543 pathOffset += 17;
3544
3545 var query = (req.url).query;
3546 var queryOffset = 0;
3547 var queryMap = {};
3548 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3549 parseBool(n) {
3550 if (n == "true") return true;
3551 if (n == "false") return false;
3552 if (n == null) return null;
3553 throw new core.ArgumentError("Invalid boolean: $n");
3554 }
3555 if (query.length > 0) {
3556 for (var part in query.split("&")) {
3557 var keyvalue = part.split("=");
3558 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3559 }
3560 }
3561 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3562 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3563 unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
3564
3565
3566 var h = {
3567 "content-type" : "application/json; charset=utf-8",
3568 };
3569 var resp = convert.JSON.encode(buildListDealAssociationsResponse());
3570 return new async.Future.value(stringResponse(200, h, resp));
3571 }), true);
3572 res.list(arg_accountId, arg_creativeId, pageToken: arg_pageToken, pageSize : arg_pageSize, query: arg_query).then(unittest.expectAsync1(((api.ListDealAssoc iationsResponse response) {
3573 checkListDealAssociationsResponse(response);
3574 })));
3575 });
3576
3577 unittest.test("method--remove", () {
3578
3579 var mock = new HttpServerMock();
3580 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb uyer2Api(mock).accounts.creatives.dealAssociations;
3581 var arg_request = buildRemoveDealAssociationRequest();
3582 var arg_accountId = "foo";
3583 var arg_creativeId = "foo";
3584 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3585 var obj = new api.RemoveDealAssociationRequest.fromJson(json);
3586 checkRemoveDealAssociationRequest(obj);
3587
3588 var path = (req.url).path;
3589 var pathOffset = 0;
3590 var index;
3591 var subPart;
3592 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3593 pathOffset += 1;
3594 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3595 pathOffset += 17;
3596 index = path.indexOf("/creatives/", pathOffset);
3597 unittest.expect(index >= 0, unittest.isTrue);
3598 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3599 pathOffset = index;
3600 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3601 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
3602 pathOffset += 11;
3603 index = path.indexOf("/dealAssociations:remove", pathOffset);
3604 unittest.expect(index >= 0, unittest.isTrue);
3605 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3606 pathOffset = index;
3607 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
3608 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq uals("/dealAssociations:remove"));
3609 pathOffset += 24;
3610
3611 var query = (req.url).query;
3612 var queryOffset = 0;
3613 var queryMap = {};
3614 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3615 parseBool(n) {
3616 if (n == "true") return true;
3617 if (n == "false") return false;
3618 if (n == null) return null;
3619 throw new core.ArgumentError("Invalid boolean: $n");
3620 }
3621 if (query.length > 0) {
3622 for (var part in query.split("&")) {
3623 var keyvalue = part.split("=");
3624 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3625 }
3626 }
3627
3628
3629 var h = {
3630 "content-type" : "application/json; charset=utf-8",
3631 };
3632 var resp = convert.JSON.encode(buildEmpty());
3633 return new async.Future.value(stringResponse(200, h, resp));
3634 }), true);
3635 res.remove(arg_request, arg_accountId, arg_creativeId).then(unittest.expec tAsync1(((api.Empty response) {
3636 checkEmpty(response);
3637 })));
3638 });
3639
3640 });
3641
3642
3643 unittest.group("resource-AccountsFilterSetsResourceApi", () {
3644 unittest.test("method--create", () {
3645
3646 var mock = new HttpServerMock();
3647 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock). accounts.filterSets;
3648 var arg_request = buildFilterSet();
3649 var arg_accountId = "foo";
3650 var arg_isTransient = true;
3651 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3652 var obj = new api.FilterSet.fromJson(json);
3653 checkFilterSet(obj);
3654
3655 var path = (req.url).path;
3656 var pathOffset = 0;
3657 var index;
3658 var subPart;
3659 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3660 pathOffset += 1;
3661 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3662 pathOffset += 17;
3663 index = path.indexOf("/filterSets", pathOffset);
3664 unittest.expect(index >= 0, unittest.isTrue);
3665 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3666 pathOffset = index;
3667 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3668 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/filterSets"));
3669 pathOffset += 11;
3670
3671 var query = (req.url).query;
3672 var queryOffset = 0;
3673 var queryMap = {};
3674 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3675 parseBool(n) {
3676 if (n == "true") return true;
3677 if (n == "false") return false;
3678 if (n == null) return null;
3679 throw new core.ArgumentError("Invalid boolean: $n");
3680 }
3681 if (query.length > 0) {
3682 for (var part in query.split("&")) {
3683 var keyvalue = part.split("=");
3684 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3685 }
3686 }
3687 unittest.expect(queryMap["isTransient"].first, unittest.equals("$arg_isT ransient"));
3688
3689
3690 var h = {
3691 "content-type" : "application/json; charset=utf-8",
3692 };
3693 var resp = convert.JSON.encode(buildFilterSet());
3694 return new async.Future.value(stringResponse(200, h, resp));
3695 }), true);
3696 res.create(arg_request, arg_accountId, isTransient: arg_isTransient).then( unittest.expectAsync1(((api.FilterSet response) {
3697 checkFilterSet(response);
3698 })));
3699 });
3700
3701 unittest.test("method--delete", () {
3702
3703 var mock = new HttpServerMock();
3704 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock). accounts.filterSets;
3705 var arg_accountId = "foo";
3706 var arg_filterSetId = "foo";
3707 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3708 var path = (req.url).path;
3709 var pathOffset = 0;
3710 var index;
3711 var subPart;
3712 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3713 pathOffset += 1;
3714 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3715 pathOffset += 17;
3716 index = path.indexOf("/filterSets/", pathOffset);
3717 unittest.expect(index >= 0, unittest.isTrue);
3718 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3719 pathOffset = index;
3720 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3721 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
3722 pathOffset += 12;
3723 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3724 pathOffset = path.length;
3725 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
3726
3727 var query = (req.url).query;
3728 var queryOffset = 0;
3729 var queryMap = {};
3730 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3731 parseBool(n) {
3732 if (n == "true") return true;
3733 if (n == "false") return false;
3734 if (n == null) return null;
3735 throw new core.ArgumentError("Invalid boolean: $n");
3736 }
3737 if (query.length > 0) {
3738 for (var part in query.split("&")) {
3739 var keyvalue = part.split("=");
3740 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3741 }
3742 }
3743
3744
3745 var h = {
3746 "content-type" : "application/json; charset=utf-8",
3747 };
3748 var resp = convert.JSON.encode(buildEmpty());
3749 return new async.Future.value(stringResponse(200, h, resp));
3750 }), true);
3751 res.delete(arg_accountId, arg_filterSetId).then(unittest.expectAsync1(((ap i.Empty response) {
3752 checkEmpty(response);
3753 })));
3754 });
3755
3756 unittest.test("method--get", () {
3757
3758 var mock = new HttpServerMock();
3759 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock). accounts.filterSets;
3760 var arg_accountId = "foo";
3761 var arg_filterSetId = "foo";
3762 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3763 var path = (req.url).path;
3764 var pathOffset = 0;
3765 var index;
3766 var subPart;
3767 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3768 pathOffset += 1;
3769 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3770 pathOffset += 17;
3771 index = path.indexOf("/filterSets/", pathOffset);
3772 unittest.expect(index >= 0, unittest.isTrue);
3773 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3774 pathOffset = index;
3775 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3776 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
3777 pathOffset += 12;
3778 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
3779 pathOffset = path.length;
3780 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
3781
3782 var query = (req.url).query;
3783 var queryOffset = 0;
3784 var queryMap = {};
3785 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3786 parseBool(n) {
3787 if (n == "true") return true;
3788 if (n == "false") return false;
3789 if (n == null) return null;
3790 throw new core.ArgumentError("Invalid boolean: $n");
3791 }
3792 if (query.length > 0) {
3793 for (var part in query.split("&")) {
3794 var keyvalue = part.split("=");
3795 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3796 }
3797 }
3798
3799
3800 var h = {
3801 "content-type" : "application/json; charset=utf-8",
3802 };
3803 var resp = convert.JSON.encode(buildFilterSet());
3804 return new async.Future.value(stringResponse(200, h, resp));
3805 }), true);
3806 res.get(arg_accountId, arg_filterSetId).then(unittest.expectAsync1(((api.F ilterSet response) {
3807 checkFilterSet(response);
3808 })));
3809 });
3810
3811 unittest.test("method--list", () {
3812
3813 var mock = new HttpServerMock();
3814 api.AccountsFilterSetsResourceApi res = new api.Adexchangebuyer2Api(mock). accounts.filterSets;
3815 var arg_accountId = "foo";
3816 var arg_pageToken = "foo";
3817 var arg_pageSize = 42;
3818 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3819 var path = (req.url).path;
3820 var pathOffset = 0;
3821 var index;
3822 var subPart;
3823 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3824 pathOffset += 1;
3825 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3826 pathOffset += 17;
3827 index = path.indexOf("/filterSets", pathOffset);
3828 unittest.expect(index >= 0, unittest.isTrue);
3829 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3830 pathOffset = index;
3831 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3832 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/filterSets"));
3833 pathOffset += 11;
3834
3835 var query = (req.url).query;
3836 var queryOffset = 0;
3837 var queryMap = {};
3838 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3839 parseBool(n) {
3840 if (n == "true") return true;
3841 if (n == "false") return false;
3842 if (n == null) return null;
3843 throw new core.ArgumentError("Invalid boolean: $n");
3844 }
3845 if (query.length > 0) {
3846 for (var part in query.split("&")) {
3847 var keyvalue = part.split("=");
3848 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3849 }
3850 }
3851 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3852 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3853
3854
3855 var h = {
3856 "content-type" : "application/json; charset=utf-8",
3857 };
3858 var resp = convert.JSON.encode(buildListFilterSetsResponse());
3859 return new async.Future.value(stringResponse(200, h, resp));
3860 }), true);
3861 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize). then(unittest.expectAsync1(((api.ListFilterSetsResponse response) {
3862 checkListFilterSetsResponse(response);
3863 })));
3864 });
3865
3866 });
3867
3868
3869 unittest.group("resource-AccountsFilterSetsBidMetricsResourceApi", () {
3870 unittest.test("method--list", () {
3871
3872 var mock = new HttpServerMock();
3873 api.AccountsFilterSetsBidMetricsResourceApi res = new api.Adexchangebuyer2 Api(mock).accounts.filterSets.bidMetrics;
3874 var arg_accountId = "foo";
3875 var arg_filterSetId = "foo";
3876 var arg_pageToken = "foo";
3877 var arg_pageSize = 42;
3878 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3879 var path = (req.url).path;
3880 var pathOffset = 0;
3881 var index;
3882 var subPart;
3883 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
3884 pathOffset += 1;
3885 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
3886 pathOffset += 17;
3887 index = path.indexOf("/filterSets/", pathOffset);
3888 unittest.expect(index >= 0, unittest.isTrue);
3889 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3890 pathOffset = index;
3891 unittest.expect(subPart, unittest.equals("$arg_accountId"));
3892 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
3893 pathOffset += 12;
3894 index = path.indexOf("/bidMetrics", pathOffset);
3895 unittest.expect(index >= 0, unittest.isTrue);
3896 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
3897 pathOffset = index;
3898 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
3899 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/bidMetrics"));
3900 pathOffset += 11;
3901
3902 var query = (req.url).query;
3903 var queryOffset = 0;
3904 var queryMap = {};
3905 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3906 parseBool(n) {
3907 if (n == "true") return true;
3908 if (n == "false") return false;
3909 if (n == null) return null;
3910 throw new core.ArgumentError("Invalid boolean: $n");
3911 }
3912 if (query.length > 0) {
3913 for (var part in query.split("&")) {
3914 var keyvalue = part.split("=");
3915 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
3916 }
3917 }
3918 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3919 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
3920
3921
3922 var h = {
3923 "content-type" : "application/json; charset=utf-8",
3924 };
3925 var resp = convert.JSON.encode(buildListBidMetricsResponse());
3926 return new async.Future.value(stringResponse(200, h, resp));
3927 }), true);
3928 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListBidMetricsResponse respons e) {
3929 checkListBidMetricsResponse(response);
3930 })));
3931 });
3932
3933 });
3934
3935
3936 unittest.group("resource-AccountsFilterSetsBidResponseErrorsResourceApi", () {
3937 unittest.test("method--list", () {
3938
3939 var mock = new HttpServerMock();
3940 api.AccountsFilterSetsBidResponseErrorsResourceApi res = new api.Adexchang ebuyer2Api(mock).accounts.filterSets.bidResponseErrors;
3941 var arg_accountId = "foo";
3942 var arg_filterSetId = "foo";
3943 var arg_pageToken = "foo";
3944 var arg_pageSize = 42;
3945 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3946 var path = (req.url).path;
3947 var pathOffset = 0;
3948 var index;
1993 var subPart; 3949 var subPart;
1994 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3950 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
1995 pathOffset += 1; 3951 pathOffset += 1;
1996 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 3952 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
1997 pathOffset += 17; 3953 pathOffset += 17;
1998 index = path.indexOf("/clients/", pathOffset); 3954 index = path.indexOf("/filterSets/", pathOffset);
1999 unittest.expect(index >= 0, unittest.isTrue); 3955 unittest.expect(index >= 0, unittest.isTrue);
2000 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 3956 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2001 pathOffset = index; 3957 pathOffset = index;
2002 unittest.expect(subPart, unittest.equals("$arg_accountId")); 3958 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2003 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als("/clients/")); 3959 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2004 pathOffset += 9; 3960 pathOffset += 12;
2005 index = path.indexOf("/users/", pathOffset); 3961 index = path.indexOf("/bidResponseErrors", pathOffset);
2006 unittest.expect(index >= 0, unittest.isTrue); 3962 unittest.expect(index >= 0, unittest.isTrue);
2007 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 3963 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2008 pathOffset = index; 3964 pathOffset = index;
2009 unittest.expect(subPart, unittest.equals("$arg_clientAccountId")); 3965 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
2010 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als("/users/")); 3966 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq uals("/bidResponseErrors"));
2011 pathOffset += 7; 3967 pathOffset += 18;
2012 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset));
2013 pathOffset = path.length;
2014 unittest.expect(subPart, unittest.equals("$arg_userId"));
2015 3968
2016 var query = (req.url).query; 3969 var query = (req.url).query;
2017 var queryOffset = 0; 3970 var queryOffset = 0;
2018 var queryMap = {}; 3971 var queryMap = {};
2019 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3972 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2020 parseBool(n) { 3973 parseBool(n) {
2021 if (n == "true") return true; 3974 if (n == "true") return true;
2022 if (n == "false") return false; 3975 if (n == "false") return false;
2023 if (n == null) return null; 3976 if (n == null) return null;
2024 throw new core.ArgumentError("Invalid boolean: $n"); 3977 throw new core.ArgumentError("Invalid boolean: $n");
2025 } 3978 }
2026 if (query.length > 0) { 3979 if (query.length > 0) {
2027 for (var part in query.split("&")) { 3980 for (var part in query.split("&")) {
2028 var keyvalue = part.split("="); 3981 var keyvalue = part.split("=");
2029 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3982 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2030 } 3983 }
2031 } 3984 }
3985 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
3986 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2032 3987
2033 3988
2034 var h = { 3989 var h = {
2035 "content-type" : "application/json; charset=utf-8", 3990 "content-type" : "application/json; charset=utf-8",
2036 }; 3991 };
2037 var resp = convert.JSON.encode(buildClientUser()); 3992 var resp = convert.JSON.encode(buildListBidResponseErrorsResponse());
2038 return new async.Future.value(stringResponse(200, h, resp)); 3993 return new async.Future.value(stringResponse(200, h, resp));
2039 }), true); 3994 }), true);
2040 res.update(arg_request, arg_accountId, arg_clientAccountId, arg_userId).th en(unittest.expectAsync(((api.ClientUser response) { 3995 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListBidResponseErrorsResponse response) {
2041 checkClientUser(response); 3996 checkListBidResponseErrorsResponse(response);
2042 }))); 3997 })));
2043 }); 3998 });
2044 3999
2045 }); 4000 });
2046 4001
2047 4002
2048 unittest.group("resource-AccountsCreativesResourceApi", () { 4003 unittest.group("resource-AccountsFilterSetsBidResponsesWithoutBidsResourceApi" , () {
2049 unittest.test("method--create", () { 4004 unittest.test("method--list", () {
2050 4005
2051 var mock = new HttpServerMock(); 4006 var mock = new HttpServerMock();
2052 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives; 4007 api.AccountsFilterSetsBidResponsesWithoutBidsResourceApi res = new api.Ade xchangebuyer2Api(mock).accounts.filterSets.bidResponsesWithoutBids;
2053 var arg_request = buildCreative();
2054 var arg_accountId = "foo"; 4008 var arg_accountId = "foo";
2055 var arg_duplicateIdMode = "foo"; 4009 var arg_filterSetId = "foo";
2056 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4010 var arg_pageToken = "foo";
2057 var obj = new api.Creative.fromJson(json); 4011 var arg_pageSize = 42;
2058 checkCreative(obj); 4012 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2059
2060 var path = (req.url).path; 4013 var path = (req.url).path;
2061 var pathOffset = 0; 4014 var pathOffset = 0;
2062 var index; 4015 var index;
2063 var subPart; 4016 var subPart;
2064 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4017 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2065 pathOffset += 1; 4018 pathOffset += 1;
2066 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4019 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2067 pathOffset += 17; 4020 pathOffset += 17;
2068 index = path.indexOf("/creatives", pathOffset); 4021 index = path.indexOf("/filterSets/", pathOffset);
2069 unittest.expect(index >= 0, unittest.isTrue); 4022 unittest.expect(index >= 0, unittest.isTrue);
2070 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4023 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2071 pathOffset = index; 4024 pathOffset = index;
2072 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4025 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2073 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/creatives")); 4026 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2074 pathOffset += 10; 4027 pathOffset += 12;
4028 index = path.indexOf("/bidResponsesWithoutBids", pathOffset);
4029 unittest.expect(index >= 0, unittest.isTrue);
4030 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4031 pathOffset = index;
4032 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
4033 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq uals("/bidResponsesWithoutBids"));
4034 pathOffset += 24;
2075 4035
2076 var query = (req.url).query; 4036 var query = (req.url).query;
2077 var queryOffset = 0; 4037 var queryOffset = 0;
2078 var queryMap = {}; 4038 var queryMap = {};
2079 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4039 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2080 parseBool(n) { 4040 parseBool(n) {
2081 if (n == "true") return true; 4041 if (n == "true") return true;
2082 if (n == "false") return false; 4042 if (n == "false") return false;
2083 if (n == null) return null; 4043 if (n == null) return null;
2084 throw new core.ArgumentError("Invalid boolean: $n"); 4044 throw new core.ArgumentError("Invalid boolean: $n");
2085 } 4045 }
2086 if (query.length > 0) { 4046 if (query.length > 0) {
2087 for (var part in query.split("&")) { 4047 for (var part in query.split("&")) {
2088 var keyvalue = part.split("="); 4048 var keyvalue = part.split("=");
2089 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4049 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2090 } 4050 }
2091 } 4051 }
2092 unittest.expect(queryMap["duplicateIdMode"].first, unittest.equals(arg_d uplicateIdMode)); 4052 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
4053 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2093 4054
2094 4055
2095 var h = { 4056 var h = {
2096 "content-type" : "application/json; charset=utf-8", 4057 "content-type" : "application/json; charset=utf-8",
2097 }; 4058 };
2098 var resp = convert.JSON.encode(buildCreative()); 4059 var resp = convert.JSON.encode(buildListBidResponsesWithoutBidsResponse( ));
2099 return new async.Future.value(stringResponse(200, h, resp)); 4060 return new async.Future.value(stringResponse(200, h, resp));
2100 }), true); 4061 }), true);
2101 res.create(arg_request, arg_accountId, duplicateIdMode: arg_duplicateIdMod e).then(unittest.expectAsync(((api.Creative response) { 4062 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListBidResponsesWithoutBidsRes ponse response) {
2102 checkCreative(response); 4063 checkListBidResponsesWithoutBidsResponse(response);
2103 }))); 4064 })));
2104 }); 4065 });
2105 4066
2106 unittest.test("method--get", () { 4067 });
4068
4069
4070 unittest.group("resource-AccountsFilterSetsFilteredBidRequestsResourceApi", () {
4071 unittest.test("method--list", () {
2107 4072
2108 var mock = new HttpServerMock(); 4073 var mock = new HttpServerMock();
2109 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives; 4074 api.AccountsFilterSetsFilteredBidRequestsResourceApi res = new api.Adexcha ngebuyer2Api(mock).accounts.filterSets.filteredBidRequests;
2110 var arg_accountId = "foo"; 4075 var arg_accountId = "foo";
2111 var arg_creativeId = "foo"; 4076 var arg_filterSetId = "foo";
2112 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4077 var arg_pageToken = "foo";
4078 var arg_pageSize = 42;
4079 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2113 var path = (req.url).path; 4080 var path = (req.url).path;
2114 var pathOffset = 0; 4081 var pathOffset = 0;
2115 var index; 4082 var index;
2116 var subPart; 4083 var subPart;
2117 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4084 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2118 pathOffset += 1; 4085 pathOffset += 1;
2119 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4086 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2120 pathOffset += 17; 4087 pathOffset += 17;
2121 index = path.indexOf("/creatives/", pathOffset); 4088 index = path.indexOf("/filterSets/", pathOffset);
2122 unittest.expect(index >= 0, unittest.isTrue); 4089 unittest.expect(index >= 0, unittest.isTrue);
2123 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4090 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2124 pathOffset = index; 4091 pathOffset = index;
2125 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4092 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2126 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4093 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2127 pathOffset += 11; 4094 pathOffset += 12;
2128 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); 4095 index = path.indexOf("/filteredBidRequests", pathOffset);
2129 pathOffset = path.length; 4096 unittest.expect(index >= 0, unittest.isTrue);
2130 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4097 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4098 pathOffset = index;
4099 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
4100 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("/filteredBidRequests"));
4101 pathOffset += 20;
2131 4102
2132 var query = (req.url).query; 4103 var query = (req.url).query;
2133 var queryOffset = 0; 4104 var queryOffset = 0;
2134 var queryMap = {}; 4105 var queryMap = {};
2135 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4106 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2136 parseBool(n) { 4107 parseBool(n) {
2137 if (n == "true") return true; 4108 if (n == "true") return true;
2138 if (n == "false") return false; 4109 if (n == "false") return false;
2139 if (n == null) return null; 4110 if (n == null) return null;
2140 throw new core.ArgumentError("Invalid boolean: $n"); 4111 throw new core.ArgumentError("Invalid boolean: $n");
2141 } 4112 }
2142 if (query.length > 0) { 4113 if (query.length > 0) {
2143 for (var part in query.split("&")) { 4114 for (var part in query.split("&")) {
2144 var keyvalue = part.split("="); 4115 var keyvalue = part.split("=");
2145 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4116 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2146 } 4117 }
2147 } 4118 }
4119 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
4120 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2148 4121
2149 4122
2150 var h = { 4123 var h = {
2151 "content-type" : "application/json; charset=utf-8", 4124 "content-type" : "application/json; charset=utf-8",
2152 }; 4125 };
2153 var resp = convert.JSON.encode(buildCreative()); 4126 var resp = convert.JSON.encode(buildListFilteredBidRequestsResponse());
2154 return new async.Future.value(stringResponse(200, h, resp)); 4127 return new async.Future.value(stringResponse(200, h, resp));
2155 }), true); 4128 }), true);
2156 res.get(arg_accountId, arg_creativeId).then(unittest.expectAsync(((api.Cre ative response) { 4129 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListFilteredBidRequestsRespons e response) {
2157 checkCreative(response); 4130 checkListFilteredBidRequestsResponse(response);
2158 }))); 4131 })));
2159 }); 4132 });
2160 4133
4134 });
4135
4136
4137 unittest.group("resource-AccountsFilterSetsFilteredBidsResourceApi", () {
2161 unittest.test("method--list", () { 4138 unittest.test("method--list", () {
2162 4139
2163 var mock = new HttpServerMock(); 4140 var mock = new HttpServerMock();
2164 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives; 4141 api.AccountsFilterSetsFilteredBidsResourceApi res = new api.Adexchangebuye r2Api(mock).accounts.filterSets.filteredBids;
2165 var arg_accountId = "foo"; 4142 var arg_accountId = "foo";
4143 var arg_filterSetId = "foo";
2166 var arg_pageToken = "foo"; 4144 var arg_pageToken = "foo";
2167 var arg_pageSize = 42; 4145 var arg_pageSize = 42;
2168 var arg_query = "foo"; 4146 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2169 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2170 var path = (req.url).path; 4147 var path = (req.url).path;
2171 var pathOffset = 0; 4148 var pathOffset = 0;
2172 var index; 4149 var index;
2173 var subPart; 4150 var subPart;
2174 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4151 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2175 pathOffset += 1; 4152 pathOffset += 1;
2176 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4153 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2177 pathOffset += 17; 4154 pathOffset += 17;
2178 index = path.indexOf("/creatives", pathOffset); 4155 index = path.indexOf("/filterSets/", pathOffset);
2179 unittest.expect(index >= 0, unittest.isTrue); 4156 unittest.expect(index >= 0, unittest.isTrue);
2180 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4157 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2181 pathOffset = index; 4158 pathOffset = index;
2182 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4159 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2183 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/creatives")); 4160 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2184 pathOffset += 10; 4161 pathOffset += 12;
4162 index = path.indexOf("/filteredBids", pathOffset);
4163 unittest.expect(index >= 0, unittest.isTrue);
4164 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4165 pathOffset = index;
4166 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
4167 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals("/filteredBids"));
4168 pathOffset += 13;
2185 4169
2186 var query = (req.url).query; 4170 var query = (req.url).query;
2187 var queryOffset = 0; 4171 var queryOffset = 0;
2188 var queryMap = {}; 4172 var queryMap = {};
2189 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4173 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2190 parseBool(n) { 4174 parseBool(n) {
2191 if (n == "true") return true; 4175 if (n == "true") return true;
2192 if (n == "false") return false; 4176 if (n == "false") return false;
2193 if (n == null) return null; 4177 if (n == null) return null;
2194 throw new core.ArgumentError("Invalid boolean: $n"); 4178 throw new core.ArgumentError("Invalid boolean: $n");
2195 } 4179 }
2196 if (query.length > 0) { 4180 if (query.length > 0) {
2197 for (var part in query.split("&")) { 4181 for (var part in query.split("&")) {
2198 var keyvalue = part.split("="); 4182 var keyvalue = part.split("=");
2199 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4183 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2200 } 4184 }
2201 } 4185 }
2202 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 4186 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2203 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 4187 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2204 unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
2205 4188
2206 4189
2207 var h = { 4190 var h = {
2208 "content-type" : "application/json; charset=utf-8", 4191 "content-type" : "application/json; charset=utf-8",
2209 }; 4192 };
2210 var resp = convert.JSON.encode(buildListCreativesResponse()); 4193 var resp = convert.JSON.encode(buildListFilteredBidsResponse());
2211 return new async.Future.value(stringResponse(200, h, resp)); 4194 return new async.Future.value(stringResponse(200, h, resp));
2212 }), true); 4195 }), true);
2213 res.list(arg_accountId, pageToken: arg_pageToken, pageSize: arg_pageSize, query: arg_query).then(unittest.expectAsync(((api.ListCreativesResponse response ) { 4196 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListFilteredBidsResponse respo nse) {
2214 checkListCreativesResponse(response); 4197 checkListFilteredBidsResponse(response);
2215 }))); 4198 })));
2216 }); 4199 });
2217 4200
2218 unittest.test("method--stopWatching", () { 4201 });
4202
4203
4204 unittest.group("resource-AccountsFilterSetsFilteredBidsCreativesResourceApi", () {
4205 unittest.test("method--list", () {
2219 4206
2220 var mock = new HttpServerMock(); 4207 var mock = new HttpServerMock();
2221 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives; 4208 api.AccountsFilterSetsFilteredBidsCreativesResourceApi res = new api.Adexc hangebuyer2Api(mock).accounts.filterSets.filteredBids.creatives;
2222 var arg_request = buildStopWatchingCreativeRequest();
2223 var arg_accountId = "foo"; 4209 var arg_accountId = "foo";
2224 var arg_creativeId = "foo"; 4210 var arg_filterSetId = "foo";
2225 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4211 var arg_creativeStatusId = 42;
2226 var obj = new api.StopWatchingCreativeRequest.fromJson(json); 4212 var arg_pageToken = "foo";
2227 checkStopWatchingCreativeRequest(obj); 4213 var arg_pageSize = 42;
2228 4214 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2229 var path = (req.url).path; 4215 var path = (req.url).path;
2230 var pathOffset = 0; 4216 var pathOffset = 0;
2231 var index; 4217 var index;
2232 var subPart; 4218 var subPart;
2233 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4219 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2234 pathOffset += 1; 4220 pathOffset += 1;
2235 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4221 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2236 pathOffset += 17; 4222 pathOffset += 17;
2237 index = path.indexOf("/creatives/", pathOffset); 4223 index = path.indexOf("/filterSets/", pathOffset);
2238 unittest.expect(index >= 0, unittest.isTrue); 4224 unittest.expect(index >= 0, unittest.isTrue);
2239 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4225 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2240 pathOffset = index; 4226 pathOffset = index;
2241 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4227 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2242 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4228 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2243 pathOffset += 11; 4229 pathOffset += 12;
2244 index = path.indexOf(":stopWatching", pathOffset); 4230 index = path.indexOf("/filteredBids/", pathOffset);
2245 unittest.expect(index >= 0, unittest.isTrue); 4231 unittest.expect(index >= 0, unittest.isTrue);
2246 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4232 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2247 pathOffset = index; 4233 pathOffset = index;
2248 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4234 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
2249 unittest.expect(path.substring(pathOffset, pathOffset + 13), unittest.eq uals(":stopWatching")); 4235 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("/filteredBids/"));
2250 pathOffset += 13; 4236 pathOffset += 14;
4237 index = path.indexOf("/creatives", pathOffset);
4238 unittest.expect(index >= 0, unittest.isTrue);
4239 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4240 pathOffset = index;
4241 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId"));
4242 unittest.expect(path.substring(pathOffset, pathOffset + 10), unittest.eq uals("/creatives"));
4243 pathOffset += 10;
2251 4244
2252 var query = (req.url).query; 4245 var query = (req.url).query;
2253 var queryOffset = 0; 4246 var queryOffset = 0;
2254 var queryMap = {}; 4247 var queryMap = {};
2255 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4248 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2256 parseBool(n) { 4249 parseBool(n) {
2257 if (n == "true") return true; 4250 if (n == "true") return true;
2258 if (n == "false") return false; 4251 if (n == "false") return false;
2259 if (n == null) return null; 4252 if (n == null) return null;
2260 throw new core.ArgumentError("Invalid boolean: $n"); 4253 throw new core.ArgumentError("Invalid boolean: $n");
2261 } 4254 }
2262 if (query.length > 0) { 4255 if (query.length > 0) {
2263 for (var part in query.split("&")) { 4256 for (var part in query.split("&")) {
2264 var keyvalue = part.split("="); 4257 var keyvalue = part.split("=");
2265 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4258 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2266 } 4259 }
2267 } 4260 }
4261 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
4262 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2268 4263
2269 4264
2270 var h = { 4265 var h = {
2271 "content-type" : "application/json; charset=utf-8", 4266 "content-type" : "application/json; charset=utf-8",
2272 }; 4267 };
2273 var resp = convert.JSON.encode(buildEmpty()); 4268 var resp = convert.JSON.encode(buildListCreativeStatusBreakdownByCreativ eResponse());
2274 return new async.Future.value(stringResponse(200, h, resp)); 4269 return new async.Future.value(stringResponse(200, h, resp));
2275 }), true); 4270 }), true);
2276 res.stopWatching(arg_request, arg_accountId, arg_creativeId).then(unittest .expectAsync(((api.Empty response) { 4271 res.list(arg_accountId, arg_filterSetId, arg_creativeStatusId, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListCrea tiveStatusBreakdownByCreativeResponse response) {
2277 checkEmpty(response); 4272 checkListCreativeStatusBreakdownByCreativeResponse(response);
2278 }))); 4273 })));
2279 }); 4274 });
2280 4275
2281 unittest.test("method--update", () { 4276 });
4277
4278
4279 unittest.group("resource-AccountsFilterSetsFilteredBidsCreativesDetailsResourc eApi", () {
4280 unittest.test("method--list", () {
2282 4281
2283 var mock = new HttpServerMock(); 4282 var mock = new HttpServerMock();
2284 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives; 4283 api.AccountsFilterSetsFilteredBidsCreativesDetailsResourceApi res = new ap i.Adexchangebuyer2Api(mock).accounts.filterSets.filteredBids.creatives.details;
2285 var arg_request = buildCreative();
2286 var arg_accountId = "foo"; 4284 var arg_accountId = "foo";
4285 var arg_filterSetId = "foo";
4286 var arg_creativeStatusId = 42;
2287 var arg_creativeId = "foo"; 4287 var arg_creativeId = "foo";
2288 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4288 var arg_pageSize = 42;
2289 var obj = new api.Creative.fromJson(json); 4289 var arg_pageToken = "foo";
2290 checkCreative(obj); 4290 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2291
2292 var path = (req.url).path; 4291 var path = (req.url).path;
2293 var pathOffset = 0; 4292 var pathOffset = 0;
2294 var index; 4293 var index;
2295 var subPart; 4294 var subPart;
2296 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4295 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2297 pathOffset += 1; 4296 pathOffset += 1;
2298 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4297 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2299 pathOffset += 17; 4298 pathOffset += 17;
4299 index = path.indexOf("/filterSets/", pathOffset);
4300 unittest.expect(index >= 0, unittest.isTrue);
4301 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4302 pathOffset = index;
4303 unittest.expect(subPart, unittest.equals("$arg_accountId"));
4304 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
4305 pathOffset += 12;
4306 index = path.indexOf("/filteredBids/", pathOffset);
4307 unittest.expect(index >= 0, unittest.isTrue);
4308 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4309 pathOffset = index;
4310 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
4311 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("/filteredBids/"));
4312 pathOffset += 14;
2300 index = path.indexOf("/creatives/", pathOffset); 4313 index = path.indexOf("/creatives/", pathOffset);
2301 unittest.expect(index >= 0, unittest.isTrue); 4314 unittest.expect(index >= 0, unittest.isTrue);
2302 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4315 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2303 pathOffset = index; 4316 pathOffset = index;
2304 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4317 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId"));
2305 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4318 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/"));
2306 pathOffset += 11; 4319 pathOffset += 11;
2307 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset)); 4320 index = path.indexOf("/details", pathOffset);
2308 pathOffset = path.length; 4321 unittest.expect(index >= 0, unittest.isTrue);
4322 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4323 pathOffset = index;
2309 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4324 unittest.expect(subPart, unittest.equals("$arg_creativeId"));
4325 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("/details"));
4326 pathOffset += 8;
2310 4327
2311 var query = (req.url).query; 4328 var query = (req.url).query;
2312 var queryOffset = 0; 4329 var queryOffset = 0;
2313 var queryMap = {}; 4330 var queryMap = {};
2314 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4331 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2315 parseBool(n) { 4332 parseBool(n) {
2316 if (n == "true") return true; 4333 if (n == "true") return true;
2317 if (n == "false") return false; 4334 if (n == "false") return false;
2318 if (n == null) return null; 4335 if (n == null) return null;
2319 throw new core.ArgumentError("Invalid boolean: $n"); 4336 throw new core.ArgumentError("Invalid boolean: $n");
2320 } 4337 }
2321 if (query.length > 0) { 4338 if (query.length > 0) {
2322 for (var part in query.split("&")) { 4339 for (var part in query.split("&")) {
2323 var keyvalue = part.split("="); 4340 var keyvalue = part.split("=");
2324 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4341 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2325 } 4342 }
2326 } 4343 }
4344 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
4345 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2327 4346
2328 4347
2329 var h = { 4348 var h = {
2330 "content-type" : "application/json; charset=utf-8", 4349 "content-type" : "application/json; charset=utf-8",
2331 }; 4350 };
2332 var resp = convert.JSON.encode(buildCreative()); 4351 var resp = convert.JSON.encode(buildListCreativeStatusAndCreativeBreakdo wnByDetailResponse());
2333 return new async.Future.value(stringResponse(200, h, resp)); 4352 return new async.Future.value(stringResponse(200, h, resp));
2334 }), true); 4353 }), true);
2335 res.update(arg_request, arg_accountId, arg_creativeId).then(unittest.expec tAsync(((api.Creative response) { 4354 res.list(arg_accountId, arg_filterSetId, arg_creativeStatusId, arg_creativ eId, pageSize: arg_pageSize, pageToken: arg_pageToken).then(unittest.expectAsync 1(((api.ListCreativeStatusAndCreativeBreakdownByDetailResponse response) {
2336 checkCreative(response); 4355 checkListCreativeStatusAndCreativeBreakdownByDetailResponse(response);
2337 }))); 4356 })));
2338 }); 4357 });
2339 4358
2340 unittest.test("method--watch", () { 4359 });
4360
4361
4362 unittest.group("resource-AccountsFilterSetsFilteredBidsDetailsResourceApi", () {
4363 unittest.test("method--list", () {
2341 4364
2342 var mock = new HttpServerMock(); 4365 var mock = new HttpServerMock();
2343 api.AccountsCreativesResourceApi res = new api.Adexchangebuyer2Api(mock).a ccounts.creatives; 4366 api.AccountsFilterSetsFilteredBidsDetailsResourceApi res = new api.Adexcha ngebuyer2Api(mock).accounts.filterSets.filteredBids.details;
2344 var arg_request = buildWatchCreativeRequest();
2345 var arg_accountId = "foo"; 4367 var arg_accountId = "foo";
2346 var arg_creativeId = "foo"; 4368 var arg_filterSetId = "foo";
2347 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4369 var arg_creativeStatusId = 42;
2348 var obj = new api.WatchCreativeRequest.fromJson(json); 4370 var arg_pageToken = "foo";
2349 checkWatchCreativeRequest(obj); 4371 var arg_pageSize = 42;
2350 4372 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2351 var path = (req.url).path; 4373 var path = (req.url).path;
2352 var pathOffset = 0; 4374 var pathOffset = 0;
2353 var index; 4375 var index;
2354 var subPart; 4376 var subPart;
2355 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4377 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2356 pathOffset += 1; 4378 pathOffset += 1;
2357 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4379 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2358 pathOffset += 17; 4380 pathOffset += 17;
2359 index = path.indexOf("/creatives/", pathOffset); 4381 index = path.indexOf("/filterSets/", pathOffset);
2360 unittest.expect(index >= 0, unittest.isTrue); 4382 unittest.expect(index >= 0, unittest.isTrue);
2361 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4383 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2362 pathOffset = index; 4384 pathOffset = index;
2363 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4385 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2364 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4386 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2365 pathOffset += 11; 4387 pathOffset += 12;
2366 index = path.indexOf(":watch", pathOffset); 4388 index = path.indexOf("/filteredBids/", pathOffset);
2367 unittest.expect(index >= 0, unittest.isTrue); 4389 unittest.expect(index >= 0, unittest.isTrue);
2368 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4390 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2369 pathOffset = index; 4391 pathOffset = index;
2370 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4392 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
2371 unittest.expect(path.substring(pathOffset, pathOffset + 6), unittest.equ als(":watch")); 4393 unittest.expect(path.substring(pathOffset, pathOffset + 14), unittest.eq uals("/filteredBids/"));
2372 pathOffset += 6; 4394 pathOffset += 14;
4395 index = path.indexOf("/details", pathOffset);
4396 unittest.expect(index >= 0, unittest.isTrue);
4397 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
4398 pathOffset = index;
4399 unittest.expect(subPart, unittest.equals("$arg_creativeStatusId"));
4400 unittest.expect(path.substring(pathOffset, pathOffset + 8), unittest.equ als("/details"));
4401 pathOffset += 8;
2373 4402
2374 var query = (req.url).query; 4403 var query = (req.url).query;
2375 var queryOffset = 0; 4404 var queryOffset = 0;
2376 var queryMap = {}; 4405 var queryMap = {};
2377 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4406 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2378 parseBool(n) { 4407 parseBool(n) {
2379 if (n == "true") return true; 4408 if (n == "true") return true;
2380 if (n == "false") return false; 4409 if (n == "false") return false;
2381 if (n == null) return null; 4410 if (n == null) return null;
2382 throw new core.ArgumentError("Invalid boolean: $n"); 4411 throw new core.ArgumentError("Invalid boolean: $n");
2383 } 4412 }
2384 if (query.length > 0) { 4413 if (query.length > 0) {
2385 for (var part in query.split("&")) { 4414 for (var part in query.split("&")) {
2386 var keyvalue = part.split("="); 4415 var keyvalue = part.split("=");
2387 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4416 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2388 } 4417 }
2389 } 4418 }
4419 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
4420 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2390 4421
2391 4422
2392 var h = { 4423 var h = {
2393 "content-type" : "application/json; charset=utf-8", 4424 "content-type" : "application/json; charset=utf-8",
2394 }; 4425 };
2395 var resp = convert.JSON.encode(buildEmpty()); 4426 var resp = convert.JSON.encode(buildListCreativeStatusBreakdownByDetailR esponse());
2396 return new async.Future.value(stringResponse(200, h, resp)); 4427 return new async.Future.value(stringResponse(200, h, resp));
2397 }), true); 4428 }), true);
2398 res.watch(arg_request, arg_accountId, arg_creativeId).then(unittest.expect Async(((api.Empty response) { 4429 res.list(arg_accountId, arg_filterSetId, arg_creativeStatusId, pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.expectAsync1(((api.ListCrea tiveStatusBreakdownByDetailResponse response) {
2399 checkEmpty(response); 4430 checkListCreativeStatusBreakdownByDetailResponse(response);
2400 }))); 4431 })));
2401 }); 4432 });
2402 4433
2403 }); 4434 });
2404 4435
2405 4436
2406 unittest.group("resource-AccountsCreativesDealAssociationsResourceApi", () { 4437 unittest.group("resource-AccountsFilterSetsFilteredImpressionsResourceApi", () {
2407 unittest.test("method--add", () { 4438 unittest.test("method--list", () {
2408 4439
2409 var mock = new HttpServerMock(); 4440 var mock = new HttpServerMock();
2410 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb uyer2Api(mock).accounts.creatives.dealAssociations; 4441 api.AccountsFilterSetsFilteredImpressionsResourceApi res = new api.Adexcha ngebuyer2Api(mock).accounts.filterSets.filteredImpressions;
2411 var arg_request = buildAddDealAssociationRequest();
2412 var arg_accountId = "foo"; 4442 var arg_accountId = "foo";
2413 var arg_creativeId = "foo"; 4443 var arg_filterSetId = "foo";
2414 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4444 var arg_pageToken = "foo";
2415 var obj = new api.AddDealAssociationRequest.fromJson(json); 4445 var arg_pageSize = 42;
2416 checkAddDealAssociationRequest(obj); 4446 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2417
2418 var path = (req.url).path; 4447 var path = (req.url).path;
2419 var pathOffset = 0; 4448 var pathOffset = 0;
2420 var index; 4449 var index;
2421 var subPart; 4450 var subPart;
2422 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4451 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2423 pathOffset += 1; 4452 pathOffset += 1;
2424 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4453 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2425 pathOffset += 17; 4454 pathOffset += 17;
2426 index = path.indexOf("/creatives/", pathOffset); 4455 index = path.indexOf("/filterSets/", pathOffset);
2427 unittest.expect(index >= 0, unittest.isTrue); 4456 unittest.expect(index >= 0, unittest.isTrue);
2428 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4457 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2429 pathOffset = index; 4458 pathOffset = index;
2430 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4459 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2431 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4460 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2432 pathOffset += 11; 4461 pathOffset += 12;
2433 index = path.indexOf("/dealAssociations:add", pathOffset); 4462 index = path.indexOf("/filteredImpressions", pathOffset);
2434 unittest.expect(index >= 0, unittest.isTrue); 4463 unittest.expect(index >= 0, unittest.isTrue);
2435 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4464 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2436 pathOffset = index; 4465 pathOffset = index;
2437 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4466 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
2438 unittest.expect(path.substring(pathOffset, pathOffset + 21), unittest.eq uals("/dealAssociations:add")); 4467 unittest.expect(path.substring(pathOffset, pathOffset + 20), unittest.eq uals("/filteredImpressions"));
2439 pathOffset += 21; 4468 pathOffset += 20;
2440 4469
2441 var query = (req.url).query; 4470 var query = (req.url).query;
2442 var queryOffset = 0; 4471 var queryOffset = 0;
2443 var queryMap = {}; 4472 var queryMap = {};
2444 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4473 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2445 parseBool(n) { 4474 parseBool(n) {
2446 if (n == "true") return true; 4475 if (n == "true") return true;
2447 if (n == "false") return false; 4476 if (n == "false") return false;
2448 if (n == null) return null; 4477 if (n == null) return null;
2449 throw new core.ArgumentError("Invalid boolean: $n"); 4478 throw new core.ArgumentError("Invalid boolean: $n");
2450 } 4479 }
2451 if (query.length > 0) { 4480 if (query.length > 0) {
2452 for (var part in query.split("&")) { 4481 for (var part in query.split("&")) {
2453 var keyvalue = part.split("="); 4482 var keyvalue = part.split("=");
2454 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4483 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2455 } 4484 }
2456 } 4485 }
4486 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
4487 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2457 4488
2458 4489
2459 var h = { 4490 var h = {
2460 "content-type" : "application/json; charset=utf-8", 4491 "content-type" : "application/json; charset=utf-8",
2461 }; 4492 };
2462 var resp = convert.JSON.encode(buildEmpty()); 4493 var resp = convert.JSON.encode(buildListFilteredImpressionsResponse());
2463 return new async.Future.value(stringResponse(200, h, resp)); 4494 return new async.Future.value(stringResponse(200, h, resp));
2464 }), true); 4495 }), true);
2465 res.add(arg_request, arg_accountId, arg_creativeId).then(unittest.expectAs ync(((api.Empty response) { 4496 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListFilteredImpressionsRespons e response) {
2466 checkEmpty(response); 4497 checkListFilteredImpressionsResponse(response);
2467 }))); 4498 })));
2468 }); 4499 });
2469 4500
4501 });
4502
4503
4504 unittest.group("resource-AccountsFilterSetsImpressionMetricsResourceApi", () {
2470 unittest.test("method--list", () { 4505 unittest.test("method--list", () {
2471 4506
2472 var mock = new HttpServerMock(); 4507 var mock = new HttpServerMock();
2473 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb uyer2Api(mock).accounts.creatives.dealAssociations; 4508 api.AccountsFilterSetsImpressionMetricsResourceApi res = new api.Adexchang ebuyer2Api(mock).accounts.filterSets.impressionMetrics;
2474 var arg_accountId = "foo"; 4509 var arg_accountId = "foo";
2475 var arg_creativeId = "foo"; 4510 var arg_filterSetId = "foo";
2476 var arg_pageToken = "foo"; 4511 var arg_pageToken = "foo";
2477 var arg_pageSize = 42; 4512 var arg_pageSize = 42;
2478 var arg_query = "foo"; 4513 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2479 mock.register(unittest.expectAsync((http.BaseRequest req, json) {
2480 var path = (req.url).path; 4514 var path = (req.url).path;
2481 var pathOffset = 0; 4515 var pathOffset = 0;
2482 var index; 4516 var index;
2483 var subPart; 4517 var subPart;
2484 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4518 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2485 pathOffset += 1; 4519 pathOffset += 1;
2486 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4520 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2487 pathOffset += 17; 4521 pathOffset += 17;
2488 index = path.indexOf("/creatives/", pathOffset); 4522 index = path.indexOf("/filterSets/", pathOffset);
2489 unittest.expect(index >= 0, unittest.isTrue); 4523 unittest.expect(index >= 0, unittest.isTrue);
2490 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4524 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2491 pathOffset = index; 4525 pathOffset = index;
2492 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4526 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2493 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4527 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2494 pathOffset += 11; 4528 pathOffset += 12;
2495 index = path.indexOf("/dealAssociations", pathOffset); 4529 index = path.indexOf("/impressionMetrics", pathOffset);
2496 unittest.expect(index >= 0, unittest.isTrue); 4530 unittest.expect(index >= 0, unittest.isTrue);
2497 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4531 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2498 pathOffset = index; 4532 pathOffset = index;
2499 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4533 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
2500 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("/dealAssociations")); 4534 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq uals("/impressionMetrics"));
2501 pathOffset += 17; 4535 pathOffset += 18;
2502 4536
2503 var query = (req.url).query; 4537 var query = (req.url).query;
2504 var queryOffset = 0; 4538 var queryOffset = 0;
2505 var queryMap = {}; 4539 var queryMap = {};
2506 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4540 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2507 parseBool(n) { 4541 parseBool(n) {
2508 if (n == "true") return true; 4542 if (n == "true") return true;
2509 if (n == "false") return false; 4543 if (n == "false") return false;
2510 if (n == null) return null; 4544 if (n == null) return null;
2511 throw new core.ArgumentError("Invalid boolean: $n"); 4545 throw new core.ArgumentError("Invalid boolean: $n");
2512 } 4546 }
2513 if (query.length > 0) { 4547 if (query.length > 0) {
2514 for (var part in query.split("&")) { 4548 for (var part in query.split("&")) {
2515 var keyvalue = part.split("="); 4549 var keyvalue = part.split("=");
2516 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4550 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2517 } 4551 }
2518 } 4552 }
2519 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 4553 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2520 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 4554 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2521 unittest.expect(queryMap["query"].first, unittest.equals(arg_query));
2522 4555
2523 4556
2524 var h = { 4557 var h = {
2525 "content-type" : "application/json; charset=utf-8", 4558 "content-type" : "application/json; charset=utf-8",
2526 }; 4559 };
2527 var resp = convert.JSON.encode(buildListDealAssociationsResponse()); 4560 var resp = convert.JSON.encode(buildListImpressionMetricsResponse());
2528 return new async.Future.value(stringResponse(200, h, resp)); 4561 return new async.Future.value(stringResponse(200, h, resp));
2529 }), true); 4562 }), true);
2530 res.list(arg_accountId, arg_creativeId, pageToken: arg_pageToken, pageSize : arg_pageSize, query: arg_query).then(unittest.expectAsync(((api.ListDealAssoci ationsResponse response) { 4563 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListImpressionMetricsResponse response) {
2531 checkListDealAssociationsResponse(response); 4564 checkListImpressionMetricsResponse(response);
2532 }))); 4565 })));
2533 }); 4566 });
2534 4567
2535 unittest.test("method--remove", () { 4568 });
4569
4570
4571 unittest.group("resource-AccountsFilterSetsLosingBidsResourceApi", () {
4572 unittest.test("method--list", () {
2536 4573
2537 var mock = new HttpServerMock(); 4574 var mock = new HttpServerMock();
2538 api.AccountsCreativesDealAssociationsResourceApi res = new api.Adexchangeb uyer2Api(mock).accounts.creatives.dealAssociations; 4575 api.AccountsFilterSetsLosingBidsResourceApi res = new api.Adexchangebuyer2 Api(mock).accounts.filterSets.losingBids;
2539 var arg_request = buildRemoveDealAssociationRequest();
2540 var arg_accountId = "foo"; 4576 var arg_accountId = "foo";
2541 var arg_creativeId = "foo"; 4577 var arg_filterSetId = "foo";
2542 mock.register(unittest.expectAsync((http.BaseRequest req, json) { 4578 var arg_pageToken = "foo";
2543 var obj = new api.RemoveDealAssociationRequest.fromJson(json); 4579 var arg_pageSize = 42;
2544 checkRemoveDealAssociationRequest(obj); 4580 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2545
2546 var path = (req.url).path; 4581 var path = (req.url).path;
2547 var pathOffset = 0; 4582 var pathOffset = 0;
2548 var index; 4583 var index;
2549 var subPart; 4584 var subPart;
2550 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4585 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/"));
2551 pathOffset += 1; 4586 pathOffset += 1;
2552 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/")); 4587 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals("v2beta1/accounts/"));
2553 pathOffset += 17; 4588 pathOffset += 17;
2554 index = path.indexOf("/creatives/", pathOffset); 4589 index = path.indexOf("/filterSets/", pathOffset);
2555 unittest.expect(index >= 0, unittest.isTrue); 4590 unittest.expect(index >= 0, unittest.isTrue);
2556 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4591 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2557 pathOffset = index; 4592 pathOffset = index;
2558 unittest.expect(subPart, unittest.equals("$arg_accountId")); 4593 unittest.expect(subPart, unittest.equals("$arg_accountId"));
2559 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/creatives/")); 4594 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("/filterSets/"));
2560 pathOffset += 11; 4595 pathOffset += 12;
2561 index = path.indexOf("/dealAssociations:remove", pathOffset); 4596 index = path.indexOf("/losingBids", pathOffset);
2562 unittest.expect(index >= 0, unittest.isTrue); 4597 unittest.expect(index >= 0, unittest.isTrue);
2563 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 4598 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index ));
2564 pathOffset = index; 4599 pathOffset = index;
2565 unittest.expect(subPart, unittest.equals("$arg_creativeId")); 4600 unittest.expect(subPart, unittest.equals("$arg_filterSetId"));
2566 unittest.expect(path.substring(pathOffset, pathOffset + 24), unittest.eq uals("/dealAssociations:remove")); 4601 unittest.expect(path.substring(pathOffset, pathOffset + 11), unittest.eq uals("/losingBids"));
2567 pathOffset += 24; 4602 pathOffset += 11;
2568 4603
2569 var query = (req.url).query; 4604 var query = (req.url).query;
2570 var queryOffset = 0; 4605 var queryOffset = 0;
2571 var queryMap = {}; 4606 var queryMap = {};
2572 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4607 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2573 parseBool(n) { 4608 parseBool(n) {
2574 if (n == "true") return true; 4609 if (n == "true") return true;
2575 if (n == "false") return false; 4610 if (n == "false") return false;
2576 if (n == null) return null; 4611 if (n == null) return null;
2577 throw new core.ArgumentError("Invalid boolean: $n"); 4612 throw new core.ArgumentError("Invalid boolean: $n");
2578 } 4613 }
2579 if (query.length > 0) { 4614 if (query.length > 0) {
2580 for (var part in query.split("&")) { 4615 for (var part in query.split("&")) {
2581 var keyvalue = part.split("="); 4616 var keyvalue = part.split("=");
2582 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4617 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1]));
2583 } 4618 }
2584 } 4619 }
4620 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
4621 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2585 4622
2586 4623
2587 var h = { 4624 var h = {
2588 "content-type" : "application/json; charset=utf-8", 4625 "content-type" : "application/json; charset=utf-8",
2589 }; 4626 };
2590 var resp = convert.JSON.encode(buildEmpty()); 4627 var resp = convert.JSON.encode(buildListLosingBidsResponse());
2591 return new async.Future.value(stringResponse(200, h, resp)); 4628 return new async.Future.value(stringResponse(200, h, resp));
2592 }), true); 4629 }), true);
2593 res.remove(arg_request, arg_accountId, arg_creativeId).then(unittest.expec tAsync(((api.Empty response) { 4630 res.list(arg_accountId, arg_filterSetId, pageToken: arg_pageToken, pageSiz e: arg_pageSize).then(unittest.expectAsync1(((api.ListLosingBidsResponse respons e) {
2594 checkEmpty(response); 4631 checkListLosingBidsResponse(response);
2595 }))); 4632 })));
2596 }); 4633 });
2597 4634
2598 }); 4635 });
2599 4636
2600 4637
2601 } 4638 }
2602 4639
OLDNEW
« no previous file with comments | « generated/googleapis_beta/pubspec.yaml ('k') | generated/googleapis_beta/test/appengine/v1beta4_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698