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

Side by Side Diff: generated/googleapis/test/logging/v2_test.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.logging.v2.test; 1 library googleapis.logging.v2.test;
2 2
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "dart:collection" as collection;
5 import "dart:async" as async; 4 import "dart:async" as async;
6 import "dart:convert" as convert; 5 import "dart:convert" as convert;
7 6
8 import 'package:http/http.dart' as http; 7 import 'package:http/http.dart' as http;
9 import 'package:http/testing.dart' as http_testing;
10 import 'package:test/test.dart' as unittest; 8 import 'package:test/test.dart' as unittest;
11 9
12 import 'package:googleapis/logging/v2.dart' as api; 10 import 'package:googleapis/logging/v2.dart' as api;
13 11
14 class HttpServerMock extends http.BaseClient { 12 class HttpServerMock extends http.BaseClient {
15 core.Function _callback; 13 core.Function _callback;
16 core.bool _expectJson; 14 core.bool _expectJson;
17 15
18 void register(core.Function callback, core.bool expectJson) { 16 void register(core.Function callback, core.bool expectJson) {
19 _callback = callback; 17 _callback = callback;
20 _expectJson = expectJson; 18 _expectJson = expectJson;
21 } 19 }
22 20
23 async.Future<http.StreamedResponse> send(http.BaseRequest request) { 21 async.Future<http.StreamedResponse> send(http.BaseRequest request) {
24 if (_expectJson) { 22 if (_expectJson) {
25 return request.finalize() 23 return request
24 .finalize()
26 .transform(convert.UTF8.decoder) 25 .transform(convert.UTF8.decoder)
27 .join('') 26 .join('')
28 .then((core.String jsonString) { 27 .then((core.String jsonString) {
29 if (jsonString.isEmpty) { 28 if (jsonString.isEmpty) {
30 return _callback(request, null); 29 return _callback(request, null);
31 } else { 30 } else {
32 return _callback(request, convert.JSON.decode(jsonString)); 31 return _callback(request, convert.JSON.decode(jsonString));
33 } 32 }
34 }); 33 });
35 } else { 34 } else {
36 var stream = request.finalize(); 35 var stream = request.finalize();
37 if (stream == null) { 36 if (stream == null) {
38 return _callback(request, []); 37 return _callback(request, []);
39 } else { 38 } else {
40 return stream.toBytes().then((data) { 39 return stream.toBytes().then((data) {
41 return _callback(request, data); 40 return _callback(request, data);
42 }); 41 });
43 } 42 }
44 } 43 }
45 } 44 }
46 } 45 }
47 46
48 http.StreamedResponse stringResponse( 47 http.StreamedResponse stringResponse(core.int status,
49 core.int status, core.Map<core.String, core.String> headers, core.String bod y) { 48 core.Map<core.String, core.String> headers, core.String body) {
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); 49 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]);
51 return new http.StreamedResponse(stream, status, headers: headers); 50 return new http.StreamedResponse(stream, status, headers: headers);
52 } 51 }
53 52
53 core.int buildCounterBucketOptions = 0;
54 buildBucketOptions() {
55 var o = new api.BucketOptions();
56 buildCounterBucketOptions++;
57 if (buildCounterBucketOptions < 3) {
58 o.explicitBuckets = buildExplicit();
59 o.exponentialBuckets = buildExponential();
60 o.linearBuckets = buildLinear();
61 }
62 buildCounterBucketOptions--;
63 return o;
64 }
65
66 checkBucketOptions(api.BucketOptions o) {
67 buildCounterBucketOptions++;
68 if (buildCounterBucketOptions < 3) {
69 checkExplicit(o.explicitBuckets);
70 checkExponential(o.exponentialBuckets);
71 checkLinear(o.linearBuckets);
72 }
73 buildCounterBucketOptions--;
74 }
75
54 core.int buildCounterEmpty = 0; 76 core.int buildCounterEmpty = 0;
55 buildEmpty() { 77 buildEmpty() {
56 var o = new api.Empty(); 78 var o = new api.Empty();
57 buildCounterEmpty++; 79 buildCounterEmpty++;
58 if (buildCounterEmpty < 3) { 80 if (buildCounterEmpty < 3) {}
59 }
60 buildCounterEmpty--; 81 buildCounterEmpty--;
61 return o; 82 return o;
62 } 83 }
63 84
64 checkEmpty(api.Empty o) { 85 checkEmpty(api.Empty o) {
65 buildCounterEmpty++; 86 buildCounterEmpty++;
66 if (buildCounterEmpty < 3) { 87 if (buildCounterEmpty < 3) {}
88 buildCounterEmpty--;
89 }
90
91 buildUnnamed250() {
92 var o = new core.List<core.double>();
93 o.add(42.0);
94 o.add(42.0);
95 return o;
96 }
97
98 checkUnnamed250(core.List<core.double> o) {
99 unittest.expect(o, unittest.hasLength(2));
100 unittest.expect(o[0], unittest.equals(42.0));
101 unittest.expect(o[1], unittest.equals(42.0));
102 }
103
104 core.int buildCounterExplicit = 0;
105 buildExplicit() {
106 var o = new api.Explicit();
107 buildCounterExplicit++;
108 if (buildCounterExplicit < 3) {
109 o.bounds = buildUnnamed250();
67 } 110 }
68 buildCounterEmpty--; 111 buildCounterExplicit--;
112 return o;
113 }
114
115 checkExplicit(api.Explicit o) {
116 buildCounterExplicit++;
117 if (buildCounterExplicit < 3) {
118 checkUnnamed250(o.bounds);
119 }
120 buildCounterExplicit--;
121 }
122
123 core.int buildCounterExponential = 0;
124 buildExponential() {
125 var o = new api.Exponential();
126 buildCounterExponential++;
127 if (buildCounterExponential < 3) {
128 o.growthFactor = 42.0;
129 o.numFiniteBuckets = 42;
130 o.scale = 42.0;
131 }
132 buildCounterExponential--;
133 return o;
134 }
135
136 checkExponential(api.Exponential o) {
137 buildCounterExponential++;
138 if (buildCounterExponential < 3) {
139 unittest.expect(o.growthFactor, unittest.equals(42.0));
140 unittest.expect(o.numFiniteBuckets, unittest.equals(42));
141 unittest.expect(o.scale, unittest.equals(42.0));
142 }
143 buildCounterExponential--;
69 } 144 }
70 145
71 core.int buildCounterHttpRequest = 0; 146 core.int buildCounterHttpRequest = 0;
72 buildHttpRequest() { 147 buildHttpRequest() {
73 var o = new api.HttpRequest(); 148 var o = new api.HttpRequest();
74 buildCounterHttpRequest++; 149 buildCounterHttpRequest++;
75 if (buildCounterHttpRequest < 3) { 150 if (buildCounterHttpRequest < 3) {
76 o.cacheFillBytes = "foo"; 151 o.cacheFillBytes = "foo";
77 o.cacheHit = true; 152 o.cacheHit = true;
78 o.cacheLookup = true; 153 o.cacheLookup = true;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 checkLabelDescriptor(api.LabelDescriptor o) { 206 checkLabelDescriptor(api.LabelDescriptor o) {
132 buildCounterLabelDescriptor++; 207 buildCounterLabelDescriptor++;
133 if (buildCounterLabelDescriptor < 3) { 208 if (buildCounterLabelDescriptor < 3) {
134 unittest.expect(o.description, unittest.equals('foo')); 209 unittest.expect(o.description, unittest.equals('foo'));
135 unittest.expect(o.key, unittest.equals('foo')); 210 unittest.expect(o.key, unittest.equals('foo'));
136 unittest.expect(o.valueType, unittest.equals('foo')); 211 unittest.expect(o.valueType, unittest.equals('foo'));
137 } 212 }
138 buildCounterLabelDescriptor--; 213 buildCounterLabelDescriptor--;
139 } 214 }
140 215
141 buildUnnamed255() { 216 core.int buildCounterLinear = 0;
217 buildLinear() {
218 var o = new api.Linear();
219 buildCounterLinear++;
220 if (buildCounterLinear < 3) {
221 o.numFiniteBuckets = 42;
222 o.offset = 42.0;
223 o.width = 42.0;
224 }
225 buildCounterLinear--;
226 return o;
227 }
228
229 checkLinear(api.Linear o) {
230 buildCounterLinear++;
231 if (buildCounterLinear < 3) {
232 unittest.expect(o.numFiniteBuckets, unittest.equals(42));
233 unittest.expect(o.offset, unittest.equals(42.0));
234 unittest.expect(o.width, unittest.equals(42.0));
235 }
236 buildCounterLinear--;
237 }
238
239 buildUnnamed251() {
240 var o = new core.List<api.LogExclusion>();
241 o.add(buildLogExclusion());
242 o.add(buildLogExclusion());
243 return o;
244 }
245
246 checkUnnamed251(core.List<api.LogExclusion> o) {
247 unittest.expect(o, unittest.hasLength(2));
248 checkLogExclusion(o[0]);
249 checkLogExclusion(o[1]);
250 }
251
252 core.int buildCounterListExclusionsResponse = 0;
253 buildListExclusionsResponse() {
254 var o = new api.ListExclusionsResponse();
255 buildCounterListExclusionsResponse++;
256 if (buildCounterListExclusionsResponse < 3) {
257 o.exclusions = buildUnnamed251();
258 o.nextPageToken = "foo";
259 }
260 buildCounterListExclusionsResponse--;
261 return o;
262 }
263
264 checkListExclusionsResponse(api.ListExclusionsResponse o) {
265 buildCounterListExclusionsResponse++;
266 if (buildCounterListExclusionsResponse < 3) {
267 checkUnnamed251(o.exclusions);
268 unittest.expect(o.nextPageToken, unittest.equals('foo'));
269 }
270 buildCounterListExclusionsResponse--;
271 }
272
273 buildUnnamed252() {
142 var o = new core.List<core.String>(); 274 var o = new core.List<core.String>();
143 o.add("foo"); 275 o.add("foo");
144 o.add("foo"); 276 o.add("foo");
145 return o; 277 return o;
146 } 278 }
147 279
148 checkUnnamed255(core.List<core.String> o) { 280 checkUnnamed252(core.List<core.String> o) {
149 unittest.expect(o, unittest.hasLength(2)); 281 unittest.expect(o, unittest.hasLength(2));
150 unittest.expect(o[0], unittest.equals('foo')); 282 unittest.expect(o[0], unittest.equals('foo'));
151 unittest.expect(o[1], unittest.equals('foo')); 283 unittest.expect(o[1], unittest.equals('foo'));
152 } 284 }
153 285
154 buildUnnamed256() { 286 buildUnnamed253() {
155 var o = new core.List<core.String>(); 287 var o = new core.List<core.String>();
156 o.add("foo"); 288 o.add("foo");
157 o.add("foo"); 289 o.add("foo");
158 return o; 290 return o;
159 } 291 }
160 292
161 checkUnnamed256(core.List<core.String> o) { 293 checkUnnamed253(core.List<core.String> o) {
162 unittest.expect(o, unittest.hasLength(2)); 294 unittest.expect(o, unittest.hasLength(2));
163 unittest.expect(o[0], unittest.equals('foo')); 295 unittest.expect(o[0], unittest.equals('foo'));
164 unittest.expect(o[1], unittest.equals('foo')); 296 unittest.expect(o[1], unittest.equals('foo'));
165 } 297 }
166 298
167 core.int buildCounterListLogEntriesRequest = 0; 299 core.int buildCounterListLogEntriesRequest = 0;
168 buildListLogEntriesRequest() { 300 buildListLogEntriesRequest() {
169 var o = new api.ListLogEntriesRequest(); 301 var o = new api.ListLogEntriesRequest();
170 buildCounterListLogEntriesRequest++; 302 buildCounterListLogEntriesRequest++;
171 if (buildCounterListLogEntriesRequest < 3) { 303 if (buildCounterListLogEntriesRequest < 3) {
172 o.filter = "foo"; 304 o.filter = "foo";
173 o.orderBy = "foo"; 305 o.orderBy = "foo";
174 o.pageSize = 42; 306 o.pageSize = 42;
175 o.pageToken = "foo"; 307 o.pageToken = "foo";
176 o.projectIds = buildUnnamed255(); 308 o.projectIds = buildUnnamed252();
177 o.resourceNames = buildUnnamed256(); 309 o.resourceNames = buildUnnamed253();
178 } 310 }
179 buildCounterListLogEntriesRequest--; 311 buildCounterListLogEntriesRequest--;
180 return o; 312 return o;
181 } 313 }
182 314
183 checkListLogEntriesRequest(api.ListLogEntriesRequest o) { 315 checkListLogEntriesRequest(api.ListLogEntriesRequest o) {
184 buildCounterListLogEntriesRequest++; 316 buildCounterListLogEntriesRequest++;
185 if (buildCounterListLogEntriesRequest < 3) { 317 if (buildCounterListLogEntriesRequest < 3) {
186 unittest.expect(o.filter, unittest.equals('foo')); 318 unittest.expect(o.filter, unittest.equals('foo'));
187 unittest.expect(o.orderBy, unittest.equals('foo')); 319 unittest.expect(o.orderBy, unittest.equals('foo'));
188 unittest.expect(o.pageSize, unittest.equals(42)); 320 unittest.expect(o.pageSize, unittest.equals(42));
189 unittest.expect(o.pageToken, unittest.equals('foo')); 321 unittest.expect(o.pageToken, unittest.equals('foo'));
190 checkUnnamed255(o.projectIds); 322 checkUnnamed252(o.projectIds);
191 checkUnnamed256(o.resourceNames); 323 checkUnnamed253(o.resourceNames);
192 } 324 }
193 buildCounterListLogEntriesRequest--; 325 buildCounterListLogEntriesRequest--;
194 } 326 }
195 327
196 buildUnnamed257() { 328 buildUnnamed254() {
197 var o = new core.List<api.LogEntry>(); 329 var o = new core.List<api.LogEntry>();
198 o.add(buildLogEntry()); 330 o.add(buildLogEntry());
199 o.add(buildLogEntry()); 331 o.add(buildLogEntry());
200 return o; 332 return o;
201 } 333 }
202 334
203 checkUnnamed257(core.List<api.LogEntry> o) { 335 checkUnnamed254(core.List<api.LogEntry> o) {
204 unittest.expect(o, unittest.hasLength(2)); 336 unittest.expect(o, unittest.hasLength(2));
205 checkLogEntry(o[0]); 337 checkLogEntry(o[0]);
206 checkLogEntry(o[1]); 338 checkLogEntry(o[1]);
207 } 339 }
208 340
209 core.int buildCounterListLogEntriesResponse = 0; 341 core.int buildCounterListLogEntriesResponse = 0;
210 buildListLogEntriesResponse() { 342 buildListLogEntriesResponse() {
211 var o = new api.ListLogEntriesResponse(); 343 var o = new api.ListLogEntriesResponse();
212 buildCounterListLogEntriesResponse++; 344 buildCounterListLogEntriesResponse++;
213 if (buildCounterListLogEntriesResponse < 3) { 345 if (buildCounterListLogEntriesResponse < 3) {
214 o.entries = buildUnnamed257(); 346 o.entries = buildUnnamed254();
215 o.nextPageToken = "foo"; 347 o.nextPageToken = "foo";
216 } 348 }
217 buildCounterListLogEntriesResponse--; 349 buildCounterListLogEntriesResponse--;
218 return o; 350 return o;
219 } 351 }
220 352
221 checkListLogEntriesResponse(api.ListLogEntriesResponse o) { 353 checkListLogEntriesResponse(api.ListLogEntriesResponse o) {
222 buildCounterListLogEntriesResponse++; 354 buildCounterListLogEntriesResponse++;
223 if (buildCounterListLogEntriesResponse < 3) { 355 if (buildCounterListLogEntriesResponse < 3) {
224 checkUnnamed257(o.entries); 356 checkUnnamed254(o.entries);
225 unittest.expect(o.nextPageToken, unittest.equals('foo')); 357 unittest.expect(o.nextPageToken, unittest.equals('foo'));
226 } 358 }
227 buildCounterListLogEntriesResponse--; 359 buildCounterListLogEntriesResponse--;
228 } 360 }
229 361
230 buildUnnamed258() { 362 buildUnnamed255() {
231 var o = new core.List<api.LogMetric>(); 363 var o = new core.List<api.LogMetric>();
232 o.add(buildLogMetric()); 364 o.add(buildLogMetric());
233 o.add(buildLogMetric()); 365 o.add(buildLogMetric());
234 return o; 366 return o;
235 } 367 }
236 368
237 checkUnnamed258(core.List<api.LogMetric> o) { 369 checkUnnamed255(core.List<api.LogMetric> o) {
238 unittest.expect(o, unittest.hasLength(2)); 370 unittest.expect(o, unittest.hasLength(2));
239 checkLogMetric(o[0]); 371 checkLogMetric(o[0]);
240 checkLogMetric(o[1]); 372 checkLogMetric(o[1]);
241 } 373 }
242 374
243 core.int buildCounterListLogMetricsResponse = 0; 375 core.int buildCounterListLogMetricsResponse = 0;
244 buildListLogMetricsResponse() { 376 buildListLogMetricsResponse() {
245 var o = new api.ListLogMetricsResponse(); 377 var o = new api.ListLogMetricsResponse();
246 buildCounterListLogMetricsResponse++; 378 buildCounterListLogMetricsResponse++;
247 if (buildCounterListLogMetricsResponse < 3) { 379 if (buildCounterListLogMetricsResponse < 3) {
248 o.metrics = buildUnnamed258(); 380 o.metrics = buildUnnamed255();
249 o.nextPageToken = "foo"; 381 o.nextPageToken = "foo";
250 } 382 }
251 buildCounterListLogMetricsResponse--; 383 buildCounterListLogMetricsResponse--;
252 return o; 384 return o;
253 } 385 }
254 386
255 checkListLogMetricsResponse(api.ListLogMetricsResponse o) { 387 checkListLogMetricsResponse(api.ListLogMetricsResponse o) {
256 buildCounterListLogMetricsResponse++; 388 buildCounterListLogMetricsResponse++;
257 if (buildCounterListLogMetricsResponse < 3) { 389 if (buildCounterListLogMetricsResponse < 3) {
258 checkUnnamed258(o.metrics); 390 checkUnnamed255(o.metrics);
259 unittest.expect(o.nextPageToken, unittest.equals('foo')); 391 unittest.expect(o.nextPageToken, unittest.equals('foo'));
260 } 392 }
261 buildCounterListLogMetricsResponse--; 393 buildCounterListLogMetricsResponse--;
262 } 394 }
263 395
264 buildUnnamed259() { 396 buildUnnamed256() {
265 var o = new core.List<core.String>(); 397 var o = new core.List<core.String>();
266 o.add("foo"); 398 o.add("foo");
267 o.add("foo"); 399 o.add("foo");
268 return o; 400 return o;
269 } 401 }
270 402
271 checkUnnamed259(core.List<core.String> o) { 403 checkUnnamed256(core.List<core.String> o) {
272 unittest.expect(o, unittest.hasLength(2)); 404 unittest.expect(o, unittest.hasLength(2));
273 unittest.expect(o[0], unittest.equals('foo')); 405 unittest.expect(o[0], unittest.equals('foo'));
274 unittest.expect(o[1], unittest.equals('foo')); 406 unittest.expect(o[1], unittest.equals('foo'));
275 } 407 }
276 408
277 core.int buildCounterListLogsResponse = 0; 409 core.int buildCounterListLogsResponse = 0;
278 buildListLogsResponse() { 410 buildListLogsResponse() {
279 var o = new api.ListLogsResponse(); 411 var o = new api.ListLogsResponse();
280 buildCounterListLogsResponse++; 412 buildCounterListLogsResponse++;
281 if (buildCounterListLogsResponse < 3) { 413 if (buildCounterListLogsResponse < 3) {
282 o.logNames = buildUnnamed259(); 414 o.logNames = buildUnnamed256();
283 o.nextPageToken = "foo"; 415 o.nextPageToken = "foo";
284 } 416 }
285 buildCounterListLogsResponse--; 417 buildCounterListLogsResponse--;
286 return o; 418 return o;
287 } 419 }
288 420
289 checkListLogsResponse(api.ListLogsResponse o) { 421 checkListLogsResponse(api.ListLogsResponse o) {
290 buildCounterListLogsResponse++; 422 buildCounterListLogsResponse++;
291 if (buildCounterListLogsResponse < 3) { 423 if (buildCounterListLogsResponse < 3) {
292 checkUnnamed259(o.logNames); 424 checkUnnamed256(o.logNames);
293 unittest.expect(o.nextPageToken, unittest.equals('foo')); 425 unittest.expect(o.nextPageToken, unittest.equals('foo'));
294 } 426 }
295 buildCounterListLogsResponse--; 427 buildCounterListLogsResponse--;
296 } 428 }
297 429
298 buildUnnamed260() { 430 buildUnnamed257() {
299 var o = new core.List<api.MonitoredResourceDescriptor>(); 431 var o = new core.List<api.MonitoredResourceDescriptor>();
300 o.add(buildMonitoredResourceDescriptor()); 432 o.add(buildMonitoredResourceDescriptor());
301 o.add(buildMonitoredResourceDescriptor()); 433 o.add(buildMonitoredResourceDescriptor());
302 return o; 434 return o;
303 } 435 }
304 436
305 checkUnnamed260(core.List<api.MonitoredResourceDescriptor> o) { 437 checkUnnamed257(core.List<api.MonitoredResourceDescriptor> o) {
306 unittest.expect(o, unittest.hasLength(2)); 438 unittest.expect(o, unittest.hasLength(2));
307 checkMonitoredResourceDescriptor(o[0]); 439 checkMonitoredResourceDescriptor(o[0]);
308 checkMonitoredResourceDescriptor(o[1]); 440 checkMonitoredResourceDescriptor(o[1]);
309 } 441 }
310 442
311 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0; 443 core.int buildCounterListMonitoredResourceDescriptorsResponse = 0;
312 buildListMonitoredResourceDescriptorsResponse() { 444 buildListMonitoredResourceDescriptorsResponse() {
313 var o = new api.ListMonitoredResourceDescriptorsResponse(); 445 var o = new api.ListMonitoredResourceDescriptorsResponse();
314 buildCounterListMonitoredResourceDescriptorsResponse++; 446 buildCounterListMonitoredResourceDescriptorsResponse++;
315 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { 447 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) {
316 o.nextPageToken = "foo"; 448 o.nextPageToken = "foo";
317 o.resourceDescriptors = buildUnnamed260(); 449 o.resourceDescriptors = buildUnnamed257();
318 } 450 }
319 buildCounterListMonitoredResourceDescriptorsResponse--; 451 buildCounterListMonitoredResourceDescriptorsResponse--;
320 return o; 452 return o;
321 } 453 }
322 454
323 checkListMonitoredResourceDescriptorsResponse(api.ListMonitoredResourceDescripto rsResponse o) { 455 checkListMonitoredResourceDescriptorsResponse(
456 api.ListMonitoredResourceDescriptorsResponse o) {
324 buildCounterListMonitoredResourceDescriptorsResponse++; 457 buildCounterListMonitoredResourceDescriptorsResponse++;
325 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) { 458 if (buildCounterListMonitoredResourceDescriptorsResponse < 3) {
326 unittest.expect(o.nextPageToken, unittest.equals('foo')); 459 unittest.expect(o.nextPageToken, unittest.equals('foo'));
327 checkUnnamed260(o.resourceDescriptors); 460 checkUnnamed257(o.resourceDescriptors);
328 } 461 }
329 buildCounterListMonitoredResourceDescriptorsResponse--; 462 buildCounterListMonitoredResourceDescriptorsResponse--;
330 } 463 }
331 464
332 buildUnnamed261() { 465 buildUnnamed258() {
333 var o = new core.List<api.LogSink>(); 466 var o = new core.List<api.LogSink>();
334 o.add(buildLogSink()); 467 o.add(buildLogSink());
335 o.add(buildLogSink()); 468 o.add(buildLogSink());
336 return o; 469 return o;
337 } 470 }
338 471
339 checkUnnamed261(core.List<api.LogSink> o) { 472 checkUnnamed258(core.List<api.LogSink> o) {
340 unittest.expect(o, unittest.hasLength(2)); 473 unittest.expect(o, unittest.hasLength(2));
341 checkLogSink(o[0]); 474 checkLogSink(o[0]);
342 checkLogSink(o[1]); 475 checkLogSink(o[1]);
343 } 476 }
344 477
345 core.int buildCounterListSinksResponse = 0; 478 core.int buildCounterListSinksResponse = 0;
346 buildListSinksResponse() { 479 buildListSinksResponse() {
347 var o = new api.ListSinksResponse(); 480 var o = new api.ListSinksResponse();
348 buildCounterListSinksResponse++; 481 buildCounterListSinksResponse++;
349 if (buildCounterListSinksResponse < 3) { 482 if (buildCounterListSinksResponse < 3) {
350 o.nextPageToken = "foo"; 483 o.nextPageToken = "foo";
351 o.sinks = buildUnnamed261(); 484 o.sinks = buildUnnamed258();
352 } 485 }
353 buildCounterListSinksResponse--; 486 buildCounterListSinksResponse--;
354 return o; 487 return o;
355 } 488 }
356 489
357 checkListSinksResponse(api.ListSinksResponse o) { 490 checkListSinksResponse(api.ListSinksResponse o) {
358 buildCounterListSinksResponse++; 491 buildCounterListSinksResponse++;
359 if (buildCounterListSinksResponse < 3) { 492 if (buildCounterListSinksResponse < 3) {
360 unittest.expect(o.nextPageToken, unittest.equals('foo')); 493 unittest.expect(o.nextPageToken, unittest.equals('foo'));
361 checkUnnamed261(o.sinks); 494 checkUnnamed258(o.sinks);
362 } 495 }
363 buildCounterListSinksResponse--; 496 buildCounterListSinksResponse--;
364 } 497 }
365 498
366 buildUnnamed262() { 499 buildUnnamed259() {
367 var o = new core.Map<core.String, core.Object>(); 500 var o = new core.Map<core.String, core.Object>();
368 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 501 o["x"] = {
369 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 502 'list': [1, 2, 3],
503 'bool': true,
504 'string': 'foo'
505 };
506 o["y"] = {
507 'list': [1, 2, 3],
508 'bool': true,
509 'string': 'foo'
510 };
370 return o; 511 return o;
371 } 512 }
372 513
373 checkUnnamed262(core.Map<core.String, core.Object> o) { 514 checkUnnamed259(core.Map<core.String, core.Object> o) {
374 unittest.expect(o, unittest.hasLength(2)); 515 unittest.expect(o, unittest.hasLength(2));
375 var casted1 = (o["x"]) as core.Map; unittest.expect(casted1, unittest.hasLengt h(3)); unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted1["bool"], unittest.equals(true)); unittest.expect(casted1["string"], unittest.equals('foo')); 516 var casted1 = (o["x"]) as core.Map;
376 var casted2 = (o["y"]) as core.Map; unittest.expect(casted2, unittest.hasLengt h(3)); unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted2["bool"], unittest.equals(true)); unittest.expect(casted2["string"], unittest.equals('foo')); 517 unittest.expect(casted1, unittest.hasLength(3));
518 unittest.expect(casted1["list"], unittest.equals([1, 2, 3]));
519 unittest.expect(casted1["bool"], unittest.equals(true));
520 unittest.expect(casted1["string"], unittest.equals('foo'));
521 var casted2 = (o["y"]) as core.Map;
522 unittest.expect(casted2, unittest.hasLength(3));
523 unittest.expect(casted2["list"], unittest.equals([1, 2, 3]));
524 unittest.expect(casted2["bool"], unittest.equals(true));
525 unittest.expect(casted2["string"], unittest.equals('foo'));
377 } 526 }
378 527
379 buildUnnamed263() { 528 buildUnnamed260() {
380 var o = new core.Map<core.String, core.String>(); 529 var o = new core.Map<core.String, core.String>();
381 o["x"] = "foo"; 530 o["x"] = "foo";
382 o["y"] = "foo"; 531 o["y"] = "foo";
383 return o; 532 return o;
384 } 533 }
385 534
386 checkUnnamed263(core.Map<core.String, core.String> o) { 535 checkUnnamed260(core.Map<core.String, core.String> o) {
387 unittest.expect(o, unittest.hasLength(2)); 536 unittest.expect(o, unittest.hasLength(2));
388 unittest.expect(o["x"], unittest.equals('foo')); 537 unittest.expect(o["x"], unittest.equals('foo'));
389 unittest.expect(o["y"], unittest.equals('foo')); 538 unittest.expect(o["y"], unittest.equals('foo'));
390 } 539 }
391 540
392 buildUnnamed264() { 541 buildUnnamed261() {
393 var o = new core.Map<core.String, core.Object>(); 542 var o = new core.Map<core.String, core.Object>();
394 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 543 o["x"] = {
395 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 544 'list': [1, 2, 3],
545 'bool': true,
546 'string': 'foo'
547 };
548 o["y"] = {
549 'list': [1, 2, 3],
550 'bool': true,
551 'string': 'foo'
552 };
396 return o; 553 return o;
397 } 554 }
398 555
399 checkUnnamed264(core.Map<core.String, core.Object> o) { 556 checkUnnamed261(core.Map<core.String, core.Object> o) {
400 unittest.expect(o, unittest.hasLength(2)); 557 unittest.expect(o, unittest.hasLength(2));
401 var casted3 = (o["x"]) as core.Map; unittest.expect(casted3, unittest.hasLengt h(3)); unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted3["bool"], unittest.equals(true)); unittest.expect(casted3["string"], unittest.equals('foo')); 558 var casted3 = (o["x"]) as core.Map;
402 var casted4 = (o["y"]) as core.Map; unittest.expect(casted4, unittest.hasLengt h(3)); unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); unittest.ex pect(casted4["bool"], unittest.equals(true)); unittest.expect(casted4["string"], unittest.equals('foo')); 559 unittest.expect(casted3, unittest.hasLength(3));
560 unittest.expect(casted3["list"], unittest.equals([1, 2, 3]));
561 unittest.expect(casted3["bool"], unittest.equals(true));
562 unittest.expect(casted3["string"], unittest.equals('foo'));
563 var casted4 = (o["y"]) as core.Map;
564 unittest.expect(casted4, unittest.hasLength(3));
565 unittest.expect(casted4["list"], unittest.equals([1, 2, 3]));
566 unittest.expect(casted4["bool"], unittest.equals(true));
567 unittest.expect(casted4["string"], unittest.equals('foo'));
403 } 568 }
404 569
405 core.int buildCounterLogEntry = 0; 570 core.int buildCounterLogEntry = 0;
406 buildLogEntry() { 571 buildLogEntry() {
407 var o = new api.LogEntry(); 572 var o = new api.LogEntry();
408 buildCounterLogEntry++; 573 buildCounterLogEntry++;
409 if (buildCounterLogEntry < 3) { 574 if (buildCounterLogEntry < 3) {
410 o.httpRequest = buildHttpRequest(); 575 o.httpRequest = buildHttpRequest();
411 o.insertId = "foo"; 576 o.insertId = "foo";
412 o.jsonPayload = buildUnnamed262(); 577 o.jsonPayload = buildUnnamed259();
413 o.labels = buildUnnamed263(); 578 o.labels = buildUnnamed260();
414 o.logName = "foo"; 579 o.logName = "foo";
415 o.operation = buildLogEntryOperation(); 580 o.operation = buildLogEntryOperation();
416 o.protoPayload = buildUnnamed264(); 581 o.protoPayload = buildUnnamed261();
417 o.receiveTimestamp = "foo"; 582 o.receiveTimestamp = "foo";
418 o.resource = buildMonitoredResource(); 583 o.resource = buildMonitoredResource();
419 o.severity = "foo"; 584 o.severity = "foo";
420 o.sourceLocation = buildLogEntrySourceLocation(); 585 o.sourceLocation = buildLogEntrySourceLocation();
421 o.textPayload = "foo"; 586 o.textPayload = "foo";
422 o.timestamp = "foo"; 587 o.timestamp = "foo";
423 o.trace = "foo"; 588 o.trace = "foo";
424 } 589 }
425 buildCounterLogEntry--; 590 buildCounterLogEntry--;
426 return o; 591 return o;
427 } 592 }
428 593
429 checkLogEntry(api.LogEntry o) { 594 checkLogEntry(api.LogEntry o) {
430 buildCounterLogEntry++; 595 buildCounterLogEntry++;
431 if (buildCounterLogEntry < 3) { 596 if (buildCounterLogEntry < 3) {
432 checkHttpRequest(o.httpRequest); 597 checkHttpRequest(o.httpRequest);
433 unittest.expect(o.insertId, unittest.equals('foo')); 598 unittest.expect(o.insertId, unittest.equals('foo'));
434 checkUnnamed262(o.jsonPayload); 599 checkUnnamed259(o.jsonPayload);
435 checkUnnamed263(o.labels); 600 checkUnnamed260(o.labels);
436 unittest.expect(o.logName, unittest.equals('foo')); 601 unittest.expect(o.logName, unittest.equals('foo'));
437 checkLogEntryOperation(o.operation); 602 checkLogEntryOperation(o.operation);
438 checkUnnamed264(o.protoPayload); 603 checkUnnamed261(o.protoPayload);
439 unittest.expect(o.receiveTimestamp, unittest.equals('foo')); 604 unittest.expect(o.receiveTimestamp, unittest.equals('foo'));
440 checkMonitoredResource(o.resource); 605 checkMonitoredResource(o.resource);
441 unittest.expect(o.severity, unittest.equals('foo')); 606 unittest.expect(o.severity, unittest.equals('foo'));
442 checkLogEntrySourceLocation(o.sourceLocation); 607 checkLogEntrySourceLocation(o.sourceLocation);
443 unittest.expect(o.textPayload, unittest.equals('foo')); 608 unittest.expect(o.textPayload, unittest.equals('foo'));
444 unittest.expect(o.timestamp, unittest.equals('foo')); 609 unittest.expect(o.timestamp, unittest.equals('foo'));
445 unittest.expect(o.trace, unittest.equals('foo')); 610 unittest.expect(o.trace, unittest.equals('foo'));
446 } 611 }
447 buildCounterLogEntry--; 612 buildCounterLogEntry--;
448 } 613 }
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 checkLogEntrySourceLocation(api.LogEntrySourceLocation o) { 653 checkLogEntrySourceLocation(api.LogEntrySourceLocation o) {
489 buildCounterLogEntrySourceLocation++; 654 buildCounterLogEntrySourceLocation++;
490 if (buildCounterLogEntrySourceLocation < 3) { 655 if (buildCounterLogEntrySourceLocation < 3) {
491 unittest.expect(o.file, unittest.equals('foo')); 656 unittest.expect(o.file, unittest.equals('foo'));
492 unittest.expect(o.function, unittest.equals('foo')); 657 unittest.expect(o.function, unittest.equals('foo'));
493 unittest.expect(o.line, unittest.equals('foo')); 658 unittest.expect(o.line, unittest.equals('foo'));
494 } 659 }
495 buildCounterLogEntrySourceLocation--; 660 buildCounterLogEntrySourceLocation--;
496 } 661 }
497 662
663 core.int buildCounterLogExclusion = 0;
664 buildLogExclusion() {
665 var o = new api.LogExclusion();
666 buildCounterLogExclusion++;
667 if (buildCounterLogExclusion < 3) {
668 o.description = "foo";
669 o.disabled = true;
670 o.filter = "foo";
671 o.name = "foo";
672 }
673 buildCounterLogExclusion--;
674 return o;
675 }
676
677 checkLogExclusion(api.LogExclusion o) {
678 buildCounterLogExclusion++;
679 if (buildCounterLogExclusion < 3) {
680 unittest.expect(o.description, unittest.equals('foo'));
681 unittest.expect(o.disabled, unittest.isTrue);
682 unittest.expect(o.filter, unittest.equals('foo'));
683 unittest.expect(o.name, unittest.equals('foo'));
684 }
685 buildCounterLogExclusion--;
686 }
687
498 core.int buildCounterLogLine = 0; 688 core.int buildCounterLogLine = 0;
499 buildLogLine() { 689 buildLogLine() {
500 var o = new api.LogLine(); 690 var o = new api.LogLine();
501 buildCounterLogLine++; 691 buildCounterLogLine++;
502 if (buildCounterLogLine < 3) { 692 if (buildCounterLogLine < 3) {
503 o.logMessage = "foo"; 693 o.logMessage = "foo";
504 o.severity = "foo"; 694 o.severity = "foo";
505 o.sourceLocation = buildSourceLocation(); 695 o.sourceLocation = buildSourceLocation();
506 o.time = "foo"; 696 o.time = "foo";
507 } 697 }
508 buildCounterLogLine--; 698 buildCounterLogLine--;
509 return o; 699 return o;
510 } 700 }
511 701
512 checkLogLine(api.LogLine o) { 702 checkLogLine(api.LogLine o) {
513 buildCounterLogLine++; 703 buildCounterLogLine++;
514 if (buildCounterLogLine < 3) { 704 if (buildCounterLogLine < 3) {
515 unittest.expect(o.logMessage, unittest.equals('foo')); 705 unittest.expect(o.logMessage, unittest.equals('foo'));
516 unittest.expect(o.severity, unittest.equals('foo')); 706 unittest.expect(o.severity, unittest.equals('foo'));
517 checkSourceLocation(o.sourceLocation); 707 checkSourceLocation(o.sourceLocation);
518 unittest.expect(o.time, unittest.equals('foo')); 708 unittest.expect(o.time, unittest.equals('foo'));
519 } 709 }
520 buildCounterLogLine--; 710 buildCounterLogLine--;
521 } 711 }
522 712
713 buildUnnamed262() {
714 var o = new core.Map<core.String, core.String>();
715 o["x"] = "foo";
716 o["y"] = "foo";
717 return o;
718 }
719
720 checkUnnamed262(core.Map<core.String, core.String> o) {
721 unittest.expect(o, unittest.hasLength(2));
722 unittest.expect(o["x"], unittest.equals('foo'));
723 unittest.expect(o["y"], unittest.equals('foo'));
724 }
725
523 core.int buildCounterLogMetric = 0; 726 core.int buildCounterLogMetric = 0;
524 buildLogMetric() { 727 buildLogMetric() {
525 var o = new api.LogMetric(); 728 var o = new api.LogMetric();
526 buildCounterLogMetric++; 729 buildCounterLogMetric++;
527 if (buildCounterLogMetric < 3) { 730 if (buildCounterLogMetric < 3) {
731 o.bucketOptions = buildBucketOptions();
528 o.description = "foo"; 732 o.description = "foo";
529 o.filter = "foo"; 733 o.filter = "foo";
734 o.labelExtractors = buildUnnamed262();
735 o.metricDescriptor = buildMetricDescriptor();
530 o.name = "foo"; 736 o.name = "foo";
737 o.valueExtractor = "foo";
531 o.version = "foo"; 738 o.version = "foo";
532 } 739 }
533 buildCounterLogMetric--; 740 buildCounterLogMetric--;
534 return o; 741 return o;
535 } 742 }
536 743
537 checkLogMetric(api.LogMetric o) { 744 checkLogMetric(api.LogMetric o) {
538 buildCounterLogMetric++; 745 buildCounterLogMetric++;
539 if (buildCounterLogMetric < 3) { 746 if (buildCounterLogMetric < 3) {
747 checkBucketOptions(o.bucketOptions);
540 unittest.expect(o.description, unittest.equals('foo')); 748 unittest.expect(o.description, unittest.equals('foo'));
541 unittest.expect(o.filter, unittest.equals('foo')); 749 unittest.expect(o.filter, unittest.equals('foo'));
750 checkUnnamed262(o.labelExtractors);
751 checkMetricDescriptor(o.metricDescriptor);
542 unittest.expect(o.name, unittest.equals('foo')); 752 unittest.expect(o.name, unittest.equals('foo'));
753 unittest.expect(o.valueExtractor, unittest.equals('foo'));
543 unittest.expect(o.version, unittest.equals('foo')); 754 unittest.expect(o.version, unittest.equals('foo'));
544 } 755 }
545 buildCounterLogMetric--; 756 buildCounterLogMetric--;
546 } 757 }
547 758
548 core.int buildCounterLogSink = 0; 759 core.int buildCounterLogSink = 0;
549 buildLogSink() { 760 buildLogSink() {
550 var o = new api.LogSink(); 761 var o = new api.LogSink();
551 buildCounterLogSink++; 762 buildCounterLogSink++;
552 if (buildCounterLogSink < 3) { 763 if (buildCounterLogSink < 3) {
(...skipping 18 matching lines...) Expand all
571 unittest.expect(o.filter, unittest.equals('foo')); 782 unittest.expect(o.filter, unittest.equals('foo'));
572 unittest.expect(o.includeChildren, unittest.isTrue); 783 unittest.expect(o.includeChildren, unittest.isTrue);
573 unittest.expect(o.name, unittest.equals('foo')); 784 unittest.expect(o.name, unittest.equals('foo'));
574 unittest.expect(o.outputVersionFormat, unittest.equals('foo')); 785 unittest.expect(o.outputVersionFormat, unittest.equals('foo'));
575 unittest.expect(o.startTime, unittest.equals('foo')); 786 unittest.expect(o.startTime, unittest.equals('foo'));
576 unittest.expect(o.writerIdentity, unittest.equals('foo')); 787 unittest.expect(o.writerIdentity, unittest.equals('foo'));
577 } 788 }
578 buildCounterLogSink--; 789 buildCounterLogSink--;
579 } 790 }
580 791
581 buildUnnamed265() { 792 buildUnnamed263() {
793 var o = new core.List<api.LabelDescriptor>();
794 o.add(buildLabelDescriptor());
795 o.add(buildLabelDescriptor());
796 return o;
797 }
798
799 checkUnnamed263(core.List<api.LabelDescriptor> o) {
800 unittest.expect(o, unittest.hasLength(2));
801 checkLabelDescriptor(o[0]);
802 checkLabelDescriptor(o[1]);
803 }
804
805 core.int buildCounterMetricDescriptor = 0;
806 buildMetricDescriptor() {
807 var o = new api.MetricDescriptor();
808 buildCounterMetricDescriptor++;
809 if (buildCounterMetricDescriptor < 3) {
810 o.description = "foo";
811 o.displayName = "foo";
812 o.labels = buildUnnamed263();
813 o.metricKind = "foo";
814 o.name = "foo";
815 o.type = "foo";
816 o.unit = "foo";
817 o.valueType = "foo";
818 }
819 buildCounterMetricDescriptor--;
820 return o;
821 }
822
823 checkMetricDescriptor(api.MetricDescriptor o) {
824 buildCounterMetricDescriptor++;
825 if (buildCounterMetricDescriptor < 3) {
826 unittest.expect(o.description, unittest.equals('foo'));
827 unittest.expect(o.displayName, unittest.equals('foo'));
828 checkUnnamed263(o.labels);
829 unittest.expect(o.metricKind, unittest.equals('foo'));
830 unittest.expect(o.name, unittest.equals('foo'));
831 unittest.expect(o.type, unittest.equals('foo'));
832 unittest.expect(o.unit, unittest.equals('foo'));
833 unittest.expect(o.valueType, unittest.equals('foo'));
834 }
835 buildCounterMetricDescriptor--;
836 }
837
838 buildUnnamed264() {
582 var o = new core.Map<core.String, core.String>(); 839 var o = new core.Map<core.String, core.String>();
583 o["x"] = "foo"; 840 o["x"] = "foo";
584 o["y"] = "foo"; 841 o["y"] = "foo";
585 return o; 842 return o;
586 } 843 }
587 844
588 checkUnnamed265(core.Map<core.String, core.String> o) { 845 checkUnnamed264(core.Map<core.String, core.String> o) {
589 unittest.expect(o, unittest.hasLength(2)); 846 unittest.expect(o, unittest.hasLength(2));
590 unittest.expect(o["x"], unittest.equals('foo')); 847 unittest.expect(o["x"], unittest.equals('foo'));
591 unittest.expect(o["y"], unittest.equals('foo')); 848 unittest.expect(o["y"], unittest.equals('foo'));
592 } 849 }
593 850
594 core.int buildCounterMonitoredResource = 0; 851 core.int buildCounterMonitoredResource = 0;
595 buildMonitoredResource() { 852 buildMonitoredResource() {
596 var o = new api.MonitoredResource(); 853 var o = new api.MonitoredResource();
597 buildCounterMonitoredResource++; 854 buildCounterMonitoredResource++;
598 if (buildCounterMonitoredResource < 3) { 855 if (buildCounterMonitoredResource < 3) {
599 o.labels = buildUnnamed265(); 856 o.labels = buildUnnamed264();
600 o.type = "foo"; 857 o.type = "foo";
601 } 858 }
602 buildCounterMonitoredResource--; 859 buildCounterMonitoredResource--;
603 return o; 860 return o;
604 } 861 }
605 862
606 checkMonitoredResource(api.MonitoredResource o) { 863 checkMonitoredResource(api.MonitoredResource o) {
607 buildCounterMonitoredResource++; 864 buildCounterMonitoredResource++;
608 if (buildCounterMonitoredResource < 3) { 865 if (buildCounterMonitoredResource < 3) {
609 checkUnnamed265(o.labels); 866 checkUnnamed264(o.labels);
610 unittest.expect(o.type, unittest.equals('foo')); 867 unittest.expect(o.type, unittest.equals('foo'));
611 } 868 }
612 buildCounterMonitoredResource--; 869 buildCounterMonitoredResource--;
613 } 870 }
614 871
615 buildUnnamed266() { 872 buildUnnamed265() {
616 var o = new core.List<api.LabelDescriptor>(); 873 var o = new core.List<api.LabelDescriptor>();
617 o.add(buildLabelDescriptor()); 874 o.add(buildLabelDescriptor());
618 o.add(buildLabelDescriptor()); 875 o.add(buildLabelDescriptor());
619 return o; 876 return o;
620 } 877 }
621 878
622 checkUnnamed266(core.List<api.LabelDescriptor> o) { 879 checkUnnamed265(core.List<api.LabelDescriptor> o) {
623 unittest.expect(o, unittest.hasLength(2)); 880 unittest.expect(o, unittest.hasLength(2));
624 checkLabelDescriptor(o[0]); 881 checkLabelDescriptor(o[0]);
625 checkLabelDescriptor(o[1]); 882 checkLabelDescriptor(o[1]);
626 } 883 }
627 884
628 core.int buildCounterMonitoredResourceDescriptor = 0; 885 core.int buildCounterMonitoredResourceDescriptor = 0;
629 buildMonitoredResourceDescriptor() { 886 buildMonitoredResourceDescriptor() {
630 var o = new api.MonitoredResourceDescriptor(); 887 var o = new api.MonitoredResourceDescriptor();
631 buildCounterMonitoredResourceDescriptor++; 888 buildCounterMonitoredResourceDescriptor++;
632 if (buildCounterMonitoredResourceDescriptor < 3) { 889 if (buildCounterMonitoredResourceDescriptor < 3) {
633 o.description = "foo"; 890 o.description = "foo";
634 o.displayName = "foo"; 891 o.displayName = "foo";
635 o.labels = buildUnnamed266(); 892 o.labels = buildUnnamed265();
636 o.name = "foo"; 893 o.name = "foo";
637 o.type = "foo"; 894 o.type = "foo";
638 } 895 }
639 buildCounterMonitoredResourceDescriptor--; 896 buildCounterMonitoredResourceDescriptor--;
640 return o; 897 return o;
641 } 898 }
642 899
643 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { 900 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) {
644 buildCounterMonitoredResourceDescriptor++; 901 buildCounterMonitoredResourceDescriptor++;
645 if (buildCounterMonitoredResourceDescriptor < 3) { 902 if (buildCounterMonitoredResourceDescriptor < 3) {
646 unittest.expect(o.description, unittest.equals('foo')); 903 unittest.expect(o.description, unittest.equals('foo'));
647 unittest.expect(o.displayName, unittest.equals('foo')); 904 unittest.expect(o.displayName, unittest.equals('foo'));
648 checkUnnamed266(o.labels); 905 checkUnnamed265(o.labels);
649 unittest.expect(o.name, unittest.equals('foo')); 906 unittest.expect(o.name, unittest.equals('foo'));
650 unittest.expect(o.type, unittest.equals('foo')); 907 unittest.expect(o.type, unittest.equals('foo'));
651 } 908 }
652 buildCounterMonitoredResourceDescriptor--; 909 buildCounterMonitoredResourceDescriptor--;
653 } 910 }
654 911
655 buildUnnamed267() { 912 buildUnnamed266() {
656 var o = new core.List<api.LogLine>(); 913 var o = new core.List<api.LogLine>();
657 o.add(buildLogLine()); 914 o.add(buildLogLine());
658 o.add(buildLogLine()); 915 o.add(buildLogLine());
659 return o; 916 return o;
660 } 917 }
661 918
662 checkUnnamed267(core.List<api.LogLine> o) { 919 checkUnnamed266(core.List<api.LogLine> o) {
663 unittest.expect(o, unittest.hasLength(2)); 920 unittest.expect(o, unittest.hasLength(2));
664 checkLogLine(o[0]); 921 checkLogLine(o[0]);
665 checkLogLine(o[1]); 922 checkLogLine(o[1]);
666 } 923 }
667 924
668 buildUnnamed268() { 925 buildUnnamed267() {
669 var o = new core.List<api.SourceReference>(); 926 var o = new core.List<api.SourceReference>();
670 o.add(buildSourceReference()); 927 o.add(buildSourceReference());
671 o.add(buildSourceReference()); 928 o.add(buildSourceReference());
672 return o; 929 return o;
673 } 930 }
674 931
675 checkUnnamed268(core.List<api.SourceReference> o) { 932 checkUnnamed267(core.List<api.SourceReference> o) {
676 unittest.expect(o, unittest.hasLength(2)); 933 unittest.expect(o, unittest.hasLength(2));
677 checkSourceReference(o[0]); 934 checkSourceReference(o[0]);
678 checkSourceReference(o[1]); 935 checkSourceReference(o[1]);
679 } 936 }
680 937
681 core.int buildCounterRequestLog = 0; 938 core.int buildCounterRequestLog = 0;
682 buildRequestLog() { 939 buildRequestLog() {
683 var o = new api.RequestLog(); 940 var o = new api.RequestLog();
684 buildCounterRequestLog++; 941 buildCounterRequestLog++;
685 if (buildCounterRequestLog < 3) { 942 if (buildCounterRequestLog < 3) {
686 o.appEngineRelease = "foo"; 943 o.appEngineRelease = "foo";
687 o.appId = "foo"; 944 o.appId = "foo";
688 o.cost = 42.0; 945 o.cost = 42.0;
689 o.endTime = "foo"; 946 o.endTime = "foo";
690 o.finished = true; 947 o.finished = true;
691 o.first = true; 948 o.first = true;
692 o.host = "foo"; 949 o.host = "foo";
693 o.httpVersion = "foo"; 950 o.httpVersion = "foo";
694 o.instanceId = "foo"; 951 o.instanceId = "foo";
695 o.instanceIndex = 42; 952 o.instanceIndex = 42;
696 o.ip = "foo"; 953 o.ip = "foo";
697 o.latency = "foo"; 954 o.latency = "foo";
698 o.line = buildUnnamed267(); 955 o.line = buildUnnamed266();
699 o.megaCycles = "foo"; 956 o.megaCycles = "foo";
700 o.method = "foo"; 957 o.method = "foo";
701 o.moduleId = "foo"; 958 o.moduleId = "foo";
702 o.nickname = "foo"; 959 o.nickname = "foo";
703 o.pendingTime = "foo"; 960 o.pendingTime = "foo";
704 o.referrer = "foo"; 961 o.referrer = "foo";
705 o.requestId = "foo"; 962 o.requestId = "foo";
706 o.resource = "foo"; 963 o.resource = "foo";
707 o.responseSize = "foo"; 964 o.responseSize = "foo";
708 o.sourceReference = buildUnnamed268(); 965 o.sourceReference = buildUnnamed267();
709 o.startTime = "foo"; 966 o.startTime = "foo";
710 o.status = 42; 967 o.status = 42;
711 o.taskName = "foo"; 968 o.taskName = "foo";
712 o.taskQueueName = "foo"; 969 o.taskQueueName = "foo";
713 o.traceId = "foo"; 970 o.traceId = "foo";
714 o.urlMapEntry = "foo"; 971 o.urlMapEntry = "foo";
715 o.userAgent = "foo"; 972 o.userAgent = "foo";
716 o.versionId = "foo"; 973 o.versionId = "foo";
717 o.wasLoadingRequest = true; 974 o.wasLoadingRequest = true;
718 } 975 }
719 buildCounterRequestLog--; 976 buildCounterRequestLog--;
720 return o; 977 return o;
721 } 978 }
722 979
723 checkRequestLog(api.RequestLog o) { 980 checkRequestLog(api.RequestLog o) {
724 buildCounterRequestLog++; 981 buildCounterRequestLog++;
725 if (buildCounterRequestLog < 3) { 982 if (buildCounterRequestLog < 3) {
726 unittest.expect(o.appEngineRelease, unittest.equals('foo')); 983 unittest.expect(o.appEngineRelease, unittest.equals('foo'));
727 unittest.expect(o.appId, unittest.equals('foo')); 984 unittest.expect(o.appId, unittest.equals('foo'));
728 unittest.expect(o.cost, unittest.equals(42.0)); 985 unittest.expect(o.cost, unittest.equals(42.0));
729 unittest.expect(o.endTime, unittest.equals('foo')); 986 unittest.expect(o.endTime, unittest.equals('foo'));
730 unittest.expect(o.finished, unittest.isTrue); 987 unittest.expect(o.finished, unittest.isTrue);
731 unittest.expect(o.first, unittest.isTrue); 988 unittest.expect(o.first, unittest.isTrue);
732 unittest.expect(o.host, unittest.equals('foo')); 989 unittest.expect(o.host, unittest.equals('foo'));
733 unittest.expect(o.httpVersion, unittest.equals('foo')); 990 unittest.expect(o.httpVersion, unittest.equals('foo'));
734 unittest.expect(o.instanceId, unittest.equals('foo')); 991 unittest.expect(o.instanceId, unittest.equals('foo'));
735 unittest.expect(o.instanceIndex, unittest.equals(42)); 992 unittest.expect(o.instanceIndex, unittest.equals(42));
736 unittest.expect(o.ip, unittest.equals('foo')); 993 unittest.expect(o.ip, unittest.equals('foo'));
737 unittest.expect(o.latency, unittest.equals('foo')); 994 unittest.expect(o.latency, unittest.equals('foo'));
738 checkUnnamed267(o.line); 995 checkUnnamed266(o.line);
739 unittest.expect(o.megaCycles, unittest.equals('foo')); 996 unittest.expect(o.megaCycles, unittest.equals('foo'));
740 unittest.expect(o.method, unittest.equals('foo')); 997 unittest.expect(o.method, unittest.equals('foo'));
741 unittest.expect(o.moduleId, unittest.equals('foo')); 998 unittest.expect(o.moduleId, unittest.equals('foo'));
742 unittest.expect(o.nickname, unittest.equals('foo')); 999 unittest.expect(o.nickname, unittest.equals('foo'));
743 unittest.expect(o.pendingTime, unittest.equals('foo')); 1000 unittest.expect(o.pendingTime, unittest.equals('foo'));
744 unittest.expect(o.referrer, unittest.equals('foo')); 1001 unittest.expect(o.referrer, unittest.equals('foo'));
745 unittest.expect(o.requestId, unittest.equals('foo')); 1002 unittest.expect(o.requestId, unittest.equals('foo'));
746 unittest.expect(o.resource, unittest.equals('foo')); 1003 unittest.expect(o.resource, unittest.equals('foo'));
747 unittest.expect(o.responseSize, unittest.equals('foo')); 1004 unittest.expect(o.responseSize, unittest.equals('foo'));
748 checkUnnamed268(o.sourceReference); 1005 checkUnnamed267(o.sourceReference);
749 unittest.expect(o.startTime, unittest.equals('foo')); 1006 unittest.expect(o.startTime, unittest.equals('foo'));
750 unittest.expect(o.status, unittest.equals(42)); 1007 unittest.expect(o.status, unittest.equals(42));
751 unittest.expect(o.taskName, unittest.equals('foo')); 1008 unittest.expect(o.taskName, unittest.equals('foo'));
752 unittest.expect(o.taskQueueName, unittest.equals('foo')); 1009 unittest.expect(o.taskQueueName, unittest.equals('foo'));
753 unittest.expect(o.traceId, unittest.equals('foo')); 1010 unittest.expect(o.traceId, unittest.equals('foo'));
754 unittest.expect(o.urlMapEntry, unittest.equals('foo')); 1011 unittest.expect(o.urlMapEntry, unittest.equals('foo'));
755 unittest.expect(o.userAgent, unittest.equals('foo')); 1012 unittest.expect(o.userAgent, unittest.equals('foo'));
756 unittest.expect(o.versionId, unittest.equals('foo')); 1013 unittest.expect(o.versionId, unittest.equals('foo'));
757 unittest.expect(o.wasLoadingRequest, unittest.isTrue); 1014 unittest.expect(o.wasLoadingRequest, unittest.isTrue);
758 } 1015 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 1053
797 checkSourceReference(api.SourceReference o) { 1054 checkSourceReference(api.SourceReference o) {
798 buildCounterSourceReference++; 1055 buildCounterSourceReference++;
799 if (buildCounterSourceReference < 3) { 1056 if (buildCounterSourceReference < 3) {
800 unittest.expect(o.repository, unittest.equals('foo')); 1057 unittest.expect(o.repository, unittest.equals('foo'));
801 unittest.expect(o.revisionId, unittest.equals('foo')); 1058 unittest.expect(o.revisionId, unittest.equals('foo'));
802 } 1059 }
803 buildCounterSourceReference--; 1060 buildCounterSourceReference--;
804 } 1061 }
805 1062
806 buildUnnamed269() { 1063 buildUnnamed268() {
807 var o = new core.List<api.LogEntry>(); 1064 var o = new core.List<api.LogEntry>();
808 o.add(buildLogEntry()); 1065 o.add(buildLogEntry());
809 o.add(buildLogEntry()); 1066 o.add(buildLogEntry());
810 return o; 1067 return o;
811 } 1068 }
812 1069
813 checkUnnamed269(core.List<api.LogEntry> o) { 1070 checkUnnamed268(core.List<api.LogEntry> o) {
814 unittest.expect(o, unittest.hasLength(2)); 1071 unittest.expect(o, unittest.hasLength(2));
815 checkLogEntry(o[0]); 1072 checkLogEntry(o[0]);
816 checkLogEntry(o[1]); 1073 checkLogEntry(o[1]);
817 } 1074 }
818 1075
819 buildUnnamed270() { 1076 buildUnnamed269() {
820 var o = new core.Map<core.String, core.String>(); 1077 var o = new core.Map<core.String, core.String>();
821 o["x"] = "foo"; 1078 o["x"] = "foo";
822 o["y"] = "foo"; 1079 o["y"] = "foo";
823 return o; 1080 return o;
824 } 1081 }
825 1082
826 checkUnnamed270(core.Map<core.String, core.String> o) { 1083 checkUnnamed269(core.Map<core.String, core.String> o) {
827 unittest.expect(o, unittest.hasLength(2)); 1084 unittest.expect(o, unittest.hasLength(2));
828 unittest.expect(o["x"], unittest.equals('foo')); 1085 unittest.expect(o["x"], unittest.equals('foo'));
829 unittest.expect(o["y"], unittest.equals('foo')); 1086 unittest.expect(o["y"], unittest.equals('foo'));
830 } 1087 }
831 1088
832 core.int buildCounterWriteLogEntriesRequest = 0; 1089 core.int buildCounterWriteLogEntriesRequest = 0;
833 buildWriteLogEntriesRequest() { 1090 buildWriteLogEntriesRequest() {
834 var o = new api.WriteLogEntriesRequest(); 1091 var o = new api.WriteLogEntriesRequest();
835 buildCounterWriteLogEntriesRequest++; 1092 buildCounterWriteLogEntriesRequest++;
836 if (buildCounterWriteLogEntriesRequest < 3) { 1093 if (buildCounterWriteLogEntriesRequest < 3) {
837 o.entries = buildUnnamed269(); 1094 o.entries = buildUnnamed268();
838 o.labels = buildUnnamed270(); 1095 o.labels = buildUnnamed269();
839 o.logName = "foo"; 1096 o.logName = "foo";
840 o.partialSuccess = true; 1097 o.partialSuccess = true;
841 o.resource = buildMonitoredResource(); 1098 o.resource = buildMonitoredResource();
842 } 1099 }
843 buildCounterWriteLogEntriesRequest--; 1100 buildCounterWriteLogEntriesRequest--;
844 return o; 1101 return o;
845 } 1102 }
846 1103
847 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) { 1104 checkWriteLogEntriesRequest(api.WriteLogEntriesRequest o) {
848 buildCounterWriteLogEntriesRequest++; 1105 buildCounterWriteLogEntriesRequest++;
849 if (buildCounterWriteLogEntriesRequest < 3) { 1106 if (buildCounterWriteLogEntriesRequest < 3) {
850 checkUnnamed269(o.entries); 1107 checkUnnamed268(o.entries);
851 checkUnnamed270(o.labels); 1108 checkUnnamed269(o.labels);
852 unittest.expect(o.logName, unittest.equals('foo')); 1109 unittest.expect(o.logName, unittest.equals('foo'));
853 unittest.expect(o.partialSuccess, unittest.isTrue); 1110 unittest.expect(o.partialSuccess, unittest.isTrue);
854 checkMonitoredResource(o.resource); 1111 checkMonitoredResource(o.resource);
855 } 1112 }
856 buildCounterWriteLogEntriesRequest--; 1113 buildCounterWriteLogEntriesRequest--;
857 } 1114 }
858 1115
859 core.int buildCounterWriteLogEntriesResponse = 0; 1116 core.int buildCounterWriteLogEntriesResponse = 0;
860 buildWriteLogEntriesResponse() { 1117 buildWriteLogEntriesResponse() {
861 var o = new api.WriteLogEntriesResponse(); 1118 var o = new api.WriteLogEntriesResponse();
862 buildCounterWriteLogEntriesResponse++; 1119 buildCounterWriteLogEntriesResponse++;
863 if (buildCounterWriteLogEntriesResponse < 3) { 1120 if (buildCounterWriteLogEntriesResponse < 3) {}
864 }
865 buildCounterWriteLogEntriesResponse--; 1121 buildCounterWriteLogEntriesResponse--;
866 return o; 1122 return o;
867 } 1123 }
868 1124
869 checkWriteLogEntriesResponse(api.WriteLogEntriesResponse o) { 1125 checkWriteLogEntriesResponse(api.WriteLogEntriesResponse o) {
870 buildCounterWriteLogEntriesResponse++; 1126 buildCounterWriteLogEntriesResponse++;
871 if (buildCounterWriteLogEntriesResponse < 3) { 1127 if (buildCounterWriteLogEntriesResponse < 3) {}
872 }
873 buildCounterWriteLogEntriesResponse--; 1128 buildCounterWriteLogEntriesResponse--;
874 } 1129 }
875 1130
1131 main() {
1132 unittest.group("obj-schema-BucketOptions", () {
1133 unittest.test("to-json--from-json", () {
1134 var o = buildBucketOptions();
1135 var od = new api.BucketOptions.fromJson(o.toJson());
1136 checkBucketOptions(od);
1137 });
1138 });
876 1139
877 main() {
878 unittest.group("obj-schema-Empty", () { 1140 unittest.group("obj-schema-Empty", () {
879 unittest.test("to-json--from-json", () { 1141 unittest.test("to-json--from-json", () {
880 var o = buildEmpty(); 1142 var o = buildEmpty();
881 var od = new api.Empty.fromJson(o.toJson()); 1143 var od = new api.Empty.fromJson(o.toJson());
882 checkEmpty(od); 1144 checkEmpty(od);
883 }); 1145 });
884 }); 1146 });
885 1147
1148 unittest.group("obj-schema-Explicit", () {
1149 unittest.test("to-json--from-json", () {
1150 var o = buildExplicit();
1151 var od = new api.Explicit.fromJson(o.toJson());
1152 checkExplicit(od);
1153 });
1154 });
1155
1156 unittest.group("obj-schema-Exponential", () {
1157 unittest.test("to-json--from-json", () {
1158 var o = buildExponential();
1159 var od = new api.Exponential.fromJson(o.toJson());
1160 checkExponential(od);
1161 });
1162 });
886 1163
887 unittest.group("obj-schema-HttpRequest", () { 1164 unittest.group("obj-schema-HttpRequest", () {
888 unittest.test("to-json--from-json", () { 1165 unittest.test("to-json--from-json", () {
889 var o = buildHttpRequest(); 1166 var o = buildHttpRequest();
890 var od = new api.HttpRequest.fromJson(o.toJson()); 1167 var od = new api.HttpRequest.fromJson(o.toJson());
891 checkHttpRequest(od); 1168 checkHttpRequest(od);
892 }); 1169 });
893 }); 1170 });
894 1171
895
896 unittest.group("obj-schema-LabelDescriptor", () { 1172 unittest.group("obj-schema-LabelDescriptor", () {
897 unittest.test("to-json--from-json", () { 1173 unittest.test("to-json--from-json", () {
898 var o = buildLabelDescriptor(); 1174 var o = buildLabelDescriptor();
899 var od = new api.LabelDescriptor.fromJson(o.toJson()); 1175 var od = new api.LabelDescriptor.fromJson(o.toJson());
900 checkLabelDescriptor(od); 1176 checkLabelDescriptor(od);
901 }); 1177 });
902 }); 1178 });
903 1179
1180 unittest.group("obj-schema-Linear", () {
1181 unittest.test("to-json--from-json", () {
1182 var o = buildLinear();
1183 var od = new api.Linear.fromJson(o.toJson());
1184 checkLinear(od);
1185 });
1186 });
1187
1188 unittest.group("obj-schema-ListExclusionsResponse", () {
1189 unittest.test("to-json--from-json", () {
1190 var o = buildListExclusionsResponse();
1191 var od = new api.ListExclusionsResponse.fromJson(o.toJson());
1192 checkListExclusionsResponse(od);
1193 });
1194 });
904 1195
905 unittest.group("obj-schema-ListLogEntriesRequest", () { 1196 unittest.group("obj-schema-ListLogEntriesRequest", () {
906 unittest.test("to-json--from-json", () { 1197 unittest.test("to-json--from-json", () {
907 var o = buildListLogEntriesRequest(); 1198 var o = buildListLogEntriesRequest();
908 var od = new api.ListLogEntriesRequest.fromJson(o.toJson()); 1199 var od = new api.ListLogEntriesRequest.fromJson(o.toJson());
909 checkListLogEntriesRequest(od); 1200 checkListLogEntriesRequest(od);
910 }); 1201 });
911 }); 1202 });
912 1203
913
914 unittest.group("obj-schema-ListLogEntriesResponse", () { 1204 unittest.group("obj-schema-ListLogEntriesResponse", () {
915 unittest.test("to-json--from-json", () { 1205 unittest.test("to-json--from-json", () {
916 var o = buildListLogEntriesResponse(); 1206 var o = buildListLogEntriesResponse();
917 var od = new api.ListLogEntriesResponse.fromJson(o.toJson()); 1207 var od = new api.ListLogEntriesResponse.fromJson(o.toJson());
918 checkListLogEntriesResponse(od); 1208 checkListLogEntriesResponse(od);
919 }); 1209 });
920 }); 1210 });
921 1211
922
923 unittest.group("obj-schema-ListLogMetricsResponse", () { 1212 unittest.group("obj-schema-ListLogMetricsResponse", () {
924 unittest.test("to-json--from-json", () { 1213 unittest.test("to-json--from-json", () {
925 var o = buildListLogMetricsResponse(); 1214 var o = buildListLogMetricsResponse();
926 var od = new api.ListLogMetricsResponse.fromJson(o.toJson()); 1215 var od = new api.ListLogMetricsResponse.fromJson(o.toJson());
927 checkListLogMetricsResponse(od); 1216 checkListLogMetricsResponse(od);
928 }); 1217 });
929 }); 1218 });
930 1219
931
932 unittest.group("obj-schema-ListLogsResponse", () { 1220 unittest.group("obj-schema-ListLogsResponse", () {
933 unittest.test("to-json--from-json", () { 1221 unittest.test("to-json--from-json", () {
934 var o = buildListLogsResponse(); 1222 var o = buildListLogsResponse();
935 var od = new api.ListLogsResponse.fromJson(o.toJson()); 1223 var od = new api.ListLogsResponse.fromJson(o.toJson());
936 checkListLogsResponse(od); 1224 checkListLogsResponse(od);
937 }); 1225 });
938 }); 1226 });
939 1227
940
941 unittest.group("obj-schema-ListMonitoredResourceDescriptorsResponse", () { 1228 unittest.group("obj-schema-ListMonitoredResourceDescriptorsResponse", () {
942 unittest.test("to-json--from-json", () { 1229 unittest.test("to-json--from-json", () {
943 var o = buildListMonitoredResourceDescriptorsResponse(); 1230 var o = buildListMonitoredResourceDescriptorsResponse();
944 var od = new api.ListMonitoredResourceDescriptorsResponse.fromJson(o.toJso n()); 1231 var od =
1232 new api.ListMonitoredResourceDescriptorsResponse.fromJson(o.toJson());
945 checkListMonitoredResourceDescriptorsResponse(od); 1233 checkListMonitoredResourceDescriptorsResponse(od);
946 }); 1234 });
947 }); 1235 });
948 1236
949
950 unittest.group("obj-schema-ListSinksResponse", () { 1237 unittest.group("obj-schema-ListSinksResponse", () {
951 unittest.test("to-json--from-json", () { 1238 unittest.test("to-json--from-json", () {
952 var o = buildListSinksResponse(); 1239 var o = buildListSinksResponse();
953 var od = new api.ListSinksResponse.fromJson(o.toJson()); 1240 var od = new api.ListSinksResponse.fromJson(o.toJson());
954 checkListSinksResponse(od); 1241 checkListSinksResponse(od);
955 }); 1242 });
956 }); 1243 });
957 1244
958
959 unittest.group("obj-schema-LogEntry", () { 1245 unittest.group("obj-schema-LogEntry", () {
960 unittest.test("to-json--from-json", () { 1246 unittest.test("to-json--from-json", () {
961 var o = buildLogEntry(); 1247 var o = buildLogEntry();
962 var od = new api.LogEntry.fromJson(o.toJson()); 1248 var od = new api.LogEntry.fromJson(o.toJson());
963 checkLogEntry(od); 1249 checkLogEntry(od);
964 }); 1250 });
965 }); 1251 });
966 1252
967
968 unittest.group("obj-schema-LogEntryOperation", () { 1253 unittest.group("obj-schema-LogEntryOperation", () {
969 unittest.test("to-json--from-json", () { 1254 unittest.test("to-json--from-json", () {
970 var o = buildLogEntryOperation(); 1255 var o = buildLogEntryOperation();
971 var od = new api.LogEntryOperation.fromJson(o.toJson()); 1256 var od = new api.LogEntryOperation.fromJson(o.toJson());
972 checkLogEntryOperation(od); 1257 checkLogEntryOperation(od);
973 }); 1258 });
974 }); 1259 });
975 1260
976
977 unittest.group("obj-schema-LogEntrySourceLocation", () { 1261 unittest.group("obj-schema-LogEntrySourceLocation", () {
978 unittest.test("to-json--from-json", () { 1262 unittest.test("to-json--from-json", () {
979 var o = buildLogEntrySourceLocation(); 1263 var o = buildLogEntrySourceLocation();
980 var od = new api.LogEntrySourceLocation.fromJson(o.toJson()); 1264 var od = new api.LogEntrySourceLocation.fromJson(o.toJson());
981 checkLogEntrySourceLocation(od); 1265 checkLogEntrySourceLocation(od);
982 }); 1266 });
983 }); 1267 });
984 1268
1269 unittest.group("obj-schema-LogExclusion", () {
1270 unittest.test("to-json--from-json", () {
1271 var o = buildLogExclusion();
1272 var od = new api.LogExclusion.fromJson(o.toJson());
1273 checkLogExclusion(od);
1274 });
1275 });
985 1276
986 unittest.group("obj-schema-LogLine", () { 1277 unittest.group("obj-schema-LogLine", () {
987 unittest.test("to-json--from-json", () { 1278 unittest.test("to-json--from-json", () {
988 var o = buildLogLine(); 1279 var o = buildLogLine();
989 var od = new api.LogLine.fromJson(o.toJson()); 1280 var od = new api.LogLine.fromJson(o.toJson());
990 checkLogLine(od); 1281 checkLogLine(od);
991 }); 1282 });
992 }); 1283 });
993 1284
994
995 unittest.group("obj-schema-LogMetric", () { 1285 unittest.group("obj-schema-LogMetric", () {
996 unittest.test("to-json--from-json", () { 1286 unittest.test("to-json--from-json", () {
997 var o = buildLogMetric(); 1287 var o = buildLogMetric();
998 var od = new api.LogMetric.fromJson(o.toJson()); 1288 var od = new api.LogMetric.fromJson(o.toJson());
999 checkLogMetric(od); 1289 checkLogMetric(od);
1000 }); 1290 });
1001 }); 1291 });
1002 1292
1003
1004 unittest.group("obj-schema-LogSink", () { 1293 unittest.group("obj-schema-LogSink", () {
1005 unittest.test("to-json--from-json", () { 1294 unittest.test("to-json--from-json", () {
1006 var o = buildLogSink(); 1295 var o = buildLogSink();
1007 var od = new api.LogSink.fromJson(o.toJson()); 1296 var od = new api.LogSink.fromJson(o.toJson());
1008 checkLogSink(od); 1297 checkLogSink(od);
1009 }); 1298 });
1010 }); 1299 });
1011 1300
1301 unittest.group("obj-schema-MetricDescriptor", () {
1302 unittest.test("to-json--from-json", () {
1303 var o = buildMetricDescriptor();
1304 var od = new api.MetricDescriptor.fromJson(o.toJson());
1305 checkMetricDescriptor(od);
1306 });
1307 });
1012 1308
1013 unittest.group("obj-schema-MonitoredResource", () { 1309 unittest.group("obj-schema-MonitoredResource", () {
1014 unittest.test("to-json--from-json", () { 1310 unittest.test("to-json--from-json", () {
1015 var o = buildMonitoredResource(); 1311 var o = buildMonitoredResource();
1016 var od = new api.MonitoredResource.fromJson(o.toJson()); 1312 var od = new api.MonitoredResource.fromJson(o.toJson());
1017 checkMonitoredResource(od); 1313 checkMonitoredResource(od);
1018 }); 1314 });
1019 }); 1315 });
1020 1316
1021
1022 unittest.group("obj-schema-MonitoredResourceDescriptor", () { 1317 unittest.group("obj-schema-MonitoredResourceDescriptor", () {
1023 unittest.test("to-json--from-json", () { 1318 unittest.test("to-json--from-json", () {
1024 var o = buildMonitoredResourceDescriptor(); 1319 var o = buildMonitoredResourceDescriptor();
1025 var od = new api.MonitoredResourceDescriptor.fromJson(o.toJson()); 1320 var od = new api.MonitoredResourceDescriptor.fromJson(o.toJson());
1026 checkMonitoredResourceDescriptor(od); 1321 checkMonitoredResourceDescriptor(od);
1027 }); 1322 });
1028 }); 1323 });
1029 1324
1030
1031 unittest.group("obj-schema-RequestLog", () { 1325 unittest.group("obj-schema-RequestLog", () {
1032 unittest.test("to-json--from-json", () { 1326 unittest.test("to-json--from-json", () {
1033 var o = buildRequestLog(); 1327 var o = buildRequestLog();
1034 var od = new api.RequestLog.fromJson(o.toJson()); 1328 var od = new api.RequestLog.fromJson(o.toJson());
1035 checkRequestLog(od); 1329 checkRequestLog(od);
1036 }); 1330 });
1037 }); 1331 });
1038 1332
1039
1040 unittest.group("obj-schema-SourceLocation", () { 1333 unittest.group("obj-schema-SourceLocation", () {
1041 unittest.test("to-json--from-json", () { 1334 unittest.test("to-json--from-json", () {
1042 var o = buildSourceLocation(); 1335 var o = buildSourceLocation();
1043 var od = new api.SourceLocation.fromJson(o.toJson()); 1336 var od = new api.SourceLocation.fromJson(o.toJson());
1044 checkSourceLocation(od); 1337 checkSourceLocation(od);
1045 }); 1338 });
1046 }); 1339 });
1047 1340
1048
1049 unittest.group("obj-schema-SourceReference", () { 1341 unittest.group("obj-schema-SourceReference", () {
1050 unittest.test("to-json--from-json", () { 1342 unittest.test("to-json--from-json", () {
1051 var o = buildSourceReference(); 1343 var o = buildSourceReference();
1052 var od = new api.SourceReference.fromJson(o.toJson()); 1344 var od = new api.SourceReference.fromJson(o.toJson());
1053 checkSourceReference(od); 1345 checkSourceReference(od);
1054 }); 1346 });
1055 }); 1347 });
1056 1348
1057
1058 unittest.group("obj-schema-WriteLogEntriesRequest", () { 1349 unittest.group("obj-schema-WriteLogEntriesRequest", () {
1059 unittest.test("to-json--from-json", () { 1350 unittest.test("to-json--from-json", () {
1060 var o = buildWriteLogEntriesRequest(); 1351 var o = buildWriteLogEntriesRequest();
1061 var od = new api.WriteLogEntriesRequest.fromJson(o.toJson()); 1352 var od = new api.WriteLogEntriesRequest.fromJson(o.toJson());
1062 checkWriteLogEntriesRequest(od); 1353 checkWriteLogEntriesRequest(od);
1063 }); 1354 });
1064 }); 1355 });
1065 1356
1066
1067 unittest.group("obj-schema-WriteLogEntriesResponse", () { 1357 unittest.group("obj-schema-WriteLogEntriesResponse", () {
1068 unittest.test("to-json--from-json", () { 1358 unittest.test("to-json--from-json", () {
1069 var o = buildWriteLogEntriesResponse(); 1359 var o = buildWriteLogEntriesResponse();
1070 var od = new api.WriteLogEntriesResponse.fromJson(o.toJson()); 1360 var od = new api.WriteLogEntriesResponse.fromJson(o.toJson());
1071 checkWriteLogEntriesResponse(od); 1361 checkWriteLogEntriesResponse(od);
1072 }); 1362 });
1073 }); 1363 });
1074 1364
1365 unittest.group("resource-BillingAccountsExclusionsResourceApi", () {
1366 unittest.test("method--create", () {
1367 var mock = new HttpServerMock();
1368 api.BillingAccountsExclusionsResourceApi res =
1369 new api.LoggingApi(mock).billingAccounts.exclusions;
1370 var arg_request = buildLogExclusion();
1371 var arg_parent = "foo";
1372 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1373 var obj = new api.LogExclusion.fromJson(json);
1374 checkLogExclusion(obj);
1075 1375
1076 unittest.group("resource-BillingAccountsLogsResourceApi", () {
1077 unittest.test("method--delete", () {
1078
1079 var mock = new HttpServerMock();
1080 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA ccounts.logs;
1081 var arg_logName = "foo";
1082 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1083 var path = (req.url).path; 1376 var path = (req.url).path;
1084 var pathOffset = 0; 1377 var pathOffset = 0;
1085 var index; 1378 var index;
1086 var subPart; 1379 var subPart;
1087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1380 unittest.expect(
1381 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1088 pathOffset += 1; 1382 pathOffset += 1;
1089 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1383 unittest.expect(
1384 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1090 pathOffset += 3; 1385 pathOffset += 3;
1091 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1386 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1092 1387
1093 var query = (req.url).query; 1388 var query = (req.url).query;
1094 var queryOffset = 0; 1389 var queryOffset = 0;
1095 var queryMap = {}; 1390 var queryMap = {};
1096 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1391 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1097 parseBool(n) { 1392 parseBool(n) {
1098 if (n == "true") return true; 1393 if (n == "true") return true;
1099 if (n == "false") return false; 1394 if (n == "false") return false;
1100 if (n == null) return null; 1395 if (n == null) return null;
1101 throw new core.ArgumentError("Invalid boolean: $n"); 1396 throw new core.ArgumentError("Invalid boolean: $n");
1102 } 1397 }
1398
1103 if (query.length > 0) { 1399 if (query.length > 0) {
1104 for (var part in query.split("&")) { 1400 for (var part in query.split("&")) {
1105 var keyvalue = part.split("="); 1401 var keyvalue = part.split("=");
1106 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1402 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1403 core.Uri.decodeQueryComponent(keyvalue[1]));
1107 } 1404 }
1108 } 1405 }
1109 1406
1110
1111 var h = { 1407 var h = {
1112 "content-type" : "application/json; charset=utf-8", 1408 "content-type": "application/json; charset=utf-8",
1113 }; 1409 };
1114 var resp = convert.JSON.encode(buildEmpty()); 1410 var resp = convert.JSON.encode(buildLogExclusion());
1115 return new async.Future.value(stringResponse(200, h, resp)); 1411 return new async.Future.value(stringResponse(200, h, resp));
1116 }), true); 1412 }), true);
1117 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { 1413 res
1118 checkEmpty(response); 1414 .create(arg_request, arg_parent)
1415 .then(unittest.expectAsync1(((api.LogExclusion response) {
1416 checkLogExclusion(response);
1119 }))); 1417 })));
1120 }); 1418 });
1121 1419
1122 unittest.test("method--list", () { 1420 unittest.test("method--delete", () {
1123
1124 var mock = new HttpServerMock(); 1421 var mock = new HttpServerMock();
1125 api.BillingAccountsLogsResourceApi res = new api.LoggingApi(mock).billingA ccounts.logs; 1422 api.BillingAccountsExclusionsResourceApi res =
1126 var arg_parent = "foo"; 1423 new api.LoggingApi(mock).billingAccounts.exclusions;
1127 var arg_pageToken = "foo"; 1424 var arg_name = "foo";
1128 var arg_pageSize = 42;
1129 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1425 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1130 var path = (req.url).path; 1426 var path = (req.url).path;
1131 var pathOffset = 0; 1427 var pathOffset = 0;
1132 var index; 1428 var index;
1133 var subPart; 1429 var subPart;
1134 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1430 unittest.expect(
1431 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1135 pathOffset += 1; 1432 pathOffset += 1;
1136 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1433 unittest.expect(
1434 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1137 pathOffset += 3; 1435 pathOffset += 3;
1138 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1436 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1139 1437
1140 var query = (req.url).query; 1438 var query = (req.url).query;
1141 var queryOffset = 0; 1439 var queryOffset = 0;
1142 var queryMap = {}; 1440 var queryMap = {};
1143 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1441 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1144 parseBool(n) { 1442 parseBool(n) {
1145 if (n == "true") return true; 1443 if (n == "true") return true;
1146 if (n == "false") return false; 1444 if (n == "false") return false;
1147 if (n == null) return null; 1445 if (n == null) return null;
1148 throw new core.ArgumentError("Invalid boolean: $n"); 1446 throw new core.ArgumentError("Invalid boolean: $n");
1149 } 1447 }
1448
1150 if (query.length > 0) { 1449 if (query.length > 0) {
1151 for (var part in query.split("&")) { 1450 for (var part in query.split("&")) {
1152 var keyvalue = part.split("="); 1451 var keyvalue = part.split("=");
1153 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1452 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1453 core.Uri.decodeQueryComponent(keyvalue[1]));
1154 } 1454 }
1155 } 1455 }
1156 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1157 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1158
1159 1456
1160 var h = { 1457 var h = {
1161 "content-type" : "application/json; charset=utf-8", 1458 "content-type": "application/json; charset=utf-8",
1162 }; 1459 };
1163 var resp = convert.JSON.encode(buildListLogsResponse()); 1460 var resp = convert.JSON.encode(buildEmpty());
1164 return new async.Future.value(stringResponse(200, h, resp)); 1461 return new async.Future.value(stringResponse(200, h, resp));
1165 }), true); 1462 }), true);
1166 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListLogsResponse response) { 1463 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) {
1167 checkListLogsResponse(response); 1464 checkEmpty(response);
1168 }))); 1465 })));
1169 }); 1466 });
1170 1467
1171 }); 1468 unittest.test("method--get", () {
1172
1173
1174 unittest.group("resource-BillingAccountsSinksResourceApi", () {
1175 unittest.test("method--create", () {
1176
1177 var mock = new HttpServerMock(); 1469 var mock = new HttpServerMock();
1178 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing Accounts.sinks; 1470 api.BillingAccountsExclusionsResourceApi res =
1179 var arg_request = buildLogSink(); 1471 new api.LoggingApi(mock).billingAccounts.exclusions;
1180 var arg_parent = "foo"; 1472 var arg_name = "foo";
1181 var arg_uniqueWriterIdentity = true;
1182 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1473 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1183 var obj = new api.LogSink.fromJson(json);
1184 checkLogSink(obj);
1185
1186 var path = (req.url).path; 1474 var path = (req.url).path;
1187 var pathOffset = 0; 1475 var pathOffset = 0;
1188 var index; 1476 var index;
1189 var subPart; 1477 var subPart;
1190 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1478 unittest.expect(
1479 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1191 pathOffset += 1; 1480 pathOffset += 1;
1192 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1481 unittest.expect(
1482 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1193 pathOffset += 3; 1483 pathOffset += 3;
1194 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1484 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1195 1485
1196 var query = (req.url).query; 1486 var query = (req.url).query;
1197 var queryOffset = 0; 1487 var queryOffset = 0;
1198 var queryMap = {}; 1488 var queryMap = {};
1199 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1489 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1200 parseBool(n) { 1490 parseBool(n) {
1201 if (n == "true") return true; 1491 if (n == "true") return true;
1202 if (n == "false") return false; 1492 if (n == "false") return false;
1203 if (n == null) return null; 1493 if (n == null) return null;
1204 throw new core.ArgumentError("Invalid boolean: $n"); 1494 throw new core.ArgumentError("Invalid boolean: $n");
1205 } 1495 }
1496
1206 if (query.length > 0) { 1497 if (query.length > 0) {
1207 for (var part in query.split("&")) { 1498 for (var part in query.split("&")) {
1208 var keyvalue = part.split("="); 1499 var keyvalue = part.split("=");
1209 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1500 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1501 core.Uri.decodeQueryComponent(keyvalue[1]));
1210 } 1502 }
1211 } 1503 }
1212 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity"));
1213
1214 1504
1215 var h = { 1505 var h = {
1216 "content-type" : "application/json; charset=utf-8", 1506 "content-type": "application/json; charset=utf-8",
1217 }; 1507 };
1218 var resp = convert.JSON.encode(buildLogSink()); 1508 var resp = convert.JSON.encode(buildLogExclusion());
1219 return new async.Future.value(stringResponse(200, h, resp)); 1509 return new async.Future.value(stringResponse(200, h, resp));
1220 }), true); 1510 }), true);
1221 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter Identity).then(unittest.expectAsync1(((api.LogSink response) { 1511 res
1222 checkLogSink(response); 1512 .get(arg_name)
1513 .then(unittest.expectAsync1(((api.LogExclusion response) {
1514 checkLogExclusion(response);
1223 }))); 1515 })));
1224 }); 1516 });
1225 1517
1226 unittest.test("method--delete", () { 1518 unittest.test("method--list", () {
1227
1228 var mock = new HttpServerMock(); 1519 var mock = new HttpServerMock();
1229 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing Accounts.sinks; 1520 api.BillingAccountsExclusionsResourceApi res =
1230 var arg_sinkName = "foo"; 1521 new api.LoggingApi(mock).billingAccounts.exclusions;
1522 var arg_parent = "foo";
1523 var arg_pageToken = "foo";
1524 var arg_pageSize = 42;
1231 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1525 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1232 var path = (req.url).path; 1526 var path = (req.url).path;
1233 var pathOffset = 0; 1527 var pathOffset = 0;
1234 var index; 1528 var index;
1235 var subPart; 1529 var subPart;
1236 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1530 unittest.expect(
1531 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1237 pathOffset += 1; 1532 pathOffset += 1;
1238 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1533 unittest.expect(
1534 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1239 pathOffset += 3; 1535 pathOffset += 3;
1240 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1536 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1241 1537
1242 var query = (req.url).query; 1538 var query = (req.url).query;
1243 var queryOffset = 0; 1539 var queryOffset = 0;
1244 var queryMap = {}; 1540 var queryMap = {};
1245 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1541 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1246 parseBool(n) { 1542 parseBool(n) {
1247 if (n == "true") return true; 1543 if (n == "true") return true;
1248 if (n == "false") return false; 1544 if (n == "false") return false;
1249 if (n == null) return null; 1545 if (n == null) return null;
1250 throw new core.ArgumentError("Invalid boolean: $n"); 1546 throw new core.ArgumentError("Invalid boolean: $n");
1251 } 1547 }
1548
1252 if (query.length > 0) { 1549 if (query.length > 0) {
1253 for (var part in query.split("&")) { 1550 for (var part in query.split("&")) {
1254 var keyvalue = part.split("="); 1551 var keyvalue = part.split("=");
1255 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1552 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1553 core.Uri.decodeQueryComponent(keyvalue[1]));
1256 } 1554 }
1257 } 1555 }
1258 1556 unittest.expect(
1557 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
1558 unittest.expect(core.int.parse(queryMap["pageSize"].first),
1559 unittest.equals(arg_pageSize));
1259 1560
1260 var h = { 1561 var h = {
1261 "content-type" : "application/json; charset=utf-8", 1562 "content-type": "application/json; charset=utf-8",
1262 }; 1563 };
1263 var resp = convert.JSON.encode(buildEmpty()); 1564 var resp = convert.JSON.encode(buildListExclusionsResponse());
1264 return new async.Future.value(stringResponse(200, h, resp)); 1565 return new async.Future.value(stringResponse(200, h, resp));
1265 }), true); 1566 }), true);
1266 res.delete(arg_sinkName).then(unittest.expectAsync1(((api.Empty response) { 1567 res
1267 checkEmpty(response); 1568 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
1569 .then(unittest.expectAsync1(((api.ListExclusionsResponse response) {
1570 checkListExclusionsResponse(response);
1268 }))); 1571 })));
1269 }); 1572 });
1270 1573
1271 unittest.test("method--get", () { 1574 unittest.test("method--patch", () {
1575 var mock = new HttpServerMock();
1576 api.BillingAccountsExclusionsResourceApi res =
1577 new api.LoggingApi(mock).billingAccounts.exclusions;
1578 var arg_request = buildLogExclusion();
1579 var arg_name = "foo";
1580 var arg_updateMask = "foo";
1581 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1582 var obj = new api.LogExclusion.fromJson(json);
1583 checkLogExclusion(obj);
1272 1584
1273 var mock = new HttpServerMock();
1274 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing Accounts.sinks;
1275 var arg_sinkName = "foo";
1276 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1277 var path = (req.url).path; 1585 var path = (req.url).path;
1278 var pathOffset = 0; 1586 var pathOffset = 0;
1279 var index; 1587 var index;
1280 var subPart; 1588 var subPart;
1281 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1589 unittest.expect(
1590 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1282 pathOffset += 1; 1591 pathOffset += 1;
1283 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1592 unittest.expect(
1593 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1284 pathOffset += 3; 1594 pathOffset += 3;
1285 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1595 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1286 1596
1287 var query = (req.url).query; 1597 var query = (req.url).query;
1288 var queryOffset = 0; 1598 var queryOffset = 0;
1289 var queryMap = {}; 1599 var queryMap = {};
1290 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1600 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1291 parseBool(n) { 1601 parseBool(n) {
1292 if (n == "true") return true; 1602 if (n == "true") return true;
1293 if (n == "false") return false; 1603 if (n == "false") return false;
1294 if (n == null) return null; 1604 if (n == null) return null;
1295 throw new core.ArgumentError("Invalid boolean: $n"); 1605 throw new core.ArgumentError("Invalid boolean: $n");
1296 } 1606 }
1607
1297 if (query.length > 0) { 1608 if (query.length > 0) {
1298 for (var part in query.split("&")) { 1609 for (var part in query.split("&")) {
1299 var keyvalue = part.split("="); 1610 var keyvalue = part.split("=");
1300 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1611 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1612 core.Uri.decodeQueryComponent(keyvalue[1]));
1613 }
1614 }
1615 unittest.expect(
1616 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
1617
1618 var h = {
1619 "content-type": "application/json; charset=utf-8",
1620 };
1621 var resp = convert.JSON.encode(buildLogExclusion());
1622 return new async.Future.value(stringResponse(200, h, resp));
1623 }), true);
1624 res
1625 .patch(arg_request, arg_name, updateMask: arg_updateMask)
1626 .then(unittest.expectAsync1(((api.LogExclusion response) {
1627 checkLogExclusion(response);
1628 })));
1629 });
1630 });
1631
1632 unittest.group("resource-BillingAccountsLogsResourceApi", () {
1633 unittest.test("method--delete", () {
1634 var mock = new HttpServerMock();
1635 api.BillingAccountsLogsResourceApi res =
1636 new api.LoggingApi(mock).billingAccounts.logs;
1637 var arg_logName = "foo";
1638 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1639 var path = (req.url).path;
1640 var pathOffset = 0;
1641 var index;
1642 var subPart;
1643 unittest.expect(
1644 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1645 pathOffset += 1;
1646 unittest.expect(
1647 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1648 pathOffset += 3;
1649 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1650
1651 var query = (req.url).query;
1652 var queryOffset = 0;
1653 var queryMap = {};
1654 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1655 parseBool(n) {
1656 if (n == "true") return true;
1657 if (n == "false") return false;
1658 if (n == null) return null;
1659 throw new core.ArgumentError("Invalid boolean: $n");
1660 }
1661
1662 if (query.length > 0) {
1663 for (var part in query.split("&")) {
1664 var keyvalue = part.split("=");
1665 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1666 core.Uri.decodeQueryComponent(keyvalue[1]));
1301 } 1667 }
1302 } 1668 }
1303 1669
1304
1305 var h = { 1670 var h = {
1306 "content-type" : "application/json; charset=utf-8", 1671 "content-type": "application/json; charset=utf-8",
1307 }; 1672 };
1308 var resp = convert.JSON.encode(buildLogSink()); 1673 var resp = convert.JSON.encode(buildEmpty());
1309 return new async.Future.value(stringResponse(200, h, resp)); 1674 return new async.Future.value(stringResponse(200, h, resp));
1310 }), true); 1675 }), true);
1311 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { 1676 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) {
1312 checkLogSink(response); 1677 checkEmpty(response);
1313 }))); 1678 })));
1314 }); 1679 });
1315 1680
1316 unittest.test("method--list", () { 1681 unittest.test("method--list", () {
1317
1318 var mock = new HttpServerMock(); 1682 var mock = new HttpServerMock();
1319 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing Accounts.sinks; 1683 api.BillingAccountsLogsResourceApi res =
1684 new api.LoggingApi(mock).billingAccounts.logs;
1320 var arg_parent = "foo"; 1685 var arg_parent = "foo";
1321 var arg_pageToken = "foo"; 1686 var arg_pageToken = "foo";
1322 var arg_pageSize = 42; 1687 var arg_pageSize = 42;
1323 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1688 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1324 var path = (req.url).path; 1689 var path = (req.url).path;
1325 var pathOffset = 0; 1690 var pathOffset = 0;
1326 var index; 1691 var index;
1327 var subPart; 1692 var subPart;
1328 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1693 unittest.expect(
1694 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1329 pathOffset += 1; 1695 pathOffset += 1;
1330 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1696 unittest.expect(
1697 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1331 pathOffset += 3; 1698 pathOffset += 3;
1332 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1699 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1333 1700
1701 var query = (req.url).query;
1702 var queryOffset = 0;
1703 var queryMap = {};
1704 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1705 parseBool(n) {
1706 if (n == "true") return true;
1707 if (n == "false") return false;
1708 if (n == null) return null;
1709 throw new core.ArgumentError("Invalid boolean: $n");
1710 }
1711
1712 if (query.length > 0) {
1713 for (var part in query.split("&")) {
1714 var keyvalue = part.split("=");
1715 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1716 core.Uri.decodeQueryComponent(keyvalue[1]));
1717 }
1718 }
1719 unittest.expect(
1720 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
1721 unittest.expect(core.int.parse(queryMap["pageSize"].first),
1722 unittest.equals(arg_pageSize));
1723
1724 var h = {
1725 "content-type": "application/json; charset=utf-8",
1726 };
1727 var resp = convert.JSON.encode(buildListLogsResponse());
1728 return new async.Future.value(stringResponse(200, h, resp));
1729 }), true);
1730 res
1731 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
1732 .then(unittest.expectAsync1(((api.ListLogsResponse response) {
1733 checkListLogsResponse(response);
1734 })));
1735 });
1736 });
1737
1738 unittest.group("resource-BillingAccountsSinksResourceApi", () {
1739 unittest.test("method--create", () {
1740 var mock = new HttpServerMock();
1741 api.BillingAccountsSinksResourceApi res =
1742 new api.LoggingApi(mock).billingAccounts.sinks;
1743 var arg_request = buildLogSink();
1744 var arg_parent = "foo";
1745 var arg_uniqueWriterIdentity = true;
1746 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1747 var obj = new api.LogSink.fromJson(json);
1748 checkLogSink(obj);
1749
1750 var path = (req.url).path;
1751 var pathOffset = 0;
1752 var index;
1753 var subPart;
1754 unittest.expect(
1755 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1756 pathOffset += 1;
1757 unittest.expect(
1758 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1759 pathOffset += 3;
1760 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1761
1762 var query = (req.url).query;
1763 var queryOffset = 0;
1764 var queryMap = {};
1765 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1766 parseBool(n) {
1767 if (n == "true") return true;
1768 if (n == "false") return false;
1769 if (n == null) return null;
1770 throw new core.ArgumentError("Invalid boolean: $n");
1771 }
1772
1773 if (query.length > 0) {
1774 for (var part in query.split("&")) {
1775 var keyvalue = part.split("=");
1776 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1777 core.Uri.decodeQueryComponent(keyvalue[1]));
1778 }
1779 }
1780 unittest.expect(queryMap["uniqueWriterIdentity"].first,
1781 unittest.equals("$arg_uniqueWriterIdentity"));
1782
1783 var h = {
1784 "content-type": "application/json; charset=utf-8",
1785 };
1786 var resp = convert.JSON.encode(buildLogSink());
1787 return new async.Future.value(stringResponse(200, h, resp));
1788 }), true);
1789 res
1790 .create(arg_request, arg_parent,
1791 uniqueWriterIdentity: arg_uniqueWriterIdentity)
1792 .then(unittest.expectAsync1(((api.LogSink response) {
1793 checkLogSink(response);
1794 })));
1795 });
1796
1797 unittest.test("method--delete", () {
1798 var mock = new HttpServerMock();
1799 api.BillingAccountsSinksResourceApi res =
1800 new api.LoggingApi(mock).billingAccounts.sinks;
1801 var arg_sinkName = "foo";
1802 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1803 var path = (req.url).path;
1804 var pathOffset = 0;
1805 var index;
1806 var subPart;
1807 unittest.expect(
1808 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1809 pathOffset += 1;
1810 unittest.expect(
1811 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1812 pathOffset += 3;
1813 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1814
1815 var query = (req.url).query;
1816 var queryOffset = 0;
1817 var queryMap = {};
1818 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1819 parseBool(n) {
1820 if (n == "true") return true;
1821 if (n == "false") return false;
1822 if (n == null) return null;
1823 throw new core.ArgumentError("Invalid boolean: $n");
1824 }
1825
1826 if (query.length > 0) {
1827 for (var part in query.split("&")) {
1828 var keyvalue = part.split("=");
1829 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1830 core.Uri.decodeQueryComponent(keyvalue[1]));
1831 }
1832 }
1833
1834 var h = {
1835 "content-type": "application/json; charset=utf-8",
1836 };
1837 var resp = convert.JSON.encode(buildEmpty());
1838 return new async.Future.value(stringResponse(200, h, resp));
1839 }), true);
1840 res
1841 .delete(arg_sinkName)
1842 .then(unittest.expectAsync1(((api.Empty response) {
1843 checkEmpty(response);
1844 })));
1845 });
1846
1847 unittest.test("method--get", () {
1848 var mock = new HttpServerMock();
1849 api.BillingAccountsSinksResourceApi res =
1850 new api.LoggingApi(mock).billingAccounts.sinks;
1851 var arg_sinkName = "foo";
1852 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1853 var path = (req.url).path;
1854 var pathOffset = 0;
1855 var index;
1856 var subPart;
1857 unittest.expect(
1858 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1859 pathOffset += 1;
1860 unittest.expect(
1861 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1862 pathOffset += 3;
1863 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1864
1334 var query = (req.url).query; 1865 var query = (req.url).query;
1335 var queryOffset = 0; 1866 var queryOffset = 0;
1336 var queryMap = {}; 1867 var queryMap = {};
1337 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1868 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1338 parseBool(n) { 1869 parseBool(n) {
1339 if (n == "true") return true; 1870 if (n == "true") return true;
1340 if (n == "false") return false; 1871 if (n == "false") return false;
1341 if (n == null) return null; 1872 if (n == null) return null;
1342 throw new core.ArgumentError("Invalid boolean: $n"); 1873 throw new core.ArgumentError("Invalid boolean: $n");
1343 } 1874 }
1875
1344 if (query.length > 0) { 1876 if (query.length > 0) {
1345 for (var part in query.split("&")) { 1877 for (var part in query.split("&")) {
1346 var keyvalue = part.split("="); 1878 var keyvalue = part.split("=");
1347 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1879 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1880 core.Uri.decodeQueryComponent(keyvalue[1]));
1348 } 1881 }
1349 } 1882 }
1350 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1351 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1352
1353 1883
1354 var h = { 1884 var h = {
1355 "content-type" : "application/json; charset=utf-8", 1885 "content-type": "application/json; charset=utf-8",
1886 };
1887 var resp = convert.JSON.encode(buildLogSink());
1888 return new async.Future.value(stringResponse(200, h, resp));
1889 }), true);
1890 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) {
1891 checkLogSink(response);
1892 })));
1893 });
1894
1895 unittest.test("method--list", () {
1896 var mock = new HttpServerMock();
1897 api.BillingAccountsSinksResourceApi res =
1898 new api.LoggingApi(mock).billingAccounts.sinks;
1899 var arg_parent = "foo";
1900 var arg_pageToken = "foo";
1901 var arg_pageSize = 42;
1902 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1903 var path = (req.url).path;
1904 var pathOffset = 0;
1905 var index;
1906 var subPart;
1907 unittest.expect(
1908 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1909 pathOffset += 1;
1910 unittest.expect(
1911 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1912 pathOffset += 3;
1913 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1914
1915 var query = (req.url).query;
1916 var queryOffset = 0;
1917 var queryMap = {};
1918 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1919 parseBool(n) {
1920 if (n == "true") return true;
1921 if (n == "false") return false;
1922 if (n == null) return null;
1923 throw new core.ArgumentError("Invalid boolean: $n");
1924 }
1925
1926 if (query.length > 0) {
1927 for (var part in query.split("&")) {
1928 var keyvalue = part.split("=");
1929 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1930 core.Uri.decodeQueryComponent(keyvalue[1]));
1931 }
1932 }
1933 unittest.expect(
1934 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
1935 unittest.expect(core.int.parse(queryMap["pageSize"].first),
1936 unittest.equals(arg_pageSize));
1937
1938 var h = {
1939 "content-type": "application/json; charset=utf-8",
1356 }; 1940 };
1357 var resp = convert.JSON.encode(buildListSinksResponse()); 1941 var resp = convert.JSON.encode(buildListSinksResponse());
1358 return new async.Future.value(stringResponse(200, h, resp)); 1942 return new async.Future.value(stringResponse(200, h, resp));
1359 }), true); 1943 }), true);
1360 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListSinksResponse response) { 1944 res
1945 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
1946 .then(unittest.expectAsync1(((api.ListSinksResponse response) {
1361 checkListSinksResponse(response); 1947 checkListSinksResponse(response);
1362 }))); 1948 })));
1363 }); 1949 });
1364 1950
1365 unittest.test("method--patch", () { 1951 unittest.test("method--patch", () {
1366
1367 var mock = new HttpServerMock(); 1952 var mock = new HttpServerMock();
1368 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing Accounts.sinks; 1953 api.BillingAccountsSinksResourceApi res =
1954 new api.LoggingApi(mock).billingAccounts.sinks;
1369 var arg_request = buildLogSink(); 1955 var arg_request = buildLogSink();
1370 var arg_sinkName = "foo"; 1956 var arg_sinkName = "foo";
1957 var arg_updateMask = "foo";
1371 var arg_uniqueWriterIdentity = true; 1958 var arg_uniqueWriterIdentity = true;
1372 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1959 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1373 var obj = new api.LogSink.fromJson(json); 1960 var obj = new api.LogSink.fromJson(json);
1374 checkLogSink(obj); 1961 checkLogSink(obj);
1375 1962
1376 var path = (req.url).path; 1963 var path = (req.url).path;
1377 var pathOffset = 0; 1964 var pathOffset = 0;
1378 var index; 1965 var index;
1379 var subPart; 1966 var subPart;
1380 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1967 unittest.expect(
1968 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1381 pathOffset += 1; 1969 pathOffset += 1;
1382 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 1970 unittest.expect(
1971 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1383 pathOffset += 3; 1972 pathOffset += 3;
1384 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 1973 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1385 1974
1386 var query = (req.url).query; 1975 var query = (req.url).query;
1387 var queryOffset = 0; 1976 var queryOffset = 0;
1388 var queryMap = {}; 1977 var queryMap = {};
1389 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1978 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1390 parseBool(n) { 1979 parseBool(n) {
1391 if (n == "true") return true; 1980 if (n == "true") return true;
1392 if (n == "false") return false; 1981 if (n == "false") return false;
1393 if (n == null) return null; 1982 if (n == null) return null;
1394 throw new core.ArgumentError("Invalid boolean: $n"); 1983 throw new core.ArgumentError("Invalid boolean: $n");
1395 } 1984 }
1985
1396 if (query.length > 0) { 1986 if (query.length > 0) {
1397 for (var part in query.split("&")) { 1987 for (var part in query.split("&")) {
1398 var keyvalue = part.split("="); 1988 var keyvalue = part.split("=");
1399 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1989 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1990 core.Uri.decodeQueryComponent(keyvalue[1]));
1400 } 1991 }
1401 } 1992 }
1402 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 1993 unittest.expect(
1403 1994 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
1995 unittest.expect(queryMap["uniqueWriterIdentity"].first,
1996 unittest.equals("$arg_uniqueWriterIdentity"));
1404 1997
1405 var h = { 1998 var h = {
1406 "content-type" : "application/json; charset=utf-8", 1999 "content-type": "application/json; charset=utf-8",
1407 }; 2000 };
1408 var resp = convert.JSON.encode(buildLogSink()); 2001 var resp = convert.JSON.encode(buildLogSink());
1409 return new async.Future.value(stringResponse(200, h, resp)); 2002 return new async.Future.value(stringResponse(200, h, resp));
1410 }), true); 2003 }), true);
1411 res.patch(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrite rIdentity).then(unittest.expectAsync1(((api.LogSink response) { 2004 res
2005 .patch(arg_request, arg_sinkName,
2006 updateMask: arg_updateMask,
2007 uniqueWriterIdentity: arg_uniqueWriterIdentity)
2008 .then(unittest.expectAsync1(((api.LogSink response) {
1412 checkLogSink(response); 2009 checkLogSink(response);
1413 }))); 2010 })));
1414 }); 2011 });
1415 2012
1416 unittest.test("method--update", () { 2013 unittest.test("method--update", () {
1417
1418 var mock = new HttpServerMock(); 2014 var mock = new HttpServerMock();
1419 api.BillingAccountsSinksResourceApi res = new api.LoggingApi(mock).billing Accounts.sinks; 2015 api.BillingAccountsSinksResourceApi res =
2016 new api.LoggingApi(mock).billingAccounts.sinks;
1420 var arg_request = buildLogSink(); 2017 var arg_request = buildLogSink();
1421 var arg_sinkName = "foo"; 2018 var arg_sinkName = "foo";
2019 var arg_updateMask = "foo";
1422 var arg_uniqueWriterIdentity = true; 2020 var arg_uniqueWriterIdentity = true;
1423 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2021 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1424 var obj = new api.LogSink.fromJson(json); 2022 var obj = new api.LogSink.fromJson(json);
1425 checkLogSink(obj); 2023 checkLogSink(obj);
1426 2024
1427 var path = (req.url).path; 2025 var path = (req.url).path;
1428 var pathOffset = 0; 2026 var pathOffset = 0;
1429 var index; 2027 var index;
1430 var subPart; 2028 var subPart;
1431 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2029 unittest.expect(
2030 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1432 pathOffset += 1; 2031 pathOffset += 1;
1433 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 2032 unittest.expect(
2033 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1434 pathOffset += 3; 2034 pathOffset += 3;
1435 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2035 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1436 2036
1437 var query = (req.url).query; 2037 var query = (req.url).query;
1438 var queryOffset = 0; 2038 var queryOffset = 0;
1439 var queryMap = {}; 2039 var queryMap = {};
1440 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2040 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1441 parseBool(n) { 2041 parseBool(n) {
1442 if (n == "true") return true; 2042 if (n == "true") return true;
1443 if (n == "false") return false; 2043 if (n == "false") return false;
1444 if (n == null) return null; 2044 if (n == null) return null;
1445 throw new core.ArgumentError("Invalid boolean: $n"); 2045 throw new core.ArgumentError("Invalid boolean: $n");
1446 } 2046 }
2047
1447 if (query.length > 0) { 2048 if (query.length > 0) {
1448 for (var part in query.split("&")) { 2049 for (var part in query.split("&")) {
1449 var keyvalue = part.split("="); 2050 var keyvalue = part.split("=");
1450 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2051 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2052 core.Uri.decodeQueryComponent(keyvalue[1]));
1451 } 2053 }
1452 } 2054 }
1453 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 2055 unittest.expect(
1454 2056 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
2057 unittest.expect(queryMap["uniqueWriterIdentity"].first,
2058 unittest.equals("$arg_uniqueWriterIdentity"));
1455 2059
1456 var h = { 2060 var h = {
1457 "content-type" : "application/json; charset=utf-8", 2061 "content-type": "application/json; charset=utf-8",
1458 }; 2062 };
1459 var resp = convert.JSON.encode(buildLogSink()); 2063 var resp = convert.JSON.encode(buildLogSink());
1460 return new async.Future.value(stringResponse(200, h, resp)); 2064 return new async.Future.value(stringResponse(200, h, resp));
1461 }), true); 2065 }), true);
1462 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit erIdentity).then(unittest.expectAsync1(((api.LogSink response) { 2066 res
2067 .update(arg_request, arg_sinkName,
2068 updateMask: arg_updateMask,
2069 uniqueWriterIdentity: arg_uniqueWriterIdentity)
2070 .then(unittest.expectAsync1(((api.LogSink response) {
1463 checkLogSink(response); 2071 checkLogSink(response);
1464 }))); 2072 })));
1465 }); 2073 });
1466
1467 }); 2074 });
1468 2075
1469
1470 unittest.group("resource-EntriesResourceApi", () { 2076 unittest.group("resource-EntriesResourceApi", () {
1471 unittest.test("method--list", () { 2077 unittest.test("method--list", () {
1472
1473 var mock = new HttpServerMock(); 2078 var mock = new HttpServerMock();
1474 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; 2079 api.EntriesResourceApi res = new api.LoggingApi(mock).entries;
1475 var arg_request = buildListLogEntriesRequest(); 2080 var arg_request = buildListLogEntriesRequest();
1476 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2081 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1477 var obj = new api.ListLogEntriesRequest.fromJson(json); 2082 var obj = new api.ListLogEntriesRequest.fromJson(json);
1478 checkListLogEntriesRequest(obj); 2083 checkListLogEntriesRequest(obj);
1479 2084
1480 var path = (req.url).path; 2085 var path = (req.url).path;
1481 var pathOffset = 0; 2086 var pathOffset = 0;
1482 var index; 2087 var index;
1483 var subPart; 2088 var subPart;
1484 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2089 unittest.expect(
2090 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1485 pathOffset += 1; 2091 pathOffset += 1;
1486 unittest.expect(path.substring(pathOffset, pathOffset + 15), unittest.eq uals("v2/entries:list")); 2092 unittest.expect(path.substring(pathOffset, pathOffset + 15),
2093 unittest.equals("v2/entries:list"));
1487 pathOffset += 15; 2094 pathOffset += 15;
1488 2095
1489 var query = (req.url).query; 2096 var query = (req.url).query;
1490 var queryOffset = 0; 2097 var queryOffset = 0;
1491 var queryMap = {}; 2098 var queryMap = {};
1492 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2099 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1493 parseBool(n) { 2100 parseBool(n) {
1494 if (n == "true") return true; 2101 if (n == "true") return true;
1495 if (n == "false") return false; 2102 if (n == "false") return false;
1496 if (n == null) return null; 2103 if (n == null) return null;
1497 throw new core.ArgumentError("Invalid boolean: $n"); 2104 throw new core.ArgumentError("Invalid boolean: $n");
1498 } 2105 }
2106
1499 if (query.length > 0) { 2107 if (query.length > 0) {
1500 for (var part in query.split("&")) { 2108 for (var part in query.split("&")) {
1501 var keyvalue = part.split("="); 2109 var keyvalue = part.split("=");
1502 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2110 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2111 core.Uri.decodeQueryComponent(keyvalue[1]));
1503 } 2112 }
1504 } 2113 }
1505 2114
1506
1507 var h = { 2115 var h = {
1508 "content-type" : "application/json; charset=utf-8", 2116 "content-type": "application/json; charset=utf-8",
1509 }; 2117 };
1510 var resp = convert.JSON.encode(buildListLogEntriesResponse()); 2118 var resp = convert.JSON.encode(buildListLogEntriesResponse());
1511 return new async.Future.value(stringResponse(200, h, resp)); 2119 return new async.Future.value(stringResponse(200, h, resp));
1512 }), true); 2120 }), true);
1513 res.list(arg_request).then(unittest.expectAsync1(((api.ListLogEntriesRespo nse response) { 2121 res
2122 .list(arg_request)
2123 .then(unittest.expectAsync1(((api.ListLogEntriesResponse response) {
1514 checkListLogEntriesResponse(response); 2124 checkListLogEntriesResponse(response);
1515 }))); 2125 })));
1516 }); 2126 });
1517 2127
1518 unittest.test("method--write", () { 2128 unittest.test("method--write", () {
1519
1520 var mock = new HttpServerMock(); 2129 var mock = new HttpServerMock();
1521 api.EntriesResourceApi res = new api.LoggingApi(mock).entries; 2130 api.EntriesResourceApi res = new api.LoggingApi(mock).entries;
1522 var arg_request = buildWriteLogEntriesRequest(); 2131 var arg_request = buildWriteLogEntriesRequest();
1523 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2132 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1524 var obj = new api.WriteLogEntriesRequest.fromJson(json); 2133 var obj = new api.WriteLogEntriesRequest.fromJson(json);
1525 checkWriteLogEntriesRequest(obj); 2134 checkWriteLogEntriesRequest(obj);
1526 2135
1527 var path = (req.url).path; 2136 var path = (req.url).path;
1528 var pathOffset = 0; 2137 var pathOffset = 0;
1529 var index; 2138 var index;
1530 var subPart; 2139 var subPart;
1531 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2140 unittest.expect(
2141 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1532 pathOffset += 1; 2142 pathOffset += 1;
1533 unittest.expect(path.substring(pathOffset, pathOffset + 16), unittest.eq uals("v2/entries:write")); 2143 unittest.expect(path.substring(pathOffset, pathOffset + 16),
2144 unittest.equals("v2/entries:write"));
1534 pathOffset += 16; 2145 pathOffset += 16;
1535 2146
1536 var query = (req.url).query; 2147 var query = (req.url).query;
1537 var queryOffset = 0; 2148 var queryOffset = 0;
1538 var queryMap = {}; 2149 var queryMap = {};
1539 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2150 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1540 parseBool(n) { 2151 parseBool(n) {
1541 if (n == "true") return true; 2152 if (n == "true") return true;
1542 if (n == "false") return false; 2153 if (n == "false") return false;
1543 if (n == null) return null; 2154 if (n == null) return null;
1544 throw new core.ArgumentError("Invalid boolean: $n"); 2155 throw new core.ArgumentError("Invalid boolean: $n");
1545 } 2156 }
2157
1546 if (query.length > 0) { 2158 if (query.length > 0) {
1547 for (var part in query.split("&")) { 2159 for (var part in query.split("&")) {
1548 var keyvalue = part.split("="); 2160 var keyvalue = part.split("=");
1549 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2162 core.Uri.decodeQueryComponent(keyvalue[1]));
1550 } 2163 }
1551 } 2164 }
1552 2165
1553
1554 var h = { 2166 var h = {
1555 "content-type" : "application/json; charset=utf-8", 2167 "content-type": "application/json; charset=utf-8",
1556 }; 2168 };
1557 var resp = convert.JSON.encode(buildWriteLogEntriesResponse()); 2169 var resp = convert.JSON.encode(buildWriteLogEntriesResponse());
1558 return new async.Future.value(stringResponse(200, h, resp)); 2170 return new async.Future.value(stringResponse(200, h, resp));
1559 }), true); 2171 }), true);
1560 res.write(arg_request).then(unittest.expectAsync1(((api.WriteLogEntriesRes ponse response) { 2172 res
2173 .write(arg_request)
2174 .then(unittest.expectAsync1(((api.WriteLogEntriesResponse response) {
1561 checkWriteLogEntriesResponse(response); 2175 checkWriteLogEntriesResponse(response);
1562 }))); 2176 })));
1563 }); 2177 });
1564
1565 }); 2178 });
1566 2179
2180 unittest.group("resource-FoldersExclusionsResourceApi", () {
2181 unittest.test("method--create", () {
2182 var mock = new HttpServerMock();
2183 api.FoldersExclusionsResourceApi res =
2184 new api.LoggingApi(mock).folders.exclusions;
2185 var arg_request = buildLogExclusion();
2186 var arg_parent = "foo";
2187 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2188 var obj = new api.LogExclusion.fromJson(json);
2189 checkLogExclusion(obj);
1567 2190
1568 unittest.group("resource-FoldersLogsResourceApi", () {
1569 unittest.test("method--delete", () {
1570
1571 var mock = new HttpServerMock();
1572 api.FoldersLogsResourceApi res = new api.LoggingApi(mock).folders.logs;
1573 var arg_logName = "foo";
1574 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1575 var path = (req.url).path; 2191 var path = (req.url).path;
1576 var pathOffset = 0; 2192 var pathOffset = 0;
1577 var index; 2193 var index;
1578 var subPart; 2194 var subPart;
1579 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2195 unittest.expect(
2196 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1580 pathOffset += 1; 2197 pathOffset += 1;
1581 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 2198 unittest.expect(
2199 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1582 pathOffset += 3; 2200 pathOffset += 3;
1583 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2201 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1584 2202
1585 var query = (req.url).query; 2203 var query = (req.url).query;
1586 var queryOffset = 0; 2204 var queryOffset = 0;
1587 var queryMap = {}; 2205 var queryMap = {};
1588 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2206 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1589 parseBool(n) { 2207 parseBool(n) {
1590 if (n == "true") return true; 2208 if (n == "true") return true;
1591 if (n == "false") return false; 2209 if (n == "false") return false;
1592 if (n == null) return null; 2210 if (n == null) return null;
1593 throw new core.ArgumentError("Invalid boolean: $n"); 2211 throw new core.ArgumentError("Invalid boolean: $n");
1594 } 2212 }
2213
1595 if (query.length > 0) { 2214 if (query.length > 0) {
1596 for (var part in query.split("&")) { 2215 for (var part in query.split("&")) {
1597 var keyvalue = part.split("="); 2216 var keyvalue = part.split("=");
1598 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2217 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2218 core.Uri.decodeQueryComponent(keyvalue[1]));
1599 } 2219 }
1600 } 2220 }
1601 2221
1602
1603 var h = { 2222 var h = {
1604 "content-type" : "application/json; charset=utf-8", 2223 "content-type": "application/json; charset=utf-8",
1605 }; 2224 };
1606 var resp = convert.JSON.encode(buildEmpty()); 2225 var resp = convert.JSON.encode(buildLogExclusion());
1607 return new async.Future.value(stringResponse(200, h, resp)); 2226 return new async.Future.value(stringResponse(200, h, resp));
1608 }), true); 2227 }), true);
1609 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { 2228 res
1610 checkEmpty(response); 2229 .create(arg_request, arg_parent)
2230 .then(unittest.expectAsync1(((api.LogExclusion response) {
2231 checkLogExclusion(response);
1611 }))); 2232 })));
1612 }); 2233 });
1613 2234
1614 unittest.test("method--list", () { 2235 unittest.test("method--delete", () {
1615
1616 var mock = new HttpServerMock(); 2236 var mock = new HttpServerMock();
1617 api.FoldersLogsResourceApi res = new api.LoggingApi(mock).folders.logs; 2237 api.FoldersExclusionsResourceApi res =
1618 var arg_parent = "foo"; 2238 new api.LoggingApi(mock).folders.exclusions;
1619 var arg_pageToken = "foo"; 2239 var arg_name = "foo";
1620 var arg_pageSize = 42;
1621 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2240 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1622 var path = (req.url).path; 2241 var path = (req.url).path;
1623 var pathOffset = 0; 2242 var pathOffset = 0;
1624 var index; 2243 var index;
1625 var subPart; 2244 var subPart;
1626 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2245 unittest.expect(
2246 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1627 pathOffset += 1; 2247 pathOffset += 1;
1628 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 2248 unittest.expect(
2249 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1629 pathOffset += 3; 2250 pathOffset += 3;
1630 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2251 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1631 2252
1632 var query = (req.url).query; 2253 var query = (req.url).query;
1633 var queryOffset = 0; 2254 var queryOffset = 0;
1634 var queryMap = {}; 2255 var queryMap = {};
1635 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2256 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1636 parseBool(n) { 2257 parseBool(n) {
1637 if (n == "true") return true; 2258 if (n == "true") return true;
1638 if (n == "false") return false; 2259 if (n == "false") return false;
1639 if (n == null) return null; 2260 if (n == null) return null;
1640 throw new core.ArgumentError("Invalid boolean: $n"); 2261 throw new core.ArgumentError("Invalid boolean: $n");
1641 } 2262 }
1642 if (query.length > 0) { 2263
1643 for (var part in query.split("&")) { 2264 if (query.length > 0) {
1644 var keyvalue = part.split("="); 2265 for (var part in query.split("&")) {
1645 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2266 var keyvalue = part.split("=");
1646 } 2267 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1647 } 2268 core.Uri.decodeQueryComponent(keyvalue[1]));
1648 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2269 }
1649 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 2270 }
1650 2271
1651 2272 var h = {
1652 var h = { 2273 "content-type": "application/json; charset=utf-8",
1653 "content-type" : "application/json; charset=utf-8", 2274 };
2275 var resp = convert.JSON.encode(buildEmpty());
2276 return new async.Future.value(stringResponse(200, h, resp));
2277 }), true);
2278 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) {
2279 checkEmpty(response);
2280 })));
2281 });
2282
2283 unittest.test("method--get", () {
2284 var mock = new HttpServerMock();
2285 api.FoldersExclusionsResourceApi res =
2286 new api.LoggingApi(mock).folders.exclusions;
2287 var arg_name = "foo";
2288 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2289 var path = (req.url).path;
2290 var pathOffset = 0;
2291 var index;
2292 var subPart;
2293 unittest.expect(
2294 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2295 pathOffset += 1;
2296 unittest.expect(
2297 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2298 pathOffset += 3;
2299 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2300
2301 var query = (req.url).query;
2302 var queryOffset = 0;
2303 var queryMap = {};
2304 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2305 parseBool(n) {
2306 if (n == "true") return true;
2307 if (n == "false") return false;
2308 if (n == null) return null;
2309 throw new core.ArgumentError("Invalid boolean: $n");
2310 }
2311
2312 if (query.length > 0) {
2313 for (var part in query.split("&")) {
2314 var keyvalue = part.split("=");
2315 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2316 core.Uri.decodeQueryComponent(keyvalue[1]));
2317 }
2318 }
2319
2320 var h = {
2321 "content-type": "application/json; charset=utf-8",
2322 };
2323 var resp = convert.JSON.encode(buildLogExclusion());
2324 return new async.Future.value(stringResponse(200, h, resp));
2325 }), true);
2326 res
2327 .get(arg_name)
2328 .then(unittest.expectAsync1(((api.LogExclusion response) {
2329 checkLogExclusion(response);
2330 })));
2331 });
2332
2333 unittest.test("method--list", () {
2334 var mock = new HttpServerMock();
2335 api.FoldersExclusionsResourceApi res =
2336 new api.LoggingApi(mock).folders.exclusions;
2337 var arg_parent = "foo";
2338 var arg_pageToken = "foo";
2339 var arg_pageSize = 42;
2340 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2341 var path = (req.url).path;
2342 var pathOffset = 0;
2343 var index;
2344 var subPart;
2345 unittest.expect(
2346 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2347 pathOffset += 1;
2348 unittest.expect(
2349 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2350 pathOffset += 3;
2351 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2352
2353 var query = (req.url).query;
2354 var queryOffset = 0;
2355 var queryMap = {};
2356 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2357 parseBool(n) {
2358 if (n == "true") return true;
2359 if (n == "false") return false;
2360 if (n == null) return null;
2361 throw new core.ArgumentError("Invalid boolean: $n");
2362 }
2363
2364 if (query.length > 0) {
2365 for (var part in query.split("&")) {
2366 var keyvalue = part.split("=");
2367 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2368 core.Uri.decodeQueryComponent(keyvalue[1]));
2369 }
2370 }
2371 unittest.expect(
2372 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2373 unittest.expect(core.int.parse(queryMap["pageSize"].first),
2374 unittest.equals(arg_pageSize));
2375
2376 var h = {
2377 "content-type": "application/json; charset=utf-8",
2378 };
2379 var resp = convert.JSON.encode(buildListExclusionsResponse());
2380 return new async.Future.value(stringResponse(200, h, resp));
2381 }), true);
2382 res
2383 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
2384 .then(unittest.expectAsync1(((api.ListExclusionsResponse response) {
2385 checkListExclusionsResponse(response);
2386 })));
2387 });
2388
2389 unittest.test("method--patch", () {
2390 var mock = new HttpServerMock();
2391 api.FoldersExclusionsResourceApi res =
2392 new api.LoggingApi(mock).folders.exclusions;
2393 var arg_request = buildLogExclusion();
2394 var arg_name = "foo";
2395 var arg_updateMask = "foo";
2396 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2397 var obj = new api.LogExclusion.fromJson(json);
2398 checkLogExclusion(obj);
2399
2400 var path = (req.url).path;
2401 var pathOffset = 0;
2402 var index;
2403 var subPart;
2404 unittest.expect(
2405 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2406 pathOffset += 1;
2407 unittest.expect(
2408 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2409 pathOffset += 3;
2410 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2411
2412 var query = (req.url).query;
2413 var queryOffset = 0;
2414 var queryMap = {};
2415 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2416 parseBool(n) {
2417 if (n == "true") return true;
2418 if (n == "false") return false;
2419 if (n == null) return null;
2420 throw new core.ArgumentError("Invalid boolean: $n");
2421 }
2422
2423 if (query.length > 0) {
2424 for (var part in query.split("&")) {
2425 var keyvalue = part.split("=");
2426 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2427 core.Uri.decodeQueryComponent(keyvalue[1]));
2428 }
2429 }
2430 unittest.expect(
2431 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
2432
2433 var h = {
2434 "content-type": "application/json; charset=utf-8",
2435 };
2436 var resp = convert.JSON.encode(buildLogExclusion());
2437 return new async.Future.value(stringResponse(200, h, resp));
2438 }), true);
2439 res
2440 .patch(arg_request, arg_name, updateMask: arg_updateMask)
2441 .then(unittest.expectAsync1(((api.LogExclusion response) {
2442 checkLogExclusion(response);
2443 })));
2444 });
2445 });
2446
2447 unittest.group("resource-FoldersLogsResourceApi", () {
2448 unittest.test("method--delete", () {
2449 var mock = new HttpServerMock();
2450 api.FoldersLogsResourceApi res = new api.LoggingApi(mock).folders.logs;
2451 var arg_logName = "foo";
2452 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2453 var path = (req.url).path;
2454 var pathOffset = 0;
2455 var index;
2456 var subPart;
2457 unittest.expect(
2458 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2459 pathOffset += 1;
2460 unittest.expect(
2461 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2462 pathOffset += 3;
2463 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2464
2465 var query = (req.url).query;
2466 var queryOffset = 0;
2467 var queryMap = {};
2468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2469 parseBool(n) {
2470 if (n == "true") return true;
2471 if (n == "false") return false;
2472 if (n == null) return null;
2473 throw new core.ArgumentError("Invalid boolean: $n");
2474 }
2475
2476 if (query.length > 0) {
2477 for (var part in query.split("&")) {
2478 var keyvalue = part.split("=");
2479 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2480 core.Uri.decodeQueryComponent(keyvalue[1]));
2481 }
2482 }
2483
2484 var h = {
2485 "content-type": "application/json; charset=utf-8",
2486 };
2487 var resp = convert.JSON.encode(buildEmpty());
2488 return new async.Future.value(stringResponse(200, h, resp));
2489 }), true);
2490 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) {
2491 checkEmpty(response);
2492 })));
2493 });
2494
2495 unittest.test("method--list", () {
2496 var mock = new HttpServerMock();
2497 api.FoldersLogsResourceApi res = new api.LoggingApi(mock).folders.logs;
2498 var arg_parent = "foo";
2499 var arg_pageToken = "foo";
2500 var arg_pageSize = 42;
2501 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2502 var path = (req.url).path;
2503 var pathOffset = 0;
2504 var index;
2505 var subPart;
2506 unittest.expect(
2507 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2508 pathOffset += 1;
2509 unittest.expect(
2510 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2511 pathOffset += 3;
2512 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2513
2514 var query = (req.url).query;
2515 var queryOffset = 0;
2516 var queryMap = {};
2517 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2518 parseBool(n) {
2519 if (n == "true") return true;
2520 if (n == "false") return false;
2521 if (n == null) return null;
2522 throw new core.ArgumentError("Invalid boolean: $n");
2523 }
2524
2525 if (query.length > 0) {
2526 for (var part in query.split("&")) {
2527 var keyvalue = part.split("=");
2528 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2529 core.Uri.decodeQueryComponent(keyvalue[1]));
2530 }
2531 }
2532 unittest.expect(
2533 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2534 unittest.expect(core.int.parse(queryMap["pageSize"].first),
2535 unittest.equals(arg_pageSize));
2536
2537 var h = {
2538 "content-type": "application/json; charset=utf-8",
1654 }; 2539 };
1655 var resp = convert.JSON.encode(buildListLogsResponse()); 2540 var resp = convert.JSON.encode(buildListLogsResponse());
1656 return new async.Future.value(stringResponse(200, h, resp)); 2541 return new async.Future.value(stringResponse(200, h, resp));
1657 }), true); 2542 }), true);
1658 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListLogsResponse response) { 2543 res
2544 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
2545 .then(unittest.expectAsync1(((api.ListLogsResponse response) {
1659 checkListLogsResponse(response); 2546 checkListLogsResponse(response);
1660 }))); 2547 })));
1661 }); 2548 });
1662
1663 }); 2549 });
1664 2550
1665
1666 unittest.group("resource-FoldersSinksResourceApi", () { 2551 unittest.group("resource-FoldersSinksResourceApi", () {
1667 unittest.test("method--create", () { 2552 unittest.test("method--create", () {
1668
1669 var mock = new HttpServerMock(); 2553 var mock = new HttpServerMock();
1670 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; 2554 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
1671 var arg_request = buildLogSink(); 2555 var arg_request = buildLogSink();
1672 var arg_parent = "foo"; 2556 var arg_parent = "foo";
1673 var arg_uniqueWriterIdentity = true; 2557 var arg_uniqueWriterIdentity = true;
1674 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2558 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1675 var obj = new api.LogSink.fromJson(json); 2559 var obj = new api.LogSink.fromJson(json);
1676 checkLogSink(obj); 2560 checkLogSink(obj);
1677 2561
1678 var path = (req.url).path; 2562 var path = (req.url).path;
1679 var pathOffset = 0; 2563 var pathOffset = 0;
1680 var index; 2564 var index;
1681 var subPart; 2565 var subPart;
1682 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2566 unittest.expect(
1683 pathOffset += 1; 2567 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1684 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 2568 pathOffset += 1;
1685 pathOffset += 3; 2569 unittest.expect(
1686 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2570 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1687 2571 pathOffset += 3;
2572 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2573
2574 var query = (req.url).query;
2575 var queryOffset = 0;
2576 var queryMap = {};
2577 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2578 parseBool(n) {
2579 if (n == "true") return true;
2580 if (n == "false") return false;
2581 if (n == null) return null;
2582 throw new core.ArgumentError("Invalid boolean: $n");
2583 }
2584
2585 if (query.length > 0) {
2586 for (var part in query.split("&")) {
2587 var keyvalue = part.split("=");
2588 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2589 core.Uri.decodeQueryComponent(keyvalue[1]));
2590 }
2591 }
2592 unittest.expect(queryMap["uniqueWriterIdentity"].first,
2593 unittest.equals("$arg_uniqueWriterIdentity"));
2594
2595 var h = {
2596 "content-type": "application/json; charset=utf-8",
2597 };
2598 var resp = convert.JSON.encode(buildLogSink());
2599 return new async.Future.value(stringResponse(200, h, resp));
2600 }), true);
2601 res
2602 .create(arg_request, arg_parent,
2603 uniqueWriterIdentity: arg_uniqueWriterIdentity)
2604 .then(unittest.expectAsync1(((api.LogSink response) {
2605 checkLogSink(response);
2606 })));
2607 });
2608
2609 unittest.test("method--delete", () {
2610 var mock = new HttpServerMock();
2611 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
2612 var arg_sinkName = "foo";
2613 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2614 var path = (req.url).path;
2615 var pathOffset = 0;
2616 var index;
2617 var subPart;
2618 unittest.expect(
2619 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2620 pathOffset += 1;
2621 unittest.expect(
2622 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2623 pathOffset += 3;
2624 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2625
2626 var query = (req.url).query;
2627 var queryOffset = 0;
2628 var queryMap = {};
2629 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2630 parseBool(n) {
2631 if (n == "true") return true;
2632 if (n == "false") return false;
2633 if (n == null) return null;
2634 throw new core.ArgumentError("Invalid boolean: $n");
2635 }
2636
2637 if (query.length > 0) {
2638 for (var part in query.split("&")) {
2639 var keyvalue = part.split("=");
2640 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2641 core.Uri.decodeQueryComponent(keyvalue[1]));
2642 }
2643 }
2644
2645 var h = {
2646 "content-type": "application/json; charset=utf-8",
2647 };
2648 var resp = convert.JSON.encode(buildEmpty());
2649 return new async.Future.value(stringResponse(200, h, resp));
2650 }), true);
2651 res
2652 .delete(arg_sinkName)
2653 .then(unittest.expectAsync1(((api.Empty response) {
2654 checkEmpty(response);
2655 })));
2656 });
2657
2658 unittest.test("method--get", () {
2659 var mock = new HttpServerMock();
2660 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
2661 var arg_sinkName = "foo";
2662 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2663 var path = (req.url).path;
2664 var pathOffset = 0;
2665 var index;
2666 var subPart;
2667 unittest.expect(
2668 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2669 pathOffset += 1;
2670 unittest.expect(
2671 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2672 pathOffset += 3;
2673 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2674
2675 var query = (req.url).query;
2676 var queryOffset = 0;
2677 var queryMap = {};
2678 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2679 parseBool(n) {
2680 if (n == "true") return true;
2681 if (n == "false") return false;
2682 if (n == null) return null;
2683 throw new core.ArgumentError("Invalid boolean: $n");
2684 }
2685
2686 if (query.length > 0) {
2687 for (var part in query.split("&")) {
2688 var keyvalue = part.split("=");
2689 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2690 core.Uri.decodeQueryComponent(keyvalue[1]));
2691 }
2692 }
2693
2694 var h = {
2695 "content-type": "application/json; charset=utf-8",
2696 };
2697 var resp = convert.JSON.encode(buildLogSink());
2698 return new async.Future.value(stringResponse(200, h, resp));
2699 }), true);
2700 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) {
2701 checkLogSink(response);
2702 })));
2703 });
2704
2705 unittest.test("method--list", () {
2706 var mock = new HttpServerMock();
2707 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
2708 var arg_parent = "foo";
2709 var arg_pageToken = "foo";
2710 var arg_pageSize = 42;
2711 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2712 var path = (req.url).path;
2713 var pathOffset = 0;
2714 var index;
2715 var subPart;
2716 unittest.expect(
2717 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2718 pathOffset += 1;
2719 unittest.expect(
2720 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2721 pathOffset += 3;
2722 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2723
2724 var query = (req.url).query;
2725 var queryOffset = 0;
2726 var queryMap = {};
2727 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2728 parseBool(n) {
2729 if (n == "true") return true;
2730 if (n == "false") return false;
2731 if (n == null) return null;
2732 throw new core.ArgumentError("Invalid boolean: $n");
2733 }
2734
2735 if (query.length > 0) {
2736 for (var part in query.split("&")) {
2737 var keyvalue = part.split("=");
2738 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2739 core.Uri.decodeQueryComponent(keyvalue[1]));
2740 }
2741 }
2742 unittest.expect(
2743 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2744 unittest.expect(core.int.parse(queryMap["pageSize"].first),
2745 unittest.equals(arg_pageSize));
2746
2747 var h = {
2748 "content-type": "application/json; charset=utf-8",
2749 };
2750 var resp = convert.JSON.encode(buildListSinksResponse());
2751 return new async.Future.value(stringResponse(200, h, resp));
2752 }), true);
2753 res
2754 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
2755 .then(unittest.expectAsync1(((api.ListSinksResponse response) {
2756 checkListSinksResponse(response);
2757 })));
2758 });
2759
2760 unittest.test("method--patch", () {
2761 var mock = new HttpServerMock();
2762 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
2763 var arg_request = buildLogSink();
2764 var arg_sinkName = "foo";
2765 var arg_updateMask = "foo";
2766 var arg_uniqueWriterIdentity = true;
2767 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2768 var obj = new api.LogSink.fromJson(json);
2769 checkLogSink(obj);
2770
2771 var path = (req.url).path;
2772 var pathOffset = 0;
2773 var index;
2774 var subPart;
2775 unittest.expect(
2776 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2777 pathOffset += 1;
2778 unittest.expect(
2779 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2780 pathOffset += 3;
2781 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2782
2783 var query = (req.url).query;
2784 var queryOffset = 0;
2785 var queryMap = {};
2786 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2787 parseBool(n) {
2788 if (n == "true") return true;
2789 if (n == "false") return false;
2790 if (n == null) return null;
2791 throw new core.ArgumentError("Invalid boolean: $n");
2792 }
2793
2794 if (query.length > 0) {
2795 for (var part in query.split("&")) {
2796 var keyvalue = part.split("=");
2797 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2798 core.Uri.decodeQueryComponent(keyvalue[1]));
2799 }
2800 }
2801 unittest.expect(
2802 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
2803 unittest.expect(queryMap["uniqueWriterIdentity"].first,
2804 unittest.equals("$arg_uniqueWriterIdentity"));
2805
2806 var h = {
2807 "content-type": "application/json; charset=utf-8",
2808 };
2809 var resp = convert.JSON.encode(buildLogSink());
2810 return new async.Future.value(stringResponse(200, h, resp));
2811 }), true);
2812 res
2813 .patch(arg_request, arg_sinkName,
2814 updateMask: arg_updateMask,
2815 uniqueWriterIdentity: arg_uniqueWriterIdentity)
2816 .then(unittest.expectAsync1(((api.LogSink response) {
2817 checkLogSink(response);
2818 })));
2819 });
2820
2821 unittest.test("method--update", () {
2822 var mock = new HttpServerMock();
2823 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
2824 var arg_request = buildLogSink();
2825 var arg_sinkName = "foo";
2826 var arg_updateMask = "foo";
2827 var arg_uniqueWriterIdentity = true;
2828 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2829 var obj = new api.LogSink.fromJson(json);
2830 checkLogSink(obj);
2831
2832 var path = (req.url).path;
2833 var pathOffset = 0;
2834 var index;
2835 var subPart;
2836 unittest.expect(
2837 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2838 pathOffset += 1;
2839 unittest.expect(
2840 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2841 pathOffset += 3;
2842 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2843
2844 var query = (req.url).query;
2845 var queryOffset = 0;
2846 var queryMap = {};
2847 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2848 parseBool(n) {
2849 if (n == "true") return true;
2850 if (n == "false") return false;
2851 if (n == null) return null;
2852 throw new core.ArgumentError("Invalid boolean: $n");
2853 }
2854
2855 if (query.length > 0) {
2856 for (var part in query.split("&")) {
2857 var keyvalue = part.split("=");
2858 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2859 core.Uri.decodeQueryComponent(keyvalue[1]));
2860 }
2861 }
2862 unittest.expect(
2863 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
2864 unittest.expect(queryMap["uniqueWriterIdentity"].first,
2865 unittest.equals("$arg_uniqueWriterIdentity"));
2866
2867 var h = {
2868 "content-type": "application/json; charset=utf-8",
2869 };
2870 var resp = convert.JSON.encode(buildLogSink());
2871 return new async.Future.value(stringResponse(200, h, resp));
2872 }), true);
2873 res
2874 .update(arg_request, arg_sinkName,
2875 updateMask: arg_updateMask,
2876 uniqueWriterIdentity: arg_uniqueWriterIdentity)
2877 .then(unittest.expectAsync1(((api.LogSink response) {
2878 checkLogSink(response);
2879 })));
2880 });
2881 });
2882
2883 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () {
2884 unittest.test("method--list", () {
2885 var mock = new HttpServerMock();
2886 api.MonitoredResourceDescriptorsResourceApi res =
2887 new api.LoggingApi(mock).monitoredResourceDescriptors;
2888 var arg_pageToken = "foo";
2889 var arg_pageSize = 42;
2890 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2891 var path = (req.url).path;
2892 var pathOffset = 0;
2893 var index;
2894 var subPart;
2895 unittest.expect(
2896 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2897 pathOffset += 1;
2898 unittest.expect(path.substring(pathOffset, pathOffset + 31),
2899 unittest.equals("v2/monitoredResourceDescriptors"));
2900 pathOffset += 31;
2901
2902 var query = (req.url).query;
2903 var queryOffset = 0;
2904 var queryMap = {};
2905 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2906 parseBool(n) {
2907 if (n == "true") return true;
2908 if (n == "false") return false;
2909 if (n == null) return null;
2910 throw new core.ArgumentError("Invalid boolean: $n");
2911 }
2912
2913 if (query.length > 0) {
2914 for (var part in query.split("&")) {
2915 var keyvalue = part.split("=");
2916 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2917 core.Uri.decodeQueryComponent(keyvalue[1]));
2918 }
2919 }
2920 unittest.expect(
2921 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2922 unittest.expect(core.int.parse(queryMap["pageSize"].first),
2923 unittest.equals(arg_pageSize));
2924
2925 var h = {
2926 "content-type": "application/json; charset=utf-8",
2927 };
2928 var resp = convert.JSON
2929 .encode(buildListMonitoredResourceDescriptorsResponse());
2930 return new async.Future.value(stringResponse(200, h, resp));
2931 }), true);
2932 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest
2933 .expectAsync1(
2934 ((api.ListMonitoredResourceDescriptorsResponse response) {
2935 checkListMonitoredResourceDescriptorsResponse(response);
2936 })));
2937 });
2938 });
2939
2940 unittest.group("resource-OrganizationsExclusionsResourceApi", () {
2941 unittest.test("method--create", () {
2942 var mock = new HttpServerMock();
2943 api.OrganizationsExclusionsResourceApi res =
2944 new api.LoggingApi(mock).organizations.exclusions;
2945 var arg_request = buildLogExclusion();
2946 var arg_parent = "foo";
2947 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2948 var obj = new api.LogExclusion.fromJson(json);
2949 checkLogExclusion(obj);
2950
2951 var path = (req.url).path;
2952 var pathOffset = 0;
2953 var index;
2954 var subPart;
2955 unittest.expect(
2956 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2957 pathOffset += 1;
2958 unittest.expect(
2959 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2960 pathOffset += 3;
2961 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2962
2963 var query = (req.url).query;
2964 var queryOffset = 0;
2965 var queryMap = {};
2966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2967 parseBool(n) {
2968 if (n == "true") return true;
2969 if (n == "false") return false;
2970 if (n == null) return null;
2971 throw new core.ArgumentError("Invalid boolean: $n");
2972 }
2973
2974 if (query.length > 0) {
2975 for (var part in query.split("&")) {
2976 var keyvalue = part.split("=");
2977 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2978 core.Uri.decodeQueryComponent(keyvalue[1]));
2979 }
2980 }
2981
2982 var h = {
2983 "content-type": "application/json; charset=utf-8",
2984 };
2985 var resp = convert.JSON.encode(buildLogExclusion());
2986 return new async.Future.value(stringResponse(200, h, resp));
2987 }), true);
2988 res
2989 .create(arg_request, arg_parent)
2990 .then(unittest.expectAsync1(((api.LogExclusion response) {
2991 checkLogExclusion(response);
2992 })));
2993 });
2994
2995 unittest.test("method--delete", () {
2996 var mock = new HttpServerMock();
2997 api.OrganizationsExclusionsResourceApi res =
2998 new api.LoggingApi(mock).organizations.exclusions;
2999 var arg_name = "foo";
3000 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3001 var path = (req.url).path;
3002 var pathOffset = 0;
3003 var index;
3004 var subPart;
3005 unittest.expect(
3006 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
3007 pathOffset += 1;
3008 unittest.expect(
3009 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
3010 pathOffset += 3;
3011 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
3012
3013 var query = (req.url).query;
3014 var queryOffset = 0;
3015 var queryMap = {};
3016 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3017 parseBool(n) {
3018 if (n == "true") return true;
3019 if (n == "false") return false;
3020 if (n == null) return null;
3021 throw new core.ArgumentError("Invalid boolean: $n");
3022 }
3023
3024 if (query.length > 0) {
3025 for (var part in query.split("&")) {
3026 var keyvalue = part.split("=");
3027 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3028 core.Uri.decodeQueryComponent(keyvalue[1]));
3029 }
3030 }
3031
3032 var h = {
3033 "content-type": "application/json; charset=utf-8",
3034 };
3035 var resp = convert.JSON.encode(buildEmpty());
3036 return new async.Future.value(stringResponse(200, h, resp));
3037 }), true);
3038 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) {
3039 checkEmpty(response);
3040 })));
3041 });
3042
3043 unittest.test("method--get", () {
3044 var mock = new HttpServerMock();
3045 api.OrganizationsExclusionsResourceApi res =
3046 new api.LoggingApi(mock).organizations.exclusions;
3047 var arg_name = "foo";
3048 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3049 var path = (req.url).path;
3050 var pathOffset = 0;
3051 var index;
3052 var subPart;
3053 unittest.expect(
3054 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
3055 pathOffset += 1;
3056 unittest.expect(
3057 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
3058 pathOffset += 3;
3059 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
3060
3061 var query = (req.url).query;
3062 var queryOffset = 0;
3063 var queryMap = {};
3064 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3065 parseBool(n) {
3066 if (n == "true") return true;
3067 if (n == "false") return false;
3068 if (n == null) return null;
3069 throw new core.ArgumentError("Invalid boolean: $n");
3070 }
3071
3072 if (query.length > 0) {
3073 for (var part in query.split("&")) {
3074 var keyvalue = part.split("=");
3075 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3076 core.Uri.decodeQueryComponent(keyvalue[1]));
3077 }
3078 }
3079
3080 var h = {
3081 "content-type": "application/json; charset=utf-8",
3082 };
3083 var resp = convert.JSON.encode(buildLogExclusion());
3084 return new async.Future.value(stringResponse(200, h, resp));
3085 }), true);
3086 res
3087 .get(arg_name)
3088 .then(unittest.expectAsync1(((api.LogExclusion response) {
3089 checkLogExclusion(response);
3090 })));
3091 });
3092
3093 unittest.test("method--list", () {
3094 var mock = new HttpServerMock();
3095 api.OrganizationsExclusionsResourceApi res =
3096 new api.LoggingApi(mock).organizations.exclusions;
3097 var arg_parent = "foo";
3098 var arg_pageToken = "foo";
3099 var arg_pageSize = 42;
3100 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3101 var path = (req.url).path;
3102 var pathOffset = 0;
3103 var index;
3104 var subPart;
3105 unittest.expect(
3106 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
3107 pathOffset += 1;
3108 unittest.expect(
3109 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
3110 pathOffset += 3;
3111 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
3112
1688 var query = (req.url).query; 3113 var query = (req.url).query;
1689 var queryOffset = 0; 3114 var queryOffset = 0;
1690 var queryMap = {}; 3115 var queryMap = {};
1691 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3116 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1692 parseBool(n) { 3117 parseBool(n) {
1693 if (n == "true") return true; 3118 if (n == "true") return true;
1694 if (n == "false") return false; 3119 if (n == "false") return false;
1695 if (n == null) return null; 3120 if (n == null) return null;
1696 throw new core.ArgumentError("Invalid boolean: $n"); 3121 throw new core.ArgumentError("Invalid boolean: $n");
1697 } 3122 }
3123
1698 if (query.length > 0) { 3124 if (query.length > 0) {
1699 for (var part in query.split("&")) { 3125 for (var part in query.split("&")) {
1700 var keyvalue = part.split("="); 3126 var keyvalue = part.split("=");
1701 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3127 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3128 core.Uri.decodeQueryComponent(keyvalue[1]));
1702 } 3129 }
1703 } 3130 }
1704 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 3131 unittest.expect(
1705 3132 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
3133 unittest.expect(core.int.parse(queryMap["pageSize"].first),
3134 unittest.equals(arg_pageSize));
1706 3135
1707 var h = { 3136 var h = {
1708 "content-type" : "application/json; charset=utf-8", 3137 "content-type": "application/json; charset=utf-8",
1709 }; 3138 };
1710 var resp = convert.JSON.encode(buildLogSink()); 3139 var resp = convert.JSON.encode(buildListExclusionsResponse());
1711 return new async.Future.value(stringResponse(200, h, resp)); 3140 return new async.Future.value(stringResponse(200, h, resp));
1712 }), true); 3141 }), true);
1713 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter Identity).then(unittest.expectAsync1(((api.LogSink response) { 3142 res
1714 checkLogSink(response); 3143 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
3144 .then(unittest.expectAsync1(((api.ListExclusionsResponse response) {
3145 checkListExclusionsResponse(response);
1715 }))); 3146 })));
1716 }); 3147 });
1717 3148
1718 unittest.test("method--delete", () { 3149 unittest.test("method--patch", () {
3150 var mock = new HttpServerMock();
3151 api.OrganizationsExclusionsResourceApi res =
3152 new api.LoggingApi(mock).organizations.exclusions;
3153 var arg_request = buildLogExclusion();
3154 var arg_name = "foo";
3155 var arg_updateMask = "foo";
3156 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3157 var obj = new api.LogExclusion.fromJson(json);
3158 checkLogExclusion(obj);
1719 3159
1720 var mock = new HttpServerMock();
1721 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks;
1722 var arg_sinkName = "foo";
1723 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1724 var path = (req.url).path; 3160 var path = (req.url).path;
1725 var pathOffset = 0; 3161 var pathOffset = 0;
1726 var index; 3162 var index;
1727 var subPart; 3163 var subPart;
1728 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3164 unittest.expect(
3165 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1729 pathOffset += 1; 3166 pathOffset += 1;
1730 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3167 unittest.expect(
3168 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1731 pathOffset += 3; 3169 pathOffset += 3;
1732 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3170 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1733 3171
1734 var query = (req.url).query; 3172 var query = (req.url).query;
1735 var queryOffset = 0; 3173 var queryOffset = 0;
1736 var queryMap = {}; 3174 var queryMap = {};
1737 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3175 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1738 parseBool(n) { 3176 parseBool(n) {
1739 if (n == "true") return true; 3177 if (n == "true") return true;
1740 if (n == "false") return false; 3178 if (n == "false") return false;
1741 if (n == null) return null; 3179 if (n == null) return null;
1742 throw new core.ArgumentError("Invalid boolean: $n"); 3180 throw new core.ArgumentError("Invalid boolean: $n");
1743 } 3181 }
3182
1744 if (query.length > 0) { 3183 if (query.length > 0) {
1745 for (var part in query.split("&")) { 3184 for (var part in query.split("&")) {
1746 var keyvalue = part.split("="); 3185 var keyvalue = part.split("=");
1747 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3186 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3187 core.Uri.decodeQueryComponent(keyvalue[1]));
1748 } 3188 }
1749 } 3189 }
1750 3190 unittest.expect(
3191 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
1751 3192
1752 var h = { 3193 var h = {
1753 "content-type" : "application/json; charset=utf-8", 3194 "content-type": "application/json; charset=utf-8",
1754 }; 3195 };
1755 var resp = convert.JSON.encode(buildEmpty()); 3196 var resp = convert.JSON.encode(buildLogExclusion());
1756 return new async.Future.value(stringResponse(200, h, resp)); 3197 return new async.Future.value(stringResponse(200, h, resp));
1757 }), true); 3198 }), true);
1758 res.delete(arg_sinkName).then(unittest.expectAsync1(((api.Empty response) { 3199 res
1759 checkEmpty(response); 3200 .patch(arg_request, arg_name, updateMask: arg_updateMask)
3201 .then(unittest.expectAsync1(((api.LogExclusion response) {
3202 checkLogExclusion(response);
1760 }))); 3203 })));
1761 }); 3204 });
3205 });
1762 3206
1763 unittest.test("method--get", () { 3207 unittest.group("resource-OrganizationsLogsResourceApi", () {
1764 3208 unittest.test("method--delete", () {
1765 var mock = new HttpServerMock(); 3209 var mock = new HttpServerMock();
1766 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; 3210 api.OrganizationsLogsResourceApi res =
1767 var arg_sinkName = "foo"; 3211 new api.LoggingApi(mock).organizations.logs;
3212 var arg_logName = "foo";
1768 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3213 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1769 var path = (req.url).path; 3214 var path = (req.url).path;
1770 var pathOffset = 0; 3215 var pathOffset = 0;
1771 var index; 3216 var index;
1772 var subPart; 3217 var subPart;
1773 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3218 unittest.expect(
3219 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1774 pathOffset += 1; 3220 pathOffset += 1;
1775 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3221 unittest.expect(
3222 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1776 pathOffset += 3; 3223 pathOffset += 3;
1777 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3224 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1778 3225
1779 var query = (req.url).query; 3226 var query = (req.url).query;
1780 var queryOffset = 0; 3227 var queryOffset = 0;
1781 var queryMap = {}; 3228 var queryMap = {};
1782 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3229 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1783 parseBool(n) { 3230 parseBool(n) {
1784 if (n == "true") return true; 3231 if (n == "true") return true;
1785 if (n == "false") return false; 3232 if (n == "false") return false;
1786 if (n == null) return null; 3233 if (n == null) return null;
1787 throw new core.ArgumentError("Invalid boolean: $n"); 3234 throw new core.ArgumentError("Invalid boolean: $n");
1788 } 3235 }
3236
1789 if (query.length > 0) { 3237 if (query.length > 0) {
1790 for (var part in query.split("&")) { 3238 for (var part in query.split("&")) {
1791 var keyvalue = part.split("="); 3239 var keyvalue = part.split("=");
1792 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3240 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3241 core.Uri.decodeQueryComponent(keyvalue[1]));
1793 } 3242 }
1794 } 3243 }
1795 3244
1796
1797 var h = { 3245 var h = {
1798 "content-type" : "application/json; charset=utf-8", 3246 "content-type": "application/json; charset=utf-8",
1799 }; 3247 };
1800 var resp = convert.JSON.encode(buildLogSink()); 3248 var resp = convert.JSON.encode(buildEmpty());
1801 return new async.Future.value(stringResponse(200, h, resp)); 3249 return new async.Future.value(stringResponse(200, h, resp));
1802 }), true); 3250 }), true);
1803 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { 3251 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) {
1804 checkLogSink(response); 3252 checkEmpty(response);
1805 }))); 3253 })));
1806 }); 3254 });
1807 3255
1808 unittest.test("method--list", () { 3256 unittest.test("method--list", () {
1809
1810 var mock = new HttpServerMock(); 3257 var mock = new HttpServerMock();
1811 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; 3258 api.OrganizationsLogsResourceApi res =
3259 new api.LoggingApi(mock).organizations.logs;
1812 var arg_parent = "foo"; 3260 var arg_parent = "foo";
1813 var arg_pageToken = "foo"; 3261 var arg_pageToken = "foo";
1814 var arg_pageSize = 42; 3262 var arg_pageSize = 42;
1815 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3263 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1816 var path = (req.url).path; 3264 var path = (req.url).path;
1817 var pathOffset = 0; 3265 var pathOffset = 0;
1818 var index; 3266 var index;
1819 var subPart; 3267 var subPart;
1820 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3268 unittest.expect(
3269 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1821 pathOffset += 1; 3270 pathOffset += 1;
1822 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3271 unittest.expect(
3272 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1823 pathOffset += 3; 3273 pathOffset += 3;
1824 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3274 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1825 3275
1826 var query = (req.url).query; 3276 var query = (req.url).query;
1827 var queryOffset = 0; 3277 var queryOffset = 0;
1828 var queryMap = {}; 3278 var queryMap = {};
1829 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3279 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1830 parseBool(n) { 3280 parseBool(n) {
1831 if (n == "true") return true; 3281 if (n == "true") return true;
1832 if (n == "false") return false; 3282 if (n == "false") return false;
1833 if (n == null) return null; 3283 if (n == null) return null;
1834 throw new core.ArgumentError("Invalid boolean: $n"); 3284 throw new core.ArgumentError("Invalid boolean: $n");
1835 } 3285 }
3286
1836 if (query.length > 0) { 3287 if (query.length > 0) {
1837 for (var part in query.split("&")) { 3288 for (var part in query.split("&")) {
1838 var keyvalue = part.split("="); 3289 var keyvalue = part.split("=");
1839 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3290 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3291 core.Uri.decodeQueryComponent(keyvalue[1]));
1840 } 3292 }
1841 } 3293 }
1842 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 3294 unittest.expect(
1843 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 3295 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
1844 3296 unittest.expect(core.int.parse(queryMap["pageSize"].first),
3297 unittest.equals(arg_pageSize));
1845 3298
1846 var h = { 3299 var h = {
1847 "content-type" : "application/json; charset=utf-8", 3300 "content-type": "application/json; charset=utf-8",
1848 }; 3301 };
1849 var resp = convert.JSON.encode(buildListSinksResponse()); 3302 var resp = convert.JSON.encode(buildListLogsResponse());
1850 return new async.Future.value(stringResponse(200, h, resp)); 3303 return new async.Future.value(stringResponse(200, h, resp));
1851 }), true); 3304 }), true);
1852 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListSinksResponse response) { 3305 res
1853 checkListSinksResponse(response); 3306 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
3307 .then(unittest.expectAsync1(((api.ListLogsResponse response) {
3308 checkListLogsResponse(response);
1854 }))); 3309 })));
1855 }); 3310 });
3311 });
1856 3312
1857 unittest.test("method--patch", () { 3313 unittest.group("resource-OrganizationsSinksResourceApi", () {
1858 3314 unittest.test("method--create", () {
1859 var mock = new HttpServerMock(); 3315 var mock = new HttpServerMock();
1860 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; 3316 api.OrganizationsSinksResourceApi res =
3317 new api.LoggingApi(mock).organizations.sinks;
1861 var arg_request = buildLogSink(); 3318 var arg_request = buildLogSink();
1862 var arg_sinkName = "foo"; 3319 var arg_parent = "foo";
1863 var arg_uniqueWriterIdentity = true; 3320 var arg_uniqueWriterIdentity = true;
1864 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3321 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1865 var obj = new api.LogSink.fromJson(json); 3322 var obj = new api.LogSink.fromJson(json);
1866 checkLogSink(obj); 3323 checkLogSink(obj);
1867 3324
1868 var path = (req.url).path; 3325 var path = (req.url).path;
1869 var pathOffset = 0; 3326 var pathOffset = 0;
1870 var index; 3327 var index;
1871 var subPart; 3328 var subPart;
1872 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3329 unittest.expect(
3330 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1873 pathOffset += 1; 3331 pathOffset += 1;
1874 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3332 unittest.expect(
3333 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1875 pathOffset += 3; 3334 pathOffset += 3;
1876 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3335 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1877 3336
1878 var query = (req.url).query; 3337 var query = (req.url).query;
1879 var queryOffset = 0; 3338 var queryOffset = 0;
1880 var queryMap = {}; 3339 var queryMap = {};
1881 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3340 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1882 parseBool(n) { 3341 parseBool(n) {
1883 if (n == "true") return true; 3342 if (n == "true") return true;
1884 if (n == "false") return false; 3343 if (n == "false") return false;
1885 if (n == null) return null; 3344 if (n == null) return null;
1886 throw new core.ArgumentError("Invalid boolean: $n"); 3345 throw new core.ArgumentError("Invalid boolean: $n");
1887 } 3346 }
3347
1888 if (query.length > 0) { 3348 if (query.length > 0) {
1889 for (var part in query.split("&")) { 3349 for (var part in query.split("&")) {
1890 var keyvalue = part.split("="); 3350 var keyvalue = part.split("=");
1891 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3351 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3352 core.Uri.decodeQueryComponent(keyvalue[1]));
1892 } 3353 }
1893 } 3354 }
1894 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 3355 unittest.expect(queryMap["uniqueWriterIdentity"].first,
1895 3356 unittest.equals("$arg_uniqueWriterIdentity"));
1896 3357
1897 var h = { 3358 var h = {
1898 "content-type" : "application/json; charset=utf-8", 3359 "content-type": "application/json; charset=utf-8",
1899 }; 3360 };
1900 var resp = convert.JSON.encode(buildLogSink()); 3361 var resp = convert.JSON.encode(buildLogSink());
1901 return new async.Future.value(stringResponse(200, h, resp)); 3362 return new async.Future.value(stringResponse(200, h, resp));
1902 }), true); 3363 }), true);
1903 res.patch(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrite rIdentity).then(unittest.expectAsync1(((api.LogSink response) { 3364 res
3365 .create(arg_request, arg_parent,
3366 uniqueWriterIdentity: arg_uniqueWriterIdentity)
3367 .then(unittest.expectAsync1(((api.LogSink response) {
1904 checkLogSink(response); 3368 checkLogSink(response);
1905 }))); 3369 })));
1906 }); 3370 });
1907 3371
1908 unittest.test("method--update", () { 3372 unittest.test("method--delete", () {
1909
1910 var mock = new HttpServerMock(); 3373 var mock = new HttpServerMock();
1911 api.FoldersSinksResourceApi res = new api.LoggingApi(mock).folders.sinks; 3374 api.OrganizationsSinksResourceApi res =
1912 var arg_request = buildLogSink(); 3375 new api.LoggingApi(mock).organizations.sinks;
1913 var arg_sinkName = "foo"; 3376 var arg_sinkName = "foo";
1914 var arg_uniqueWriterIdentity = true;
1915 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3377 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1916 var obj = new api.LogSink.fromJson(json);
1917 checkLogSink(obj);
1918
1919 var path = (req.url).path; 3378 var path = (req.url).path;
1920 var pathOffset = 0; 3379 var pathOffset = 0;
1921 var index; 3380 var index;
1922 var subPart; 3381 var subPart;
1923 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3382 unittest.expect(
3383 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1924 pathOffset += 1; 3384 pathOffset += 1;
1925 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3385 unittest.expect(
3386 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
1926 pathOffset += 3; 3387 pathOffset += 3;
1927 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3388 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1928 3389
1929 var query = (req.url).query; 3390 var query = (req.url).query;
1930 var queryOffset = 0; 3391 var queryOffset = 0;
1931 var queryMap = {}; 3392 var queryMap = {};
1932 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3393 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1933 parseBool(n) { 3394 parseBool(n) {
1934 if (n == "true") return true; 3395 if (n == "true") return true;
1935 if (n == "false") return false; 3396 if (n == "false") return false;
1936 if (n == null) return null; 3397 if (n == null) return null;
1937 throw new core.ArgumentError("Invalid boolean: $n"); 3398 throw new core.ArgumentError("Invalid boolean: $n");
1938 } 3399 }
3400
1939 if (query.length > 0) { 3401 if (query.length > 0) {
1940 for (var part in query.split("&")) { 3402 for (var part in query.split("&")) {
1941 var keyvalue = part.split("="); 3403 var keyvalue = part.split("=");
1942 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3404 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3405 core.Uri.decodeQueryComponent(keyvalue[1]));
1943 } 3406 }
1944 } 3407 }
1945 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity"));
1946
1947 3408
1948 var h = { 3409 var h = {
1949 "content-type" : "application/json; charset=utf-8", 3410 "content-type": "application/json; charset=utf-8",
1950 }; 3411 };
1951 var resp = convert.JSON.encode(buildLogSink()); 3412 var resp = convert.JSON.encode(buildEmpty());
1952 return new async.Future.value(stringResponse(200, h, resp)); 3413 return new async.Future.value(stringResponse(200, h, resp));
1953 }), true); 3414 }), true);
1954 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit erIdentity).then(unittest.expectAsync1(((api.LogSink response) { 3415 res
1955 checkLogSink(response); 3416 .delete(arg_sinkName)
3417 .then(unittest.expectAsync1(((api.Empty response) {
3418 checkEmpty(response);
1956 }))); 3419 })));
1957 }); 3420 });
1958 3421
1959 }); 3422 unittest.test("method--get", () {
1960
1961
1962 unittest.group("resource-MonitoredResourceDescriptorsResourceApi", () {
1963 unittest.test("method--list", () {
1964
1965 var mock = new HttpServerMock(); 3423 var mock = new HttpServerMock();
1966 api.MonitoredResourceDescriptorsResourceApi res = new api.LoggingApi(mock) .monitoredResourceDescriptors; 3424 api.OrganizationsSinksResourceApi res =
1967 var arg_pageToken = "foo"; 3425 new api.LoggingApi(mock).organizations.sinks;
1968 var arg_pageSize = 42; 3426 var arg_sinkName = "foo";
1969 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3427 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1970 var path = (req.url).path; 3428 var path = (req.url).path;
1971 var pathOffset = 0; 3429 var pathOffset = 0;
1972 var index; 3430 var index;
1973 var subPart; 3431 var subPart;
1974 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3432 unittest.expect(
3433 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1975 pathOffset += 1; 3434 pathOffset += 1;
1976 unittest.expect(path.substring(pathOffset, pathOffset + 31), unittest.eq uals("v2/monitoredResourceDescriptors")); 3435 unittest.expect(
1977 pathOffset += 31; 3436 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
3437 pathOffset += 3;
3438 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
1978 3439
1979 var query = (req.url).query; 3440 var query = (req.url).query;
1980 var queryOffset = 0; 3441 var queryOffset = 0;
1981 var queryMap = {}; 3442 var queryMap = {};
1982 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3443 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1983 parseBool(n) { 3444 parseBool(n) {
1984 if (n == "true") return true; 3445 if (n == "true") return true;
1985 if (n == "false") return false; 3446 if (n == "false") return false;
1986 if (n == null) return null; 3447 if (n == null) return null;
1987 throw new core.ArgumentError("Invalid boolean: $n"); 3448 throw new core.ArgumentError("Invalid boolean: $n");
1988 } 3449 }
3450
1989 if (query.length > 0) { 3451 if (query.length > 0) {
1990 for (var part in query.split("&")) { 3452 for (var part in query.split("&")) {
1991 var keyvalue = part.split("="); 3453 var keyvalue = part.split("=");
1992 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3454 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3455 core.Uri.decodeQueryComponent(keyvalue[1]));
1993 } 3456 }
1994 } 3457 }
1995 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
1996 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
1997
1998 3458
1999 var h = { 3459 var h = {
2000 "content-type" : "application/json; charset=utf-8", 3460 "content-type": "application/json; charset=utf-8",
2001 }; 3461 };
2002 var resp = convert.JSON.encode(buildListMonitoredResourceDescriptorsResp onse()); 3462 var resp = convert.JSON.encode(buildLogSink());
2003 return new async.Future.value(stringResponse(200, h, resp)); 3463 return new async.Future.value(stringResponse(200, h, resp));
2004 }), true); 3464 }), true);
2005 res.list(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest.e xpectAsync1(((api.ListMonitoredResourceDescriptorsResponse response) { 3465 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) {
2006 checkListMonitoredResourceDescriptorsResponse(response); 3466 checkLogSink(response);
2007 }))); 3467 })));
2008 }); 3468 });
2009 3469
2010 }); 3470 unittest.test("method--list", () {
2011
2012
2013 unittest.group("resource-OrganizationsLogsResourceApi", () {
2014 unittest.test("method--delete", () {
2015
2016 var mock = new HttpServerMock(); 3471 var mock = new HttpServerMock();
2017 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati ons.logs; 3472 api.OrganizationsSinksResourceApi res =
2018 var arg_logName = "foo"; 3473 new api.LoggingApi(mock).organizations.sinks;
3474 var arg_parent = "foo";
3475 var arg_pageToken = "foo";
3476 var arg_pageSize = 42;
2019 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3477 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2020 var path = (req.url).path; 3478 var path = (req.url).path;
2021 var pathOffset = 0; 3479 var pathOffset = 0;
2022 var index; 3480 var index;
2023 var subPart; 3481 var subPart;
2024 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3482 unittest.expect(
3483 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2025 pathOffset += 1; 3484 pathOffset += 1;
2026 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3485 unittest.expect(
3486 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2027 pathOffset += 3; 3487 pathOffset += 3;
2028 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3488 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2029 3489
2030 var query = (req.url).query; 3490 var query = (req.url).query;
2031 var queryOffset = 0; 3491 var queryOffset = 0;
2032 var queryMap = {}; 3492 var queryMap = {};
2033 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3493 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2034 parseBool(n) { 3494 parseBool(n) {
2035 if (n == "true") return true; 3495 if (n == "true") return true;
2036 if (n == "false") return false; 3496 if (n == "false") return false;
2037 if (n == null) return null; 3497 if (n == null) return null;
2038 throw new core.ArgumentError("Invalid boolean: $n"); 3498 throw new core.ArgumentError("Invalid boolean: $n");
2039 } 3499 }
3500
2040 if (query.length > 0) { 3501 if (query.length > 0) {
2041 for (var part in query.split("&")) { 3502 for (var part in query.split("&")) {
2042 var keyvalue = part.split("="); 3503 var keyvalue = part.split("=");
2043 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3504 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3505 core.Uri.decodeQueryComponent(keyvalue[1]));
2044 } 3506 }
2045 } 3507 }
2046 3508 unittest.expect(
3509 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
3510 unittest.expect(core.int.parse(queryMap["pageSize"].first),
3511 unittest.equals(arg_pageSize));
2047 3512
2048 var h = { 3513 var h = {
2049 "content-type" : "application/json; charset=utf-8", 3514 "content-type": "application/json; charset=utf-8",
2050 }; 3515 };
2051 var resp = convert.JSON.encode(buildEmpty()); 3516 var resp = convert.JSON.encode(buildListSinksResponse());
2052 return new async.Future.value(stringResponse(200, h, resp)); 3517 return new async.Future.value(stringResponse(200, h, resp));
2053 }), true); 3518 }), true);
2054 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { 3519 res
2055 checkEmpty(response); 3520 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
3521 .then(unittest.expectAsync1(((api.ListSinksResponse response) {
3522 checkListSinksResponse(response);
2056 }))); 3523 })));
2057 }); 3524 });
2058 3525
2059 unittest.test("method--list", () { 3526 unittest.test("method--patch", () {
3527 var mock = new HttpServerMock();
3528 api.OrganizationsSinksResourceApi res =
3529 new api.LoggingApi(mock).organizations.sinks;
3530 var arg_request = buildLogSink();
3531 var arg_sinkName = "foo";
3532 var arg_updateMask = "foo";
3533 var arg_uniqueWriterIdentity = true;
3534 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3535 var obj = new api.LogSink.fromJson(json);
3536 checkLogSink(obj);
2060 3537
2061 var mock = new HttpServerMock();
2062 api.OrganizationsLogsResourceApi res = new api.LoggingApi(mock).organizati ons.logs;
2063 var arg_parent = "foo";
2064 var arg_pageToken = "foo";
2065 var arg_pageSize = 42;
2066 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2067 var path = (req.url).path; 3538 var path = (req.url).path;
2068 var pathOffset = 0; 3539 var pathOffset = 0;
2069 var index; 3540 var index;
2070 var subPart; 3541 var subPart;
2071 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3542 unittest.expect(
3543 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2072 pathOffset += 1; 3544 pathOffset += 1;
2073 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3545 unittest.expect(
3546 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2074 pathOffset += 3; 3547 pathOffset += 3;
2075 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3548 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2076 3549
2077 var query = (req.url).query; 3550 var query = (req.url).query;
2078 var queryOffset = 0; 3551 var queryOffset = 0;
2079 var queryMap = {}; 3552 var queryMap = {};
2080 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3553 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2081 parseBool(n) { 3554 parseBool(n) {
2082 if (n == "true") return true; 3555 if (n == "true") return true;
2083 if (n == "false") return false; 3556 if (n == "false") return false;
2084 if (n == null) return null; 3557 if (n == null) return null;
2085 throw new core.ArgumentError("Invalid boolean: $n"); 3558 throw new core.ArgumentError("Invalid boolean: $n");
2086 } 3559 }
3560
2087 if (query.length > 0) { 3561 if (query.length > 0) {
2088 for (var part in query.split("&")) { 3562 for (var part in query.split("&")) {
2089 var keyvalue = part.split("="); 3563 var keyvalue = part.split("=");
2090 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3564 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3565 core.Uri.decodeQueryComponent(keyvalue[1]));
2091 } 3566 }
2092 } 3567 }
2093 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 3568 unittest.expect(
2094 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 3569 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
2095 3570 unittest.expect(queryMap["uniqueWriterIdentity"].first,
3571 unittest.equals("$arg_uniqueWriterIdentity"));
2096 3572
2097 var h = { 3573 var h = {
2098 "content-type" : "application/json; charset=utf-8", 3574 "content-type": "application/json; charset=utf-8",
2099 }; 3575 };
2100 var resp = convert.JSON.encode(buildListLogsResponse()); 3576 var resp = convert.JSON.encode(buildLogSink());
2101 return new async.Future.value(stringResponse(200, h, resp)); 3577 return new async.Future.value(stringResponse(200, h, resp));
2102 }), true); 3578 }), true);
2103 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListLogsResponse response) { 3579 res
2104 checkListLogsResponse(response); 3580 .patch(arg_request, arg_sinkName,
3581 updateMask: arg_updateMask,
3582 uniqueWriterIdentity: arg_uniqueWriterIdentity)
3583 .then(unittest.expectAsync1(((api.LogSink response) {
3584 checkLogSink(response);
2105 }))); 3585 })));
2106 }); 3586 });
2107 3587
2108 }); 3588 unittest.test("method--update", () {
2109
2110
2111 unittest.group("resource-OrganizationsSinksResourceApi", () {
2112 unittest.test("method--create", () {
2113
2114 var mock = new HttpServerMock(); 3589 var mock = new HttpServerMock();
2115 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat ions.sinks; 3590 api.OrganizationsSinksResourceApi res =
3591 new api.LoggingApi(mock).organizations.sinks;
2116 var arg_request = buildLogSink(); 3592 var arg_request = buildLogSink();
2117 var arg_parent = "foo"; 3593 var arg_sinkName = "foo";
3594 var arg_updateMask = "foo";
2118 var arg_uniqueWriterIdentity = true; 3595 var arg_uniqueWriterIdentity = true;
2119 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3596 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2120 var obj = new api.LogSink.fromJson(json); 3597 var obj = new api.LogSink.fromJson(json);
2121 checkLogSink(obj); 3598 checkLogSink(obj);
2122 3599
2123 var path = (req.url).path; 3600 var path = (req.url).path;
2124 var pathOffset = 0; 3601 var pathOffset = 0;
2125 var index; 3602 var index;
2126 var subPart; 3603 var subPart;
2127 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3604 unittest.expect(
3605 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2128 pathOffset += 1; 3606 pathOffset += 1;
2129 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3607 unittest.expect(
3608 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2130 pathOffset += 3; 3609 pathOffset += 3;
2131 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3610 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2132 3611
2133 var query = (req.url).query; 3612 var query = (req.url).query;
2134 var queryOffset = 0; 3613 var queryOffset = 0;
2135 var queryMap = {}; 3614 var queryMap = {};
2136 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3615 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2137 parseBool(n) { 3616 parseBool(n) {
2138 if (n == "true") return true; 3617 if (n == "true") return true;
2139 if (n == "false") return false; 3618 if (n == "false") return false;
2140 if (n == null) return null; 3619 if (n == null) return null;
2141 throw new core.ArgumentError("Invalid boolean: $n"); 3620 throw new core.ArgumentError("Invalid boolean: $n");
2142 } 3621 }
3622
2143 if (query.length > 0) { 3623 if (query.length > 0) {
2144 for (var part in query.split("&")) { 3624 for (var part in query.split("&")) {
2145 var keyvalue = part.split("="); 3625 var keyvalue = part.split("=");
2146 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3626 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3627 core.Uri.decodeQueryComponent(keyvalue[1]));
2147 } 3628 }
2148 } 3629 }
2149 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 3630 unittest.expect(
2150 3631 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
3632 unittest.expect(queryMap["uniqueWriterIdentity"].first,
3633 unittest.equals("$arg_uniqueWriterIdentity"));
2151 3634
2152 var h = { 3635 var h = {
2153 "content-type" : "application/json; charset=utf-8", 3636 "content-type": "application/json; charset=utf-8",
2154 }; 3637 };
2155 var resp = convert.JSON.encode(buildLogSink()); 3638 var resp = convert.JSON.encode(buildLogSink());
2156 return new async.Future.value(stringResponse(200, h, resp)); 3639 return new async.Future.value(stringResponse(200, h, resp));
2157 }), true); 3640 }), true);
2158 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter Identity).then(unittest.expectAsync1(((api.LogSink response) { 3641 res
3642 .update(arg_request, arg_sinkName,
3643 updateMask: arg_updateMask,
3644 uniqueWriterIdentity: arg_uniqueWriterIdentity)
3645 .then(unittest.expectAsync1(((api.LogSink response) {
2159 checkLogSink(response); 3646 checkLogSink(response);
2160 }))); 3647 })));
2161 }); 3648 });
3649 });
2162 3650
2163 unittest.test("method--delete", () { 3651 unittest.group("resource-ProjectsExclusionsResourceApi", () {
3652 unittest.test("method--create", () {
3653 var mock = new HttpServerMock();
3654 api.ProjectsExclusionsResourceApi res =
3655 new api.LoggingApi(mock).projects.exclusions;
3656 var arg_request = buildLogExclusion();
3657 var arg_parent = "foo";
3658 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
3659 var obj = new api.LogExclusion.fromJson(json);
3660 checkLogExclusion(obj);
2164 3661
2165 var mock = new HttpServerMock();
2166 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat ions.sinks;
2167 var arg_sinkName = "foo";
2168 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2169 var path = (req.url).path; 3662 var path = (req.url).path;
2170 var pathOffset = 0; 3663 var pathOffset = 0;
2171 var index; 3664 var index;
2172 var subPart; 3665 var subPart;
2173 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3666 unittest.expect(
3667 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2174 pathOffset += 1; 3668 pathOffset += 1;
2175 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3669 unittest.expect(
3670 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2176 pathOffset += 3; 3671 pathOffset += 3;
2177 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3672 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2178 3673
2179 var query = (req.url).query; 3674 var query = (req.url).query;
2180 var queryOffset = 0; 3675 var queryOffset = 0;
2181 var queryMap = {}; 3676 var queryMap = {};
2182 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3677 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2183 parseBool(n) { 3678 parseBool(n) {
2184 if (n == "true") return true; 3679 if (n == "true") return true;
2185 if (n == "false") return false; 3680 if (n == "false") return false;
2186 if (n == null) return null; 3681 if (n == null) return null;
2187 throw new core.ArgumentError("Invalid boolean: $n"); 3682 throw new core.ArgumentError("Invalid boolean: $n");
2188 } 3683 }
3684
2189 if (query.length > 0) { 3685 if (query.length > 0) {
2190 for (var part in query.split("&")) { 3686 for (var part in query.split("&")) {
2191 var keyvalue = part.split("="); 3687 var keyvalue = part.split("=");
2192 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3688 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3689 core.Uri.decodeQueryComponent(keyvalue[1]));
2193 } 3690 }
2194 } 3691 }
2195 3692
2196
2197 var h = { 3693 var h = {
2198 "content-type" : "application/json; charset=utf-8", 3694 "content-type": "application/json; charset=utf-8",
2199 }; 3695 };
2200 var resp = convert.JSON.encode(buildEmpty()); 3696 var resp = convert.JSON.encode(buildLogExclusion());
2201 return new async.Future.value(stringResponse(200, h, resp)); 3697 return new async.Future.value(stringResponse(200, h, resp));
2202 }), true); 3698 }), true);
2203 res.delete(arg_sinkName).then(unittest.expectAsync1(((api.Empty response) { 3699 res
2204 checkEmpty(response); 3700 .create(arg_request, arg_parent)
3701 .then(unittest.expectAsync1(((api.LogExclusion response) {
3702 checkLogExclusion(response);
2205 }))); 3703 })));
2206 }); 3704 });
2207 3705
2208 unittest.test("method--get", () { 3706 unittest.test("method--delete", () {
2209
2210 var mock = new HttpServerMock(); 3707 var mock = new HttpServerMock();
2211 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat ions.sinks; 3708 api.ProjectsExclusionsResourceApi res =
2212 var arg_sinkName = "foo"; 3709 new api.LoggingApi(mock).projects.exclusions;
3710 var arg_name = "foo";
2213 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3711 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2214 var path = (req.url).path; 3712 var path = (req.url).path;
2215 var pathOffset = 0; 3713 var pathOffset = 0;
2216 var index; 3714 var index;
2217 var subPart; 3715 var subPart;
2218 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3716 unittest.expect(
3717 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2219 pathOffset += 1; 3718 pathOffset += 1;
2220 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3719 unittest.expect(
3720 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2221 pathOffset += 3; 3721 pathOffset += 3;
2222 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3722 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2223 3723
2224 var query = (req.url).query; 3724 var query = (req.url).query;
2225 var queryOffset = 0; 3725 var queryOffset = 0;
2226 var queryMap = {}; 3726 var queryMap = {};
2227 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3727 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2228 parseBool(n) { 3728 parseBool(n) {
2229 if (n == "true") return true; 3729 if (n == "true") return true;
2230 if (n == "false") return false; 3730 if (n == "false") return false;
2231 if (n == null) return null; 3731 if (n == null) return null;
2232 throw new core.ArgumentError("Invalid boolean: $n"); 3732 throw new core.ArgumentError("Invalid boolean: $n");
2233 } 3733 }
3734
2234 if (query.length > 0) { 3735 if (query.length > 0) {
2235 for (var part in query.split("&")) { 3736 for (var part in query.split("&")) {
2236 var keyvalue = part.split("="); 3737 var keyvalue = part.split("=");
2237 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3738 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3739 core.Uri.decodeQueryComponent(keyvalue[1]));
2238 } 3740 }
2239 } 3741 }
2240 3742
2241
2242 var h = { 3743 var h = {
2243 "content-type" : "application/json; charset=utf-8", 3744 "content-type": "application/json; charset=utf-8",
2244 }; 3745 };
2245 var resp = convert.JSON.encode(buildLogSink()); 3746 var resp = convert.JSON.encode(buildEmpty());
2246 return new async.Future.value(stringResponse(200, h, resp)); 3747 return new async.Future.value(stringResponse(200, h, resp));
2247 }), true); 3748 }), true);
2248 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { 3749 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) {
2249 checkLogSink(response); 3750 checkEmpty(response);
2250 }))); 3751 })));
2251 }); 3752 });
2252 3753
2253 unittest.test("method--list", () { 3754 unittest.test("method--get", () {
2254
2255 var mock = new HttpServerMock(); 3755 var mock = new HttpServerMock();
2256 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat ions.sinks; 3756 api.ProjectsExclusionsResourceApi res =
2257 var arg_parent = "foo"; 3757 new api.LoggingApi(mock).projects.exclusions;
2258 var arg_pageToken = "foo"; 3758 var arg_name = "foo";
2259 var arg_pageSize = 42;
2260 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3759 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2261 var path = (req.url).path; 3760 var path = (req.url).path;
2262 var pathOffset = 0; 3761 var pathOffset = 0;
2263 var index; 3762 var index;
2264 var subPart; 3763 var subPart;
2265 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3764 unittest.expect(
3765 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2266 pathOffset += 1; 3766 pathOffset += 1;
2267 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3767 unittest.expect(
3768 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2268 pathOffset += 3; 3769 pathOffset += 3;
2269 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3770 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2270 3771
2271 var query = (req.url).query; 3772 var query = (req.url).query;
2272 var queryOffset = 0; 3773 var queryOffset = 0;
2273 var queryMap = {}; 3774 var queryMap = {};
2274 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3775 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2275 parseBool(n) { 3776 parseBool(n) {
2276 if (n == "true") return true; 3777 if (n == "true") return true;
2277 if (n == "false") return false; 3778 if (n == "false") return false;
2278 if (n == null) return null; 3779 if (n == null) return null;
2279 throw new core.ArgumentError("Invalid boolean: $n"); 3780 throw new core.ArgumentError("Invalid boolean: $n");
2280 } 3781 }
3782
2281 if (query.length > 0) { 3783 if (query.length > 0) {
2282 for (var part in query.split("&")) { 3784 for (var part in query.split("&")) {
2283 var keyvalue = part.split("="); 3785 var keyvalue = part.split("=");
2284 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3786 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3787 core.Uri.decodeQueryComponent(keyvalue[1]));
2285 } 3788 }
2286 } 3789 }
2287 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en));
2288 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize));
2289
2290 3790
2291 var h = { 3791 var h = {
2292 "content-type" : "application/json; charset=utf-8", 3792 "content-type": "application/json; charset=utf-8",
2293 }; 3793 };
2294 var resp = convert.JSON.encode(buildListSinksResponse()); 3794 var resp = convert.JSON.encode(buildLogExclusion());
2295 return new async.Future.value(stringResponse(200, h, resp)); 3795 return new async.Future.value(stringResponse(200, h, resp));
2296 }), true); 3796 }), true);
2297 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListSinksResponse response) { 3797 res
2298 checkListSinksResponse(response); 3798 .get(arg_name)
3799 .then(unittest.expectAsync1(((api.LogExclusion response) {
3800 checkLogExclusion(response);
2299 }))); 3801 })));
2300 }); 3802 });
2301 3803
2302 unittest.test("method--patch", () { 3804 unittest.test("method--list", () {
2303
2304 var mock = new HttpServerMock(); 3805 var mock = new HttpServerMock();
2305 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat ions.sinks; 3806 api.ProjectsExclusionsResourceApi res =
2306 var arg_request = buildLogSink(); 3807 new api.LoggingApi(mock).projects.exclusions;
2307 var arg_sinkName = "foo"; 3808 var arg_parent = "foo";
2308 var arg_uniqueWriterIdentity = true; 3809 var arg_pageToken = "foo";
3810 var arg_pageSize = 42;
2309 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3811 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2310 var obj = new api.LogSink.fromJson(json);
2311 checkLogSink(obj);
2312
2313 var path = (req.url).path; 3812 var path = (req.url).path;
2314 var pathOffset = 0; 3813 var pathOffset = 0;
2315 var index; 3814 var index;
2316 var subPart; 3815 var subPart;
2317 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3816 unittest.expect(
3817 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2318 pathOffset += 1; 3818 pathOffset += 1;
2319 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3819 unittest.expect(
3820 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2320 pathOffset += 3; 3821 pathOffset += 3;
2321 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3822 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2322 3823
2323 var query = (req.url).query; 3824 var query = (req.url).query;
2324 var queryOffset = 0; 3825 var queryOffset = 0;
2325 var queryMap = {}; 3826 var queryMap = {};
2326 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3827 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2327 parseBool(n) { 3828 parseBool(n) {
2328 if (n == "true") return true; 3829 if (n == "true") return true;
2329 if (n == "false") return false; 3830 if (n == "false") return false;
2330 if (n == null) return null; 3831 if (n == null) return null;
2331 throw new core.ArgumentError("Invalid boolean: $n"); 3832 throw new core.ArgumentError("Invalid boolean: $n");
2332 } 3833 }
3834
2333 if (query.length > 0) { 3835 if (query.length > 0) {
2334 for (var part in query.split("&")) { 3836 for (var part in query.split("&")) {
2335 var keyvalue = part.split("="); 3837 var keyvalue = part.split("=");
2336 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3838 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3839 core.Uri.decodeQueryComponent(keyvalue[1]));
2337 } 3840 }
2338 } 3841 }
2339 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 3842 unittest.expect(
2340 3843 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
3844 unittest.expect(core.int.parse(queryMap["pageSize"].first),
3845 unittest.equals(arg_pageSize));
2341 3846
2342 var h = { 3847 var h = {
2343 "content-type" : "application/json; charset=utf-8", 3848 "content-type": "application/json; charset=utf-8",
2344 }; 3849 };
2345 var resp = convert.JSON.encode(buildLogSink()); 3850 var resp = convert.JSON.encode(buildListExclusionsResponse());
2346 return new async.Future.value(stringResponse(200, h, resp)); 3851 return new async.Future.value(stringResponse(200, h, resp));
2347 }), true); 3852 }), true);
2348 res.patch(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrite rIdentity).then(unittest.expectAsync1(((api.LogSink response) { 3853 res
2349 checkLogSink(response); 3854 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
3855 .then(unittest.expectAsync1(((api.ListExclusionsResponse response) {
3856 checkListExclusionsResponse(response);
2350 }))); 3857 })));
2351 }); 3858 });
2352 3859
2353 unittest.test("method--update", () { 3860 unittest.test("method--patch", () {
2354
2355 var mock = new HttpServerMock(); 3861 var mock = new HttpServerMock();
2356 api.OrganizationsSinksResourceApi res = new api.LoggingApi(mock).organizat ions.sinks; 3862 api.ProjectsExclusionsResourceApi res =
2357 var arg_request = buildLogSink(); 3863 new api.LoggingApi(mock).projects.exclusions;
2358 var arg_sinkName = "foo"; 3864 var arg_request = buildLogExclusion();
2359 var arg_uniqueWriterIdentity = true; 3865 var arg_name = "foo";
3866 var arg_updateMask = "foo";
2360 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3867 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2361 var obj = new api.LogSink.fromJson(json); 3868 var obj = new api.LogExclusion.fromJson(json);
2362 checkLogSink(obj); 3869 checkLogExclusion(obj);
2363 3870
2364 var path = (req.url).path; 3871 var path = (req.url).path;
2365 var pathOffset = 0; 3872 var pathOffset = 0;
2366 var index; 3873 var index;
2367 var subPart; 3874 var subPart;
2368 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3875 unittest.expect(
3876 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2369 pathOffset += 1; 3877 pathOffset += 1;
2370 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3878 unittest.expect(
3879 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2371 pathOffset += 3; 3880 pathOffset += 3;
2372 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3881 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2373 3882
2374 var query = (req.url).query; 3883 var query = (req.url).query;
2375 var queryOffset = 0; 3884 var queryOffset = 0;
2376 var queryMap = {}; 3885 var queryMap = {};
2377 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3886 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2378 parseBool(n) { 3887 parseBool(n) {
2379 if (n == "true") return true; 3888 if (n == "true") return true;
2380 if (n == "false") return false; 3889 if (n == "false") return false;
2381 if (n == null) return null; 3890 if (n == null) return null;
2382 throw new core.ArgumentError("Invalid boolean: $n"); 3891 throw new core.ArgumentError("Invalid boolean: $n");
2383 } 3892 }
3893
2384 if (query.length > 0) { 3894 if (query.length > 0) {
2385 for (var part in query.split("&")) { 3895 for (var part in query.split("&")) {
2386 var keyvalue = part.split("="); 3896 var keyvalue = part.split("=");
2387 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3897 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3898 core.Uri.decodeQueryComponent(keyvalue[1]));
2388 } 3899 }
2389 } 3900 }
2390 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 3901 unittest.expect(
2391 3902 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
2392 3903
2393 var h = { 3904 var h = {
2394 "content-type" : "application/json; charset=utf-8", 3905 "content-type": "application/json; charset=utf-8",
2395 }; 3906 };
2396 var resp = convert.JSON.encode(buildLogSink()); 3907 var resp = convert.JSON.encode(buildLogExclusion());
2397 return new async.Future.value(stringResponse(200, h, resp)); 3908 return new async.Future.value(stringResponse(200, h, resp));
2398 }), true); 3909 }), true);
2399 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit erIdentity).then(unittest.expectAsync1(((api.LogSink response) { 3910 res
2400 checkLogSink(response); 3911 .patch(arg_request, arg_name, updateMask: arg_updateMask)
3912 .then(unittest.expectAsync1(((api.LogExclusion response) {
3913 checkLogExclusion(response);
2401 }))); 3914 })));
2402 }); 3915 });
2403
2404 }); 3916 });
2405 3917
2406
2407 unittest.group("resource-ProjectsLogsResourceApi", () { 3918 unittest.group("resource-ProjectsLogsResourceApi", () {
2408 unittest.test("method--delete", () { 3919 unittest.test("method--delete", () {
2409
2410 var mock = new HttpServerMock(); 3920 var mock = new HttpServerMock();
2411 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; 3921 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs;
2412 var arg_logName = "foo"; 3922 var arg_logName = "foo";
2413 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3923 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2414 var path = (req.url).path; 3924 var path = (req.url).path;
2415 var pathOffset = 0; 3925 var pathOffset = 0;
2416 var index; 3926 var index;
2417 var subPart; 3927 var subPart;
2418 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3928 unittest.expect(
3929 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2419 pathOffset += 1; 3930 pathOffset += 1;
2420 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3931 unittest.expect(
3932 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2421 pathOffset += 3; 3933 pathOffset += 3;
2422 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3934 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2423 3935
2424 var query = (req.url).query; 3936 var query = (req.url).query;
2425 var queryOffset = 0; 3937 var queryOffset = 0;
2426 var queryMap = {}; 3938 var queryMap = {};
2427 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3939 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2428 parseBool(n) { 3940 parseBool(n) {
2429 if (n == "true") return true; 3941 if (n == "true") return true;
2430 if (n == "false") return false; 3942 if (n == "false") return false;
2431 if (n == null) return null; 3943 if (n == null) return null;
2432 throw new core.ArgumentError("Invalid boolean: $n"); 3944 throw new core.ArgumentError("Invalid boolean: $n");
2433 } 3945 }
3946
2434 if (query.length > 0) { 3947 if (query.length > 0) {
2435 for (var part in query.split("&")) { 3948 for (var part in query.split("&")) {
2436 var keyvalue = part.split("="); 3949 var keyvalue = part.split("=");
2437 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3950 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
3951 core.Uri.decodeQueryComponent(keyvalue[1]));
2438 } 3952 }
2439 } 3953 }
2440 3954
2441
2442 var h = { 3955 var h = {
2443 "content-type" : "application/json; charset=utf-8", 3956 "content-type": "application/json; charset=utf-8",
2444 }; 3957 };
2445 var resp = convert.JSON.encode(buildEmpty()); 3958 var resp = convert.JSON.encode(buildEmpty());
2446 return new async.Future.value(stringResponse(200, h, resp)); 3959 return new async.Future.value(stringResponse(200, h, resp));
2447 }), true); 3960 }), true);
2448 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) { 3961 res.delete(arg_logName).then(unittest.expectAsync1(((api.Empty response) {
2449 checkEmpty(response); 3962 checkEmpty(response);
2450 }))); 3963 })));
2451 }); 3964 });
2452 3965
2453 unittest.test("method--list", () { 3966 unittest.test("method--list", () {
2454
2455 var mock = new HttpServerMock(); 3967 var mock = new HttpServerMock();
2456 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs; 3968 api.ProjectsLogsResourceApi res = new api.LoggingApi(mock).projects.logs;
2457 var arg_parent = "foo"; 3969 var arg_parent = "foo";
2458 var arg_pageToken = "foo"; 3970 var arg_pageToken = "foo";
2459 var arg_pageSize = 42; 3971 var arg_pageSize = 42;
2460 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 3972 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2461 var path = (req.url).path; 3973 var path = (req.url).path;
2462 var pathOffset = 0; 3974 var pathOffset = 0;
2463 var index; 3975 var index;
2464 var subPart; 3976 var subPart;
2465 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 3977 unittest.expect(
3978 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2466 pathOffset += 1; 3979 pathOffset += 1;
2467 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 3980 unittest.expect(
3981 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2468 pathOffset += 3; 3982 pathOffset += 3;
2469 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 3983 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2470 3984
2471 var query = (req.url).query; 3985 var query = (req.url).query;
2472 var queryOffset = 0; 3986 var queryOffset = 0;
2473 var queryMap = {}; 3987 var queryMap = {};
2474 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 3988 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2475 parseBool(n) { 3989 parseBool(n) {
2476 if (n == "true") return true; 3990 if (n == "true") return true;
2477 if (n == "false") return false; 3991 if (n == "false") return false;
2478 if (n == null) return null; 3992 if (n == null) return null;
2479 throw new core.ArgumentError("Invalid boolean: $n"); 3993 throw new core.ArgumentError("Invalid boolean: $n");
2480 } 3994 }
3995
2481 if (query.length > 0) { 3996 if (query.length > 0) {
2482 for (var part in query.split("&")) { 3997 for (var part in query.split("&")) {
2483 var keyvalue = part.split("="); 3998 var keyvalue = part.split("=");
2484 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 3999 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4000 core.Uri.decodeQueryComponent(keyvalue[1]));
2485 } 4001 }
2486 } 4002 }
2487 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 4003 unittest.expect(
2488 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 4004 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2489 4005 unittest.expect(core.int.parse(queryMap["pageSize"].first),
4006 unittest.equals(arg_pageSize));
2490 4007
2491 var h = { 4008 var h = {
2492 "content-type" : "application/json; charset=utf-8", 4009 "content-type": "application/json; charset=utf-8",
2493 }; 4010 };
2494 var resp = convert.JSON.encode(buildListLogsResponse()); 4011 var resp = convert.JSON.encode(buildListLogsResponse());
2495 return new async.Future.value(stringResponse(200, h, resp)); 4012 return new async.Future.value(stringResponse(200, h, resp));
2496 }), true); 4013 }), true);
2497 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListLogsResponse response) { 4014 res
4015 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
4016 .then(unittest.expectAsync1(((api.ListLogsResponse response) {
2498 checkListLogsResponse(response); 4017 checkListLogsResponse(response);
2499 }))); 4018 })));
2500 }); 4019 });
2501
2502 }); 4020 });
2503 4021
2504
2505 unittest.group("resource-ProjectsMetricsResourceApi", () { 4022 unittest.group("resource-ProjectsMetricsResourceApi", () {
2506 unittest.test("method--create", () { 4023 unittest.test("method--create", () {
2507
2508 var mock = new HttpServerMock(); 4024 var mock = new HttpServerMock();
2509 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met rics; 4025 api.ProjectsMetricsResourceApi res =
4026 new api.LoggingApi(mock).projects.metrics;
2510 var arg_request = buildLogMetric(); 4027 var arg_request = buildLogMetric();
2511 var arg_parent = "foo"; 4028 var arg_parent = "foo";
2512 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4029 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2513 var obj = new api.LogMetric.fromJson(json); 4030 var obj = new api.LogMetric.fromJson(json);
2514 checkLogMetric(obj); 4031 checkLogMetric(obj);
2515 4032
2516 var path = (req.url).path; 4033 var path = (req.url).path;
2517 var pathOffset = 0; 4034 var pathOffset = 0;
2518 var index; 4035 var index;
2519 var subPart; 4036 var subPart;
2520 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4037 unittest.expect(
4038 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2521 pathOffset += 1; 4039 pathOffset += 1;
2522 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4040 unittest.expect(
4041 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2523 pathOffset += 3; 4042 pathOffset += 3;
2524 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4043 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2525 4044
2526 var query = (req.url).query; 4045 var query = (req.url).query;
2527 var queryOffset = 0; 4046 var queryOffset = 0;
2528 var queryMap = {}; 4047 var queryMap = {};
2529 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4048 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2530 parseBool(n) { 4049 parseBool(n) {
2531 if (n == "true") return true; 4050 if (n == "true") return true;
2532 if (n == "false") return false; 4051 if (n == "false") return false;
2533 if (n == null) return null; 4052 if (n == null) return null;
2534 throw new core.ArgumentError("Invalid boolean: $n"); 4053 throw new core.ArgumentError("Invalid boolean: $n");
2535 } 4054 }
4055
2536 if (query.length > 0) { 4056 if (query.length > 0) {
2537 for (var part in query.split("&")) { 4057 for (var part in query.split("&")) {
2538 var keyvalue = part.split("="); 4058 var keyvalue = part.split("=");
2539 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4060 core.Uri.decodeQueryComponent(keyvalue[1]));
2540 } 4061 }
2541 } 4062 }
2542 4063
2543
2544 var h = { 4064 var h = {
2545 "content-type" : "application/json; charset=utf-8", 4065 "content-type": "application/json; charset=utf-8",
2546 }; 4066 };
2547 var resp = convert.JSON.encode(buildLogMetric()); 4067 var resp = convert.JSON.encode(buildLogMetric());
2548 return new async.Future.value(stringResponse(200, h, resp)); 4068 return new async.Future.value(stringResponse(200, h, resp));
2549 }), true); 4069 }), true);
2550 res.create(arg_request, arg_parent).then(unittest.expectAsync1(((api.LogMe tric response) { 4070 res
4071 .create(arg_request, arg_parent)
4072 .then(unittest.expectAsync1(((api.LogMetric response) {
2551 checkLogMetric(response); 4073 checkLogMetric(response);
2552 }))); 4074 })));
2553 }); 4075 });
2554 4076
2555 unittest.test("method--delete", () { 4077 unittest.test("method--delete", () {
2556
2557 var mock = new HttpServerMock(); 4078 var mock = new HttpServerMock();
2558 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met rics; 4079 api.ProjectsMetricsResourceApi res =
4080 new api.LoggingApi(mock).projects.metrics;
2559 var arg_metricName = "foo"; 4081 var arg_metricName = "foo";
2560 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4082 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2561 var path = (req.url).path; 4083 var path = (req.url).path;
2562 var pathOffset = 0; 4084 var pathOffset = 0;
2563 var index; 4085 var index;
2564 var subPart; 4086 var subPart;
2565 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4087 unittest.expect(
4088 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2566 pathOffset += 1; 4089 pathOffset += 1;
2567 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4090 unittest.expect(
4091 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2568 pathOffset += 3; 4092 pathOffset += 3;
2569 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4093 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2570 4094
2571 var query = (req.url).query; 4095 var query = (req.url).query;
2572 var queryOffset = 0; 4096 var queryOffset = 0;
2573 var queryMap = {}; 4097 var queryMap = {};
2574 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4098 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2575 parseBool(n) { 4099 parseBool(n) {
2576 if (n == "true") return true; 4100 if (n == "true") return true;
2577 if (n == "false") return false; 4101 if (n == "false") return false;
2578 if (n == null) return null; 4102 if (n == null) return null;
2579 throw new core.ArgumentError("Invalid boolean: $n"); 4103 throw new core.ArgumentError("Invalid boolean: $n");
2580 } 4104 }
4105
2581 if (query.length > 0) { 4106 if (query.length > 0) {
2582 for (var part in query.split("&")) { 4107 for (var part in query.split("&")) {
2583 var keyvalue = part.split("="); 4108 var keyvalue = part.split("=");
2584 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4109 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4110 core.Uri.decodeQueryComponent(keyvalue[1]));
2585 } 4111 }
2586 } 4112 }
2587 4113
2588
2589 var h = { 4114 var h = {
2590 "content-type" : "application/json; charset=utf-8", 4115 "content-type": "application/json; charset=utf-8",
2591 }; 4116 };
2592 var resp = convert.JSON.encode(buildEmpty()); 4117 var resp = convert.JSON.encode(buildEmpty());
2593 return new async.Future.value(stringResponse(200, h, resp)); 4118 return new async.Future.value(stringResponse(200, h, resp));
2594 }), true); 4119 }), true);
2595 res.delete(arg_metricName).then(unittest.expectAsync1(((api.Empty response ) { 4120 res
4121 .delete(arg_metricName)
4122 .then(unittest.expectAsync1(((api.Empty response) {
2596 checkEmpty(response); 4123 checkEmpty(response);
2597 }))); 4124 })));
2598 }); 4125 });
2599 4126
2600 unittest.test("method--get", () { 4127 unittest.test("method--get", () {
2601
2602 var mock = new HttpServerMock(); 4128 var mock = new HttpServerMock();
2603 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met rics; 4129 api.ProjectsMetricsResourceApi res =
4130 new api.LoggingApi(mock).projects.metrics;
2604 var arg_metricName = "foo"; 4131 var arg_metricName = "foo";
2605 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4132 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2606 var path = (req.url).path; 4133 var path = (req.url).path;
2607 var pathOffset = 0; 4134 var pathOffset = 0;
2608 var index; 4135 var index;
2609 var subPart; 4136 var subPart;
2610 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4137 unittest.expect(
4138 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2611 pathOffset += 1; 4139 pathOffset += 1;
2612 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4140 unittest.expect(
4141 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2613 pathOffset += 3; 4142 pathOffset += 3;
2614 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4143 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2615 4144
2616 var query = (req.url).query; 4145 var query = (req.url).query;
2617 var queryOffset = 0; 4146 var queryOffset = 0;
2618 var queryMap = {}; 4147 var queryMap = {};
2619 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4148 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2620 parseBool(n) { 4149 parseBool(n) {
2621 if (n == "true") return true; 4150 if (n == "true") return true;
2622 if (n == "false") return false; 4151 if (n == "false") return false;
2623 if (n == null) return null; 4152 if (n == null) return null;
2624 throw new core.ArgumentError("Invalid boolean: $n"); 4153 throw new core.ArgumentError("Invalid boolean: $n");
2625 } 4154 }
4155
2626 if (query.length > 0) { 4156 if (query.length > 0) {
2627 for (var part in query.split("&")) { 4157 for (var part in query.split("&")) {
2628 var keyvalue = part.split("="); 4158 var keyvalue = part.split("=");
2629 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4159 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4160 core.Uri.decodeQueryComponent(keyvalue[1]));
2630 } 4161 }
2631 } 4162 }
2632 4163
2633
2634 var h = { 4164 var h = {
2635 "content-type" : "application/json; charset=utf-8", 4165 "content-type": "application/json; charset=utf-8",
2636 }; 4166 };
2637 var resp = convert.JSON.encode(buildLogMetric()); 4167 var resp = convert.JSON.encode(buildLogMetric());
2638 return new async.Future.value(stringResponse(200, h, resp)); 4168 return new async.Future.value(stringResponse(200, h, resp));
2639 }), true); 4169 }), true);
2640 res.get(arg_metricName).then(unittest.expectAsync1(((api.LogMetric respons e) { 4170 res
4171 .get(arg_metricName)
4172 .then(unittest.expectAsync1(((api.LogMetric response) {
2641 checkLogMetric(response); 4173 checkLogMetric(response);
2642 }))); 4174 })));
2643 }); 4175 });
2644 4176
2645 unittest.test("method--list", () { 4177 unittest.test("method--list", () {
2646
2647 var mock = new HttpServerMock(); 4178 var mock = new HttpServerMock();
2648 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met rics; 4179 api.ProjectsMetricsResourceApi res =
4180 new api.LoggingApi(mock).projects.metrics;
2649 var arg_parent = "foo"; 4181 var arg_parent = "foo";
2650 var arg_pageToken = "foo"; 4182 var arg_pageToken = "foo";
2651 var arg_pageSize = 42; 4183 var arg_pageSize = 42;
2652 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4184 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2653 var path = (req.url).path; 4185 var path = (req.url).path;
2654 var pathOffset = 0; 4186 var pathOffset = 0;
2655 var index; 4187 var index;
2656 var subPart; 4188 var subPart;
2657 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4189 unittest.expect(
4190 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2658 pathOffset += 1; 4191 pathOffset += 1;
2659 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4192 unittest.expect(
4193 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2660 pathOffset += 3; 4194 pathOffset += 3;
2661 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4195 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2662 4196
2663 var query = (req.url).query; 4197 var query = (req.url).query;
2664 var queryOffset = 0; 4198 var queryOffset = 0;
2665 var queryMap = {}; 4199 var queryMap = {};
2666 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4200 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2667 parseBool(n) { 4201 parseBool(n) {
2668 if (n == "true") return true; 4202 if (n == "true") return true;
2669 if (n == "false") return false; 4203 if (n == "false") return false;
2670 if (n == null) return null; 4204 if (n == null) return null;
2671 throw new core.ArgumentError("Invalid boolean: $n"); 4205 throw new core.ArgumentError("Invalid boolean: $n");
2672 } 4206 }
4207
2673 if (query.length > 0) { 4208 if (query.length > 0) {
2674 for (var part in query.split("&")) { 4209 for (var part in query.split("&")) {
2675 var keyvalue = part.split("="); 4210 var keyvalue = part.split("=");
2676 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4211 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4212 core.Uri.decodeQueryComponent(keyvalue[1]));
2677 } 4213 }
2678 } 4214 }
2679 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 4215 unittest.expect(
2680 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 4216 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2681 4217 unittest.expect(core.int.parse(queryMap["pageSize"].first),
4218 unittest.equals(arg_pageSize));
2682 4219
2683 var h = { 4220 var h = {
2684 "content-type" : "application/json; charset=utf-8", 4221 "content-type": "application/json; charset=utf-8",
2685 }; 4222 };
2686 var resp = convert.JSON.encode(buildListLogMetricsResponse()); 4223 var resp = convert.JSON.encode(buildListLogMetricsResponse());
2687 return new async.Future.value(stringResponse(200, h, resp)); 4224 return new async.Future.value(stringResponse(200, h, resp));
2688 }), true); 4225 }), true);
2689 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListLogMetricsResponse response) { 4226 res
4227 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
4228 .then(unittest.expectAsync1(((api.ListLogMetricsResponse response) {
2690 checkListLogMetricsResponse(response); 4229 checkListLogMetricsResponse(response);
2691 }))); 4230 })));
2692 }); 4231 });
2693 4232
2694 unittest.test("method--update", () { 4233 unittest.test("method--update", () {
2695
2696 var mock = new HttpServerMock(); 4234 var mock = new HttpServerMock();
2697 api.ProjectsMetricsResourceApi res = new api.LoggingApi(mock).projects.met rics; 4235 api.ProjectsMetricsResourceApi res =
4236 new api.LoggingApi(mock).projects.metrics;
2698 var arg_request = buildLogMetric(); 4237 var arg_request = buildLogMetric();
2699 var arg_metricName = "foo"; 4238 var arg_metricName = "foo";
2700 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4239 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2701 var obj = new api.LogMetric.fromJson(json); 4240 var obj = new api.LogMetric.fromJson(json);
2702 checkLogMetric(obj); 4241 checkLogMetric(obj);
2703 4242
2704 var path = (req.url).path; 4243 var path = (req.url).path;
2705 var pathOffset = 0; 4244 var pathOffset = 0;
2706 var index; 4245 var index;
2707 var subPart; 4246 var subPart;
2708 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4247 unittest.expect(
4248 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2709 pathOffset += 1; 4249 pathOffset += 1;
2710 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4250 unittest.expect(
4251 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2711 pathOffset += 3; 4252 pathOffset += 3;
2712 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4253 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2713 4254
2714 var query = (req.url).query; 4255 var query = (req.url).query;
2715 var queryOffset = 0; 4256 var queryOffset = 0;
2716 var queryMap = {}; 4257 var queryMap = {};
2717 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4258 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2718 parseBool(n) { 4259 parseBool(n) {
2719 if (n == "true") return true; 4260 if (n == "true") return true;
2720 if (n == "false") return false; 4261 if (n == "false") return false;
2721 if (n == null) return null; 4262 if (n == null) return null;
2722 throw new core.ArgumentError("Invalid boolean: $n"); 4263 throw new core.ArgumentError("Invalid boolean: $n");
2723 } 4264 }
4265
2724 if (query.length > 0) { 4266 if (query.length > 0) {
2725 for (var part in query.split("&")) { 4267 for (var part in query.split("&")) {
2726 var keyvalue = part.split("="); 4268 var keyvalue = part.split("=");
2727 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4269 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4270 core.Uri.decodeQueryComponent(keyvalue[1]));
2728 } 4271 }
2729 } 4272 }
2730 4273
2731
2732 var h = { 4274 var h = {
2733 "content-type" : "application/json; charset=utf-8", 4275 "content-type": "application/json; charset=utf-8",
2734 }; 4276 };
2735 var resp = convert.JSON.encode(buildLogMetric()); 4277 var resp = convert.JSON.encode(buildLogMetric());
2736 return new async.Future.value(stringResponse(200, h, resp)); 4278 return new async.Future.value(stringResponse(200, h, resp));
2737 }), true); 4279 }), true);
2738 res.update(arg_request, arg_metricName).then(unittest.expectAsync1(((api.L ogMetric response) { 4280 res
4281 .update(arg_request, arg_metricName)
4282 .then(unittest.expectAsync1(((api.LogMetric response) {
2739 checkLogMetric(response); 4283 checkLogMetric(response);
2740 }))); 4284 })));
2741 }); 4285 });
2742
2743 }); 4286 });
2744 4287
2745
2746 unittest.group("resource-ProjectsSinksResourceApi", () { 4288 unittest.group("resource-ProjectsSinksResourceApi", () {
2747 unittest.test("method--create", () { 4289 unittest.test("method--create", () {
2748
2749 var mock = new HttpServerMock(); 4290 var mock = new HttpServerMock();
2750 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks ; 4291 api.ProjectsSinksResourceApi res =
4292 new api.LoggingApi(mock).projects.sinks;
2751 var arg_request = buildLogSink(); 4293 var arg_request = buildLogSink();
2752 var arg_parent = "foo"; 4294 var arg_parent = "foo";
2753 var arg_uniqueWriterIdentity = true; 4295 var arg_uniqueWriterIdentity = true;
2754 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4296 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2755 var obj = new api.LogSink.fromJson(json); 4297 var obj = new api.LogSink.fromJson(json);
2756 checkLogSink(obj); 4298 checkLogSink(obj);
2757 4299
2758 var path = (req.url).path; 4300 var path = (req.url).path;
2759 var pathOffset = 0; 4301 var pathOffset = 0;
2760 var index; 4302 var index;
2761 var subPart; 4303 var subPart;
2762 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4304 unittest.expect(
4305 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2763 pathOffset += 1; 4306 pathOffset += 1;
2764 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4307 unittest.expect(
4308 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2765 pathOffset += 3; 4309 pathOffset += 3;
2766 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4310 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2767 4311
2768 var query = (req.url).query; 4312 var query = (req.url).query;
2769 var queryOffset = 0; 4313 var queryOffset = 0;
2770 var queryMap = {}; 4314 var queryMap = {};
2771 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4315 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2772 parseBool(n) { 4316 parseBool(n) {
2773 if (n == "true") return true; 4317 if (n == "true") return true;
2774 if (n == "false") return false; 4318 if (n == "false") return false;
2775 if (n == null) return null; 4319 if (n == null) return null;
2776 throw new core.ArgumentError("Invalid boolean: $n"); 4320 throw new core.ArgumentError("Invalid boolean: $n");
2777 } 4321 }
4322
2778 if (query.length > 0) { 4323 if (query.length > 0) {
2779 for (var part in query.split("&")) { 4324 for (var part in query.split("&")) {
2780 var keyvalue = part.split("="); 4325 var keyvalue = part.split("=");
2781 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4326 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4327 core.Uri.decodeQueryComponent(keyvalue[1]));
2782 } 4328 }
2783 } 4329 }
2784 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 4330 unittest.expect(queryMap["uniqueWriterIdentity"].first,
2785 4331 unittest.equals("$arg_uniqueWriterIdentity"));
2786 4332
2787 var h = { 4333 var h = {
2788 "content-type" : "application/json; charset=utf-8", 4334 "content-type": "application/json; charset=utf-8",
2789 }; 4335 };
2790 var resp = convert.JSON.encode(buildLogSink()); 4336 var resp = convert.JSON.encode(buildLogSink());
2791 return new async.Future.value(stringResponse(200, h, resp)); 4337 return new async.Future.value(stringResponse(200, h, resp));
2792 }), true); 4338 }), true);
2793 res.create(arg_request, arg_parent, uniqueWriterIdentity: arg_uniqueWriter Identity).then(unittest.expectAsync1(((api.LogSink response) { 4339 res
4340 .create(arg_request, arg_parent,
4341 uniqueWriterIdentity: arg_uniqueWriterIdentity)
4342 .then(unittest.expectAsync1(((api.LogSink response) {
2794 checkLogSink(response); 4343 checkLogSink(response);
2795 }))); 4344 })));
2796 }); 4345 });
2797 4346
2798 unittest.test("method--delete", () { 4347 unittest.test("method--delete", () {
2799
2800 var mock = new HttpServerMock(); 4348 var mock = new HttpServerMock();
2801 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks ; 4349 api.ProjectsSinksResourceApi res =
4350 new api.LoggingApi(mock).projects.sinks;
2802 var arg_sinkName = "foo"; 4351 var arg_sinkName = "foo";
2803 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4352 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2804 var path = (req.url).path; 4353 var path = (req.url).path;
2805 var pathOffset = 0; 4354 var pathOffset = 0;
2806 var index; 4355 var index;
2807 var subPart; 4356 var subPart;
2808 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4357 unittest.expect(
4358 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2809 pathOffset += 1; 4359 pathOffset += 1;
2810 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4360 unittest.expect(
4361 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2811 pathOffset += 3; 4362 pathOffset += 3;
2812 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4363 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2813 4364
2814 var query = (req.url).query; 4365 var query = (req.url).query;
2815 var queryOffset = 0; 4366 var queryOffset = 0;
2816 var queryMap = {}; 4367 var queryMap = {};
2817 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4368 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2818 parseBool(n) { 4369 parseBool(n) {
2819 if (n == "true") return true; 4370 if (n == "true") return true;
2820 if (n == "false") return false; 4371 if (n == "false") return false;
2821 if (n == null) return null; 4372 if (n == null) return null;
2822 throw new core.ArgumentError("Invalid boolean: $n"); 4373 throw new core.ArgumentError("Invalid boolean: $n");
2823 } 4374 }
4375
2824 if (query.length > 0) { 4376 if (query.length > 0) {
2825 for (var part in query.split("&")) { 4377 for (var part in query.split("&")) {
2826 var keyvalue = part.split("="); 4378 var keyvalue = part.split("=");
2827 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4379 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4380 core.Uri.decodeQueryComponent(keyvalue[1]));
2828 } 4381 }
2829 } 4382 }
2830 4383
2831
2832 var h = { 4384 var h = {
2833 "content-type" : "application/json; charset=utf-8", 4385 "content-type": "application/json; charset=utf-8",
2834 }; 4386 };
2835 var resp = convert.JSON.encode(buildEmpty()); 4387 var resp = convert.JSON.encode(buildEmpty());
2836 return new async.Future.value(stringResponse(200, h, resp)); 4388 return new async.Future.value(stringResponse(200, h, resp));
2837 }), true); 4389 }), true);
2838 res.delete(arg_sinkName).then(unittest.expectAsync1(((api.Empty response) { 4390 res
4391 .delete(arg_sinkName)
4392 .then(unittest.expectAsync1(((api.Empty response) {
2839 checkEmpty(response); 4393 checkEmpty(response);
2840 }))); 4394 })));
2841 }); 4395 });
2842 4396
2843 unittest.test("method--get", () { 4397 unittest.test("method--get", () {
2844
2845 var mock = new HttpServerMock(); 4398 var mock = new HttpServerMock();
2846 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks ; 4399 api.ProjectsSinksResourceApi res =
4400 new api.LoggingApi(mock).projects.sinks;
2847 var arg_sinkName = "foo"; 4401 var arg_sinkName = "foo";
2848 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4402 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2849 var path = (req.url).path; 4403 var path = (req.url).path;
2850 var pathOffset = 0; 4404 var pathOffset = 0;
2851 var index; 4405 var index;
2852 var subPart; 4406 var subPart;
2853 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4407 unittest.expect(
4408 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2854 pathOffset += 1; 4409 pathOffset += 1;
2855 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4410 unittest.expect(
4411 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2856 pathOffset += 3; 4412 pathOffset += 3;
2857 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4413 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2858 4414
2859 var query = (req.url).query; 4415 var query = (req.url).query;
2860 var queryOffset = 0; 4416 var queryOffset = 0;
2861 var queryMap = {}; 4417 var queryMap = {};
2862 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4418 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2863 parseBool(n) { 4419 parseBool(n) {
2864 if (n == "true") return true; 4420 if (n == "true") return true;
2865 if (n == "false") return false; 4421 if (n == "false") return false;
2866 if (n == null) return null; 4422 if (n == null) return null;
2867 throw new core.ArgumentError("Invalid boolean: $n"); 4423 throw new core.ArgumentError("Invalid boolean: $n");
2868 } 4424 }
4425
2869 if (query.length > 0) { 4426 if (query.length > 0) {
2870 for (var part in query.split("&")) { 4427 for (var part in query.split("&")) {
2871 var keyvalue = part.split("="); 4428 var keyvalue = part.split("=");
2872 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4429 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4430 core.Uri.decodeQueryComponent(keyvalue[1]));
2873 } 4431 }
2874 } 4432 }
2875 4433
2876
2877 var h = { 4434 var h = {
2878 "content-type" : "application/json; charset=utf-8", 4435 "content-type": "application/json; charset=utf-8",
2879 }; 4436 };
2880 var resp = convert.JSON.encode(buildLogSink()); 4437 var resp = convert.JSON.encode(buildLogSink());
2881 return new async.Future.value(stringResponse(200, h, resp)); 4438 return new async.Future.value(stringResponse(200, h, resp));
2882 }), true); 4439 }), true);
2883 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) { 4440 res.get(arg_sinkName).then(unittest.expectAsync1(((api.LogSink response) {
2884 checkLogSink(response); 4441 checkLogSink(response);
2885 }))); 4442 })));
2886 }); 4443 });
2887 4444
2888 unittest.test("method--list", () { 4445 unittest.test("method--list", () {
2889
2890 var mock = new HttpServerMock(); 4446 var mock = new HttpServerMock();
2891 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks ; 4447 api.ProjectsSinksResourceApi res =
4448 new api.LoggingApi(mock).projects.sinks;
2892 var arg_parent = "foo"; 4449 var arg_parent = "foo";
2893 var arg_pageToken = "foo"; 4450 var arg_pageToken = "foo";
2894 var arg_pageSize = 42; 4451 var arg_pageSize = 42;
2895 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4452 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2896 var path = (req.url).path; 4453 var path = (req.url).path;
2897 var pathOffset = 0; 4454 var pathOffset = 0;
2898 var index; 4455 var index;
2899 var subPart; 4456 var subPart;
2900 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4457 unittest.expect(
4458 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2901 pathOffset += 1; 4459 pathOffset += 1;
2902 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4460 unittest.expect(
4461 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2903 pathOffset += 3; 4462 pathOffset += 3;
2904 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4463 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2905 4464
2906 var query = (req.url).query; 4465 var query = (req.url).query;
2907 var queryOffset = 0; 4466 var queryOffset = 0;
2908 var queryMap = {}; 4467 var queryMap = {};
2909 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4468 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2910 parseBool(n) { 4469 parseBool(n) {
2911 if (n == "true") return true; 4470 if (n == "true") return true;
2912 if (n == "false") return false; 4471 if (n == "false") return false;
2913 if (n == null) return null; 4472 if (n == null) return null;
2914 throw new core.ArgumentError("Invalid boolean: $n"); 4473 throw new core.ArgumentError("Invalid boolean: $n");
2915 } 4474 }
4475
2916 if (query.length > 0) { 4476 if (query.length > 0) {
2917 for (var part in query.split("&")) { 4477 for (var part in query.split("&")) {
2918 var keyvalue = part.split("="); 4478 var keyvalue = part.split("=");
2919 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4479 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4480 core.Uri.decodeQueryComponent(keyvalue[1]));
2920 } 4481 }
2921 } 4482 }
2922 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 4483 unittest.expect(
2923 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 4484 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2924 4485 unittest.expect(core.int.parse(queryMap["pageSize"].first),
4486 unittest.equals(arg_pageSize));
2925 4487
2926 var h = { 4488 var h = {
2927 "content-type" : "application/json; charset=utf-8", 4489 "content-type": "application/json; charset=utf-8",
2928 }; 4490 };
2929 var resp = convert.JSON.encode(buildListSinksResponse()); 4491 var resp = convert.JSON.encode(buildListSinksResponse());
2930 return new async.Future.value(stringResponse(200, h, resp)); 4492 return new async.Future.value(stringResponse(200, h, resp));
2931 }), true); 4493 }), true);
2932 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the n(unittest.expectAsync1(((api.ListSinksResponse response) { 4494 res
4495 .list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize)
4496 .then(unittest.expectAsync1(((api.ListSinksResponse response) {
2933 checkListSinksResponse(response); 4497 checkListSinksResponse(response);
2934 }))); 4498 })));
2935 }); 4499 });
2936 4500
2937 unittest.test("method--patch", () { 4501 unittest.test("method--patch", () {
2938
2939 var mock = new HttpServerMock(); 4502 var mock = new HttpServerMock();
2940 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks ; 4503 api.ProjectsSinksResourceApi res =
4504 new api.LoggingApi(mock).projects.sinks;
2941 var arg_request = buildLogSink(); 4505 var arg_request = buildLogSink();
2942 var arg_sinkName = "foo"; 4506 var arg_sinkName = "foo";
4507 var arg_updateMask = "foo";
2943 var arg_uniqueWriterIdentity = true; 4508 var arg_uniqueWriterIdentity = true;
2944 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4509 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2945 var obj = new api.LogSink.fromJson(json); 4510 var obj = new api.LogSink.fromJson(json);
2946 checkLogSink(obj); 4511 checkLogSink(obj);
2947 4512
2948 var path = (req.url).path; 4513 var path = (req.url).path;
2949 var pathOffset = 0; 4514 var pathOffset = 0;
2950 var index; 4515 var index;
2951 var subPart; 4516 var subPart;
2952 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4517 unittest.expect(
4518 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2953 pathOffset += 1; 4519 pathOffset += 1;
2954 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4520 unittest.expect(
4521 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
2955 pathOffset += 3; 4522 pathOffset += 3;
2956 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4523 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2957 4524
2958 var query = (req.url).query; 4525 var query = (req.url).query;
2959 var queryOffset = 0; 4526 var queryOffset = 0;
2960 var queryMap = {}; 4527 var queryMap = {};
2961 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4528 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2962 parseBool(n) { 4529 parseBool(n) {
2963 if (n == "true") return true; 4530 if (n == "true") return true;
2964 if (n == "false") return false; 4531 if (n == "false") return false;
2965 if (n == null) return null; 4532 if (n == null) return null;
2966 throw new core.ArgumentError("Invalid boolean: $n"); 4533 throw new core.ArgumentError("Invalid boolean: $n");
2967 } 4534 }
4535
2968 if (query.length > 0) { 4536 if (query.length > 0) {
2969 for (var part in query.split("&")) { 4537 for (var part in query.split("&")) {
2970 var keyvalue = part.split("="); 4538 var keyvalue = part.split("=");
2971 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4539 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4540 core.Uri.decodeQueryComponent(keyvalue[1]));
2972 } 4541 }
2973 } 4542 }
2974 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 4543 unittest.expect(
2975 4544 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
4545 unittest.expect(queryMap["uniqueWriterIdentity"].first,
4546 unittest.equals("$arg_uniqueWriterIdentity"));
2976 4547
2977 var h = { 4548 var h = {
2978 "content-type" : "application/json; charset=utf-8", 4549 "content-type": "application/json; charset=utf-8",
2979 }; 4550 };
2980 var resp = convert.JSON.encode(buildLogSink()); 4551 var resp = convert.JSON.encode(buildLogSink());
2981 return new async.Future.value(stringResponse(200, h, resp)); 4552 return new async.Future.value(stringResponse(200, h, resp));
2982 }), true); 4553 }), true);
2983 res.patch(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrite rIdentity).then(unittest.expectAsync1(((api.LogSink response) { 4554 res
4555 .patch(arg_request, arg_sinkName,
4556 updateMask: arg_updateMask,
4557 uniqueWriterIdentity: arg_uniqueWriterIdentity)
4558 .then(unittest.expectAsync1(((api.LogSink response) {
2984 checkLogSink(response); 4559 checkLogSink(response);
2985 }))); 4560 })));
2986 }); 4561 });
2987 4562
2988 unittest.test("method--update", () { 4563 unittest.test("method--update", () {
2989
2990 var mock = new HttpServerMock(); 4564 var mock = new HttpServerMock();
2991 api.ProjectsSinksResourceApi res = new api.LoggingApi(mock).projects.sinks ; 4565 api.ProjectsSinksResourceApi res =
4566 new api.LoggingApi(mock).projects.sinks;
2992 var arg_request = buildLogSink(); 4567 var arg_request = buildLogSink();
2993 var arg_sinkName = "foo"; 4568 var arg_sinkName = "foo";
4569 var arg_updateMask = "foo";
2994 var arg_uniqueWriterIdentity = true; 4570 var arg_uniqueWriterIdentity = true;
2995 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 4571 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2996 var obj = new api.LogSink.fromJson(json); 4572 var obj = new api.LogSink.fromJson(json);
2997 checkLogSink(obj); 4573 checkLogSink(obj);
2998 4574
2999 var path = (req.url).path; 4575 var path = (req.url).path;
3000 var pathOffset = 0; 4576 var pathOffset = 0;
3001 var index; 4577 var index;
3002 var subPart; 4578 var subPart;
3003 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 4579 unittest.expect(
4580 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
3004 pathOffset += 1; 4581 pathOffset += 1;
3005 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v2/")); 4582 unittest.expect(
4583 path.substring(pathOffset, pathOffset + 3), unittest.equals("v2/"));
3006 pathOffset += 3; 4584 pathOffset += 3;
3007 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 4585 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
3008 4586
3009 var query = (req.url).query; 4587 var query = (req.url).query;
3010 var queryOffset = 0; 4588 var queryOffset = 0;
3011 var queryMap = {}; 4589 var queryMap = {};
3012 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 4590 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
3013 parseBool(n) { 4591 parseBool(n) {
3014 if (n == "true") return true; 4592 if (n == "true") return true;
3015 if (n == "false") return false; 4593 if (n == "false") return false;
3016 if (n == null) return null; 4594 if (n == null) return null;
3017 throw new core.ArgumentError("Invalid boolean: $n"); 4595 throw new core.ArgumentError("Invalid boolean: $n");
3018 } 4596 }
4597
3019 if (query.length > 0) { 4598 if (query.length > 0) {
3020 for (var part in query.split("&")) { 4599 for (var part in query.split("&")) {
3021 var keyvalue = part.split("="); 4600 var keyvalue = part.split("=");
3022 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 4601 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
4602 core.Uri.decodeQueryComponent(keyvalue[1]));
3023 } 4603 }
3024 } 4604 }
3025 unittest.expect(queryMap["uniqueWriterIdentity"].first, unittest.equals( "$arg_uniqueWriterIdentity")); 4605 unittest.expect(
3026 4606 queryMap["updateMask"].first, unittest.equals(arg_updateMask));
4607 unittest.expect(queryMap["uniqueWriterIdentity"].first,
4608 unittest.equals("$arg_uniqueWriterIdentity"));
3027 4609
3028 var h = { 4610 var h = {
3029 "content-type" : "application/json; charset=utf-8", 4611 "content-type": "application/json; charset=utf-8",
3030 }; 4612 };
3031 var resp = convert.JSON.encode(buildLogSink()); 4613 var resp = convert.JSON.encode(buildLogSink());
3032 return new async.Future.value(stringResponse(200, h, resp)); 4614 return new async.Future.value(stringResponse(200, h, resp));
3033 }), true); 4615 }), true);
3034 res.update(arg_request, arg_sinkName, uniqueWriterIdentity: arg_uniqueWrit erIdentity).then(unittest.expectAsync1(((api.LogSink response) { 4616 res
4617 .update(arg_request, arg_sinkName,
4618 updateMask: arg_updateMask,
4619 uniqueWriterIdentity: arg_uniqueWriterIdentity)
4620 .then(unittest.expectAsync1(((api.LogSink response) {
3035 checkLogSink(response); 4621 checkLogSink(response);
3036 }))); 4622 })));
3037 }); 4623 });
3038
3039 }); 4624 });
3040
3041
3042 } 4625 }
3043
OLDNEW
« no previous file with comments | « generated/googleapis/test/licensing/v1_test.dart ('k') | generated/googleapis/test/manufacturers/v1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698