OLD | NEW |
1 library googleapis.serviceuser.v1.test; | 1 library googleapis.serviceuser.v1.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/serviceuser/v1.dart' as api; | 10 import 'package:googleapis/serviceuser/v1.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 |
54 buildUnnamed1776() { | 53 buildUnnamed1774() { |
55 var o = new core.List<api.Method>(); | 54 var o = new core.List<api.Method>(); |
56 o.add(buildMethod()); | 55 o.add(buildMethod()); |
57 o.add(buildMethod()); | 56 o.add(buildMethod()); |
58 return o; | 57 return o; |
59 } | 58 } |
60 | 59 |
61 checkUnnamed1776(core.List<api.Method> o) { | 60 checkUnnamed1774(core.List<api.Method> o) { |
62 unittest.expect(o, unittest.hasLength(2)); | 61 unittest.expect(o, unittest.hasLength(2)); |
63 checkMethod(o[0]); | 62 checkMethod(o[0]); |
64 checkMethod(o[1]); | 63 checkMethod(o[1]); |
65 } | 64 } |
66 | 65 |
67 buildUnnamed1777() { | 66 buildUnnamed1775() { |
68 var o = new core.List<api.Mixin>(); | 67 var o = new core.List<api.Mixin>(); |
69 o.add(buildMixin()); | 68 o.add(buildMixin()); |
70 o.add(buildMixin()); | 69 o.add(buildMixin()); |
71 return o; | 70 return o; |
72 } | 71 } |
73 | 72 |
74 checkUnnamed1777(core.List<api.Mixin> o) { | 73 checkUnnamed1775(core.List<api.Mixin> o) { |
75 unittest.expect(o, unittest.hasLength(2)); | 74 unittest.expect(o, unittest.hasLength(2)); |
76 checkMixin(o[0]); | 75 checkMixin(o[0]); |
77 checkMixin(o[1]); | 76 checkMixin(o[1]); |
78 } | 77 } |
79 | 78 |
80 buildUnnamed1778() { | 79 buildUnnamed1776() { |
81 var o = new core.List<api.Option>(); | 80 var o = new core.List<api.Option>(); |
82 o.add(buildOption()); | 81 o.add(buildOption()); |
83 o.add(buildOption()); | 82 o.add(buildOption()); |
84 return o; | 83 return o; |
85 } | 84 } |
86 | 85 |
87 checkUnnamed1778(core.List<api.Option> o) { | 86 checkUnnamed1776(core.List<api.Option> o) { |
88 unittest.expect(o, unittest.hasLength(2)); | 87 unittest.expect(o, unittest.hasLength(2)); |
89 checkOption(o[0]); | 88 checkOption(o[0]); |
90 checkOption(o[1]); | 89 checkOption(o[1]); |
91 } | 90 } |
92 | 91 |
93 core.int buildCounterApi = 0; | 92 core.int buildCounterApi = 0; |
94 buildApi() { | 93 buildApi() { |
95 var o = new api.Api(); | 94 var o = new api.Api(); |
96 buildCounterApi++; | 95 buildCounterApi++; |
97 if (buildCounterApi < 3) { | 96 if (buildCounterApi < 3) { |
98 o.methods = buildUnnamed1776(); | 97 o.methods = buildUnnamed1774(); |
99 o.mixins = buildUnnamed1777(); | 98 o.mixins = buildUnnamed1775(); |
100 o.name = "foo"; | 99 o.name = "foo"; |
101 o.options = buildUnnamed1778(); | 100 o.options = buildUnnamed1776(); |
102 o.sourceContext = buildSourceContext(); | 101 o.sourceContext = buildSourceContext(); |
103 o.syntax = "foo"; | 102 o.syntax = "foo"; |
104 o.version = "foo"; | 103 o.version = "foo"; |
105 } | 104 } |
106 buildCounterApi--; | 105 buildCounterApi--; |
107 return o; | 106 return o; |
108 } | 107 } |
109 | 108 |
110 checkApi(api.Api o) { | 109 checkApi(api.Api o) { |
111 buildCounterApi++; | 110 buildCounterApi++; |
112 if (buildCounterApi < 3) { | 111 if (buildCounterApi < 3) { |
113 checkUnnamed1776(o.methods); | 112 checkUnnamed1774(o.methods); |
114 checkUnnamed1777(o.mixins); | 113 checkUnnamed1775(o.mixins); |
115 unittest.expect(o.name, unittest.equals('foo')); | 114 unittest.expect(o.name, unittest.equals('foo')); |
116 checkUnnamed1778(o.options); | 115 checkUnnamed1776(o.options); |
117 checkSourceContext(o.sourceContext); | 116 checkSourceContext(o.sourceContext); |
118 unittest.expect(o.syntax, unittest.equals('foo')); | 117 unittest.expect(o.syntax, unittest.equals('foo')); |
119 unittest.expect(o.version, unittest.equals('foo')); | 118 unittest.expect(o.version, unittest.equals('foo')); |
120 } | 119 } |
121 buildCounterApi--; | 120 buildCounterApi--; |
122 } | 121 } |
123 | 122 |
124 core.int buildCounterAuthProvider = 0; | 123 core.int buildCounterAuthProvider = 0; |
125 buildAuthProvider() { | 124 buildAuthProvider() { |
126 var o = new api.AuthProvider(); | 125 var o = new api.AuthProvider(); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 161 |
163 checkAuthRequirement(api.AuthRequirement o) { | 162 checkAuthRequirement(api.AuthRequirement o) { |
164 buildCounterAuthRequirement++; | 163 buildCounterAuthRequirement++; |
165 if (buildCounterAuthRequirement < 3) { | 164 if (buildCounterAuthRequirement < 3) { |
166 unittest.expect(o.audiences, unittest.equals('foo')); | 165 unittest.expect(o.audiences, unittest.equals('foo')); |
167 unittest.expect(o.providerId, unittest.equals('foo')); | 166 unittest.expect(o.providerId, unittest.equals('foo')); |
168 } | 167 } |
169 buildCounterAuthRequirement--; | 168 buildCounterAuthRequirement--; |
170 } | 169 } |
171 | 170 |
172 buildUnnamed1779() { | 171 buildUnnamed1777() { |
173 var o = new core.List<api.AuthProvider>(); | 172 var o = new core.List<api.AuthProvider>(); |
174 o.add(buildAuthProvider()); | 173 o.add(buildAuthProvider()); |
175 o.add(buildAuthProvider()); | 174 o.add(buildAuthProvider()); |
176 return o; | 175 return o; |
177 } | 176 } |
178 | 177 |
179 checkUnnamed1779(core.List<api.AuthProvider> o) { | 178 checkUnnamed1777(core.List<api.AuthProvider> o) { |
180 unittest.expect(o, unittest.hasLength(2)); | 179 unittest.expect(o, unittest.hasLength(2)); |
181 checkAuthProvider(o[0]); | 180 checkAuthProvider(o[0]); |
182 checkAuthProvider(o[1]); | 181 checkAuthProvider(o[1]); |
183 } | 182 } |
184 | 183 |
185 buildUnnamed1780() { | 184 buildUnnamed1778() { |
186 var o = new core.List<api.AuthenticationRule>(); | 185 var o = new core.List<api.AuthenticationRule>(); |
187 o.add(buildAuthenticationRule()); | 186 o.add(buildAuthenticationRule()); |
188 o.add(buildAuthenticationRule()); | 187 o.add(buildAuthenticationRule()); |
189 return o; | 188 return o; |
190 } | 189 } |
191 | 190 |
192 checkUnnamed1780(core.List<api.AuthenticationRule> o) { | 191 checkUnnamed1778(core.List<api.AuthenticationRule> o) { |
193 unittest.expect(o, unittest.hasLength(2)); | 192 unittest.expect(o, unittest.hasLength(2)); |
194 checkAuthenticationRule(o[0]); | 193 checkAuthenticationRule(o[0]); |
195 checkAuthenticationRule(o[1]); | 194 checkAuthenticationRule(o[1]); |
196 } | 195 } |
197 | 196 |
198 core.int buildCounterAuthentication = 0; | 197 core.int buildCounterAuthentication = 0; |
199 buildAuthentication() { | 198 buildAuthentication() { |
200 var o = new api.Authentication(); | 199 var o = new api.Authentication(); |
201 buildCounterAuthentication++; | 200 buildCounterAuthentication++; |
202 if (buildCounterAuthentication < 3) { | 201 if (buildCounterAuthentication < 3) { |
203 o.providers = buildUnnamed1779(); | 202 o.providers = buildUnnamed1777(); |
204 o.rules = buildUnnamed1780(); | 203 o.rules = buildUnnamed1778(); |
205 } | 204 } |
206 buildCounterAuthentication--; | 205 buildCounterAuthentication--; |
207 return o; | 206 return o; |
208 } | 207 } |
209 | 208 |
210 checkAuthentication(api.Authentication o) { | 209 checkAuthentication(api.Authentication o) { |
211 buildCounterAuthentication++; | 210 buildCounterAuthentication++; |
212 if (buildCounterAuthentication < 3) { | 211 if (buildCounterAuthentication < 3) { |
213 checkUnnamed1779(o.providers); | 212 checkUnnamed1777(o.providers); |
214 checkUnnamed1780(o.rules); | 213 checkUnnamed1778(o.rules); |
215 } | 214 } |
216 buildCounterAuthentication--; | 215 buildCounterAuthentication--; |
217 } | 216 } |
218 | 217 |
219 buildUnnamed1781() { | 218 buildUnnamed1779() { |
220 var o = new core.List<api.AuthRequirement>(); | 219 var o = new core.List<api.AuthRequirement>(); |
221 o.add(buildAuthRequirement()); | 220 o.add(buildAuthRequirement()); |
222 o.add(buildAuthRequirement()); | 221 o.add(buildAuthRequirement()); |
223 return o; | 222 return o; |
224 } | 223 } |
225 | 224 |
226 checkUnnamed1781(core.List<api.AuthRequirement> o) { | 225 checkUnnamed1779(core.List<api.AuthRequirement> o) { |
227 unittest.expect(o, unittest.hasLength(2)); | 226 unittest.expect(o, unittest.hasLength(2)); |
228 checkAuthRequirement(o[0]); | 227 checkAuthRequirement(o[0]); |
229 checkAuthRequirement(o[1]); | 228 checkAuthRequirement(o[1]); |
230 } | 229 } |
231 | 230 |
232 core.int buildCounterAuthenticationRule = 0; | 231 core.int buildCounterAuthenticationRule = 0; |
233 buildAuthenticationRule() { | 232 buildAuthenticationRule() { |
234 var o = new api.AuthenticationRule(); | 233 var o = new api.AuthenticationRule(); |
235 buildCounterAuthenticationRule++; | 234 buildCounterAuthenticationRule++; |
236 if (buildCounterAuthenticationRule < 3) { | 235 if (buildCounterAuthenticationRule < 3) { |
237 o.allowWithoutCredential = true; | 236 o.allowWithoutCredential = true; |
238 o.customAuth = buildCustomAuthRequirements(); | 237 o.customAuth = buildCustomAuthRequirements(); |
239 o.oauth = buildOAuthRequirements(); | 238 o.oauth = buildOAuthRequirements(); |
240 o.requirements = buildUnnamed1781(); | 239 o.requirements = buildUnnamed1779(); |
241 o.selector = "foo"; | 240 o.selector = "foo"; |
242 } | 241 } |
243 buildCounterAuthenticationRule--; | 242 buildCounterAuthenticationRule--; |
244 return o; | 243 return o; |
245 } | 244 } |
246 | 245 |
247 checkAuthenticationRule(api.AuthenticationRule o) { | 246 checkAuthenticationRule(api.AuthenticationRule o) { |
248 buildCounterAuthenticationRule++; | 247 buildCounterAuthenticationRule++; |
249 if (buildCounterAuthenticationRule < 3) { | 248 if (buildCounterAuthenticationRule < 3) { |
250 unittest.expect(o.allowWithoutCredential, unittest.isTrue); | 249 unittest.expect(o.allowWithoutCredential, unittest.isTrue); |
251 checkCustomAuthRequirements(o.customAuth); | 250 checkCustomAuthRequirements(o.customAuth); |
252 checkOAuthRequirements(o.oauth); | 251 checkOAuthRequirements(o.oauth); |
253 checkUnnamed1781(o.requirements); | 252 checkUnnamed1779(o.requirements); |
254 unittest.expect(o.selector, unittest.equals('foo')); | 253 unittest.expect(o.selector, unittest.equals('foo')); |
255 } | 254 } |
256 buildCounterAuthenticationRule--; | 255 buildCounterAuthenticationRule--; |
257 } | 256 } |
258 | 257 |
259 core.int buildCounterAuthorizationConfig = 0; | 258 core.int buildCounterAuthorizationConfig = 0; |
260 buildAuthorizationConfig() { | 259 buildAuthorizationConfig() { |
261 var o = new api.AuthorizationConfig(); | 260 var o = new api.AuthorizationConfig(); |
262 buildCounterAuthorizationConfig++; | 261 buildCounterAuthorizationConfig++; |
263 if (buildCounterAuthorizationConfig < 3) { | 262 if (buildCounterAuthorizationConfig < 3) { |
(...skipping 25 matching lines...) Expand all Loading... |
289 | 288 |
290 checkAuthorizationRule(api.AuthorizationRule o) { | 289 checkAuthorizationRule(api.AuthorizationRule o) { |
291 buildCounterAuthorizationRule++; | 290 buildCounterAuthorizationRule++; |
292 if (buildCounterAuthorizationRule < 3) { | 291 if (buildCounterAuthorizationRule < 3) { |
293 unittest.expect(o.permissions, unittest.equals('foo')); | 292 unittest.expect(o.permissions, unittest.equals('foo')); |
294 unittest.expect(o.selector, unittest.equals('foo')); | 293 unittest.expect(o.selector, unittest.equals('foo')); |
295 } | 294 } |
296 buildCounterAuthorizationRule--; | 295 buildCounterAuthorizationRule--; |
297 } | 296 } |
298 | 297 |
299 buildUnnamed1782() { | 298 buildUnnamed1780() { |
300 var o = new core.List<api.BackendRule>(); | 299 var o = new core.List<api.BackendRule>(); |
301 o.add(buildBackendRule()); | 300 o.add(buildBackendRule()); |
302 o.add(buildBackendRule()); | 301 o.add(buildBackendRule()); |
303 return o; | 302 return o; |
304 } | 303 } |
305 | 304 |
306 checkUnnamed1782(core.List<api.BackendRule> o) { | 305 checkUnnamed1780(core.List<api.BackendRule> o) { |
307 unittest.expect(o, unittest.hasLength(2)); | 306 unittest.expect(o, unittest.hasLength(2)); |
308 checkBackendRule(o[0]); | 307 checkBackendRule(o[0]); |
309 checkBackendRule(o[1]); | 308 checkBackendRule(o[1]); |
310 } | 309 } |
311 | 310 |
312 core.int buildCounterBackend = 0; | 311 core.int buildCounterBackend = 0; |
313 buildBackend() { | 312 buildBackend() { |
314 var o = new api.Backend(); | 313 var o = new api.Backend(); |
315 buildCounterBackend++; | 314 buildCounterBackend++; |
316 if (buildCounterBackend < 3) { | 315 if (buildCounterBackend < 3) { |
317 o.rules = buildUnnamed1782(); | 316 o.rules = buildUnnamed1780(); |
318 } | 317 } |
319 buildCounterBackend--; | 318 buildCounterBackend--; |
320 return o; | 319 return o; |
321 } | 320 } |
322 | 321 |
323 checkBackend(api.Backend o) { | 322 checkBackend(api.Backend o) { |
324 buildCounterBackend++; | 323 buildCounterBackend++; |
325 if (buildCounterBackend < 3) { | 324 if (buildCounterBackend < 3) { |
326 checkUnnamed1782(o.rules); | 325 checkUnnamed1780(o.rules); |
327 } | 326 } |
328 buildCounterBackend--; | 327 buildCounterBackend--; |
329 } | 328 } |
330 | 329 |
331 core.int buildCounterBackendRule = 0; | 330 core.int buildCounterBackendRule = 0; |
332 buildBackendRule() { | 331 buildBackendRule() { |
333 var o = new api.BackendRule(); | 332 var o = new api.BackendRule(); |
334 buildCounterBackendRule++; | 333 buildCounterBackendRule++; |
335 if (buildCounterBackendRule < 3) { | 334 if (buildCounterBackendRule < 3) { |
336 o.address = "foo"; | 335 o.address = "foo"; |
337 o.deadline = 42.0; | 336 o.deadline = 42.0; |
338 o.minDeadline = 42.0; | 337 o.minDeadline = 42.0; |
339 o.selector = "foo"; | 338 o.selector = "foo"; |
340 } | 339 } |
341 buildCounterBackendRule--; | 340 buildCounterBackendRule--; |
342 return o; | 341 return o; |
343 } | 342 } |
344 | 343 |
345 checkBackendRule(api.BackendRule o) { | 344 checkBackendRule(api.BackendRule o) { |
346 buildCounterBackendRule++; | 345 buildCounterBackendRule++; |
347 if (buildCounterBackendRule < 3) { | 346 if (buildCounterBackendRule < 3) { |
348 unittest.expect(o.address, unittest.equals('foo')); | 347 unittest.expect(o.address, unittest.equals('foo')); |
349 unittest.expect(o.deadline, unittest.equals(42.0)); | 348 unittest.expect(o.deadline, unittest.equals(42.0)); |
350 unittest.expect(o.minDeadline, unittest.equals(42.0)); | 349 unittest.expect(o.minDeadline, unittest.equals(42.0)); |
351 unittest.expect(o.selector, unittest.equals('foo')); | 350 unittest.expect(o.selector, unittest.equals('foo')); |
352 } | 351 } |
353 buildCounterBackendRule--; | 352 buildCounterBackendRule--; |
354 } | 353 } |
355 | 354 |
356 buildUnnamed1783() { | 355 buildUnnamed1781() { |
357 var o = new core.List<api.ContextRule>(); | 356 var o = new core.List<api.ContextRule>(); |
358 o.add(buildContextRule()); | 357 o.add(buildContextRule()); |
359 o.add(buildContextRule()); | 358 o.add(buildContextRule()); |
360 return o; | 359 return o; |
361 } | 360 } |
362 | 361 |
363 checkUnnamed1783(core.List<api.ContextRule> o) { | 362 checkUnnamed1781(core.List<api.ContextRule> o) { |
364 unittest.expect(o, unittest.hasLength(2)); | 363 unittest.expect(o, unittest.hasLength(2)); |
365 checkContextRule(o[0]); | 364 checkContextRule(o[0]); |
366 checkContextRule(o[1]); | 365 checkContextRule(o[1]); |
367 } | 366 } |
368 | 367 |
369 core.int buildCounterContext = 0; | 368 core.int buildCounterContext = 0; |
370 buildContext() { | 369 buildContext() { |
371 var o = new api.Context(); | 370 var o = new api.Context(); |
372 buildCounterContext++; | 371 buildCounterContext++; |
373 if (buildCounterContext < 3) { | 372 if (buildCounterContext < 3) { |
374 o.rules = buildUnnamed1783(); | 373 o.rules = buildUnnamed1781(); |
375 } | 374 } |
376 buildCounterContext--; | 375 buildCounterContext--; |
377 return o; | 376 return o; |
378 } | 377 } |
379 | 378 |
380 checkContext(api.Context o) { | 379 checkContext(api.Context o) { |
381 buildCounterContext++; | 380 buildCounterContext++; |
382 if (buildCounterContext < 3) { | 381 if (buildCounterContext < 3) { |
383 checkUnnamed1783(o.rules); | 382 checkUnnamed1781(o.rules); |
384 } | 383 } |
385 buildCounterContext--; | 384 buildCounterContext--; |
386 } | 385 } |
387 | 386 |
388 buildUnnamed1784() { | 387 buildUnnamed1782() { |
389 var o = new core.List<core.String>(); | 388 var o = new core.List<core.String>(); |
390 o.add("foo"); | 389 o.add("foo"); |
391 o.add("foo"); | 390 o.add("foo"); |
392 return o; | 391 return o; |
393 } | 392 } |
394 | 393 |
395 checkUnnamed1784(core.List<core.String> o) { | 394 checkUnnamed1782(core.List<core.String> o) { |
396 unittest.expect(o, unittest.hasLength(2)); | 395 unittest.expect(o, unittest.hasLength(2)); |
397 unittest.expect(o[0], unittest.equals('foo')); | 396 unittest.expect(o[0], unittest.equals('foo')); |
398 unittest.expect(o[1], unittest.equals('foo')); | 397 unittest.expect(o[1], unittest.equals('foo')); |
399 } | 398 } |
400 | 399 |
401 buildUnnamed1785() { | 400 buildUnnamed1783() { |
402 var o = new core.List<core.String>(); | 401 var o = new core.List<core.String>(); |
403 o.add("foo"); | 402 o.add("foo"); |
404 o.add("foo"); | 403 o.add("foo"); |
405 return o; | 404 return o; |
406 } | 405 } |
407 | 406 |
408 checkUnnamed1785(core.List<core.String> o) { | 407 checkUnnamed1783(core.List<core.String> o) { |
409 unittest.expect(o, unittest.hasLength(2)); | 408 unittest.expect(o, unittest.hasLength(2)); |
410 unittest.expect(o[0], unittest.equals('foo')); | 409 unittest.expect(o[0], unittest.equals('foo')); |
411 unittest.expect(o[1], unittest.equals('foo')); | 410 unittest.expect(o[1], unittest.equals('foo')); |
412 } | 411 } |
413 | 412 |
414 core.int buildCounterContextRule = 0; | 413 core.int buildCounterContextRule = 0; |
415 buildContextRule() { | 414 buildContextRule() { |
416 var o = new api.ContextRule(); | 415 var o = new api.ContextRule(); |
417 buildCounterContextRule++; | 416 buildCounterContextRule++; |
418 if (buildCounterContextRule < 3) { | 417 if (buildCounterContextRule < 3) { |
419 o.provided = buildUnnamed1784(); | 418 o.provided = buildUnnamed1782(); |
420 o.requested = buildUnnamed1785(); | 419 o.requested = buildUnnamed1783(); |
421 o.selector = "foo"; | 420 o.selector = "foo"; |
422 } | 421 } |
423 buildCounterContextRule--; | 422 buildCounterContextRule--; |
424 return o; | 423 return o; |
425 } | 424 } |
426 | 425 |
427 checkContextRule(api.ContextRule o) { | 426 checkContextRule(api.ContextRule o) { |
428 buildCounterContextRule++; | 427 buildCounterContextRule++; |
429 if (buildCounterContextRule < 3) { | 428 if (buildCounterContextRule < 3) { |
430 checkUnnamed1784(o.provided); | 429 checkUnnamed1782(o.provided); |
431 checkUnnamed1785(o.requested); | 430 checkUnnamed1783(o.requested); |
432 unittest.expect(o.selector, unittest.equals('foo')); | 431 unittest.expect(o.selector, unittest.equals('foo')); |
433 } | 432 } |
434 buildCounterContextRule--; | 433 buildCounterContextRule--; |
435 } | 434 } |
436 | 435 |
437 core.int buildCounterControl = 0; | 436 core.int buildCounterControl = 0; |
438 buildControl() { | 437 buildControl() { |
439 var o = new api.Control(); | 438 var o = new api.Control(); |
440 buildCounterControl++; | 439 buildCounterControl++; |
441 if (buildCounterControl < 3) { | 440 if (buildCounterControl < 3) { |
(...skipping 23 matching lines...) Expand all Loading... |
465 } | 464 } |
466 | 465 |
467 checkCustomAuthRequirements(api.CustomAuthRequirements o) { | 466 checkCustomAuthRequirements(api.CustomAuthRequirements o) { |
468 buildCounterCustomAuthRequirements++; | 467 buildCounterCustomAuthRequirements++; |
469 if (buildCounterCustomAuthRequirements < 3) { | 468 if (buildCounterCustomAuthRequirements < 3) { |
470 unittest.expect(o.provider, unittest.equals('foo')); | 469 unittest.expect(o.provider, unittest.equals('foo')); |
471 } | 470 } |
472 buildCounterCustomAuthRequirements--; | 471 buildCounterCustomAuthRequirements--; |
473 } | 472 } |
474 | 473 |
475 buildUnnamed1786() { | 474 buildUnnamed1784() { |
476 var o = new core.List<api.CustomErrorRule>(); | 475 var o = new core.List<api.CustomErrorRule>(); |
477 o.add(buildCustomErrorRule()); | 476 o.add(buildCustomErrorRule()); |
478 o.add(buildCustomErrorRule()); | 477 o.add(buildCustomErrorRule()); |
479 return o; | 478 return o; |
480 } | 479 } |
481 | 480 |
482 checkUnnamed1786(core.List<api.CustomErrorRule> o) { | 481 checkUnnamed1784(core.List<api.CustomErrorRule> o) { |
483 unittest.expect(o, unittest.hasLength(2)); | 482 unittest.expect(o, unittest.hasLength(2)); |
484 checkCustomErrorRule(o[0]); | 483 checkCustomErrorRule(o[0]); |
485 checkCustomErrorRule(o[1]); | 484 checkCustomErrorRule(o[1]); |
486 } | 485 } |
487 | 486 |
488 buildUnnamed1787() { | 487 buildUnnamed1785() { |
489 var o = new core.List<core.String>(); | 488 var o = new core.List<core.String>(); |
490 o.add("foo"); | 489 o.add("foo"); |
491 o.add("foo"); | 490 o.add("foo"); |
492 return o; | 491 return o; |
493 } | 492 } |
494 | 493 |
495 checkUnnamed1787(core.List<core.String> o) { | 494 checkUnnamed1785(core.List<core.String> o) { |
496 unittest.expect(o, unittest.hasLength(2)); | 495 unittest.expect(o, unittest.hasLength(2)); |
497 unittest.expect(o[0], unittest.equals('foo')); | 496 unittest.expect(o[0], unittest.equals('foo')); |
498 unittest.expect(o[1], unittest.equals('foo')); | 497 unittest.expect(o[1], unittest.equals('foo')); |
499 } | 498 } |
500 | 499 |
501 core.int buildCounterCustomError = 0; | 500 core.int buildCounterCustomError = 0; |
502 buildCustomError() { | 501 buildCustomError() { |
503 var o = new api.CustomError(); | 502 var o = new api.CustomError(); |
504 buildCounterCustomError++; | 503 buildCounterCustomError++; |
505 if (buildCounterCustomError < 3) { | 504 if (buildCounterCustomError < 3) { |
506 o.rules = buildUnnamed1786(); | 505 o.rules = buildUnnamed1784(); |
507 o.types = buildUnnamed1787(); | 506 o.types = buildUnnamed1785(); |
508 } | 507 } |
509 buildCounterCustomError--; | 508 buildCounterCustomError--; |
510 return o; | 509 return o; |
511 } | 510 } |
512 | 511 |
513 checkCustomError(api.CustomError o) { | 512 checkCustomError(api.CustomError o) { |
514 buildCounterCustomError++; | 513 buildCounterCustomError++; |
515 if (buildCounterCustomError < 3) { | 514 if (buildCounterCustomError < 3) { |
516 checkUnnamed1786(o.rules); | 515 checkUnnamed1784(o.rules); |
517 checkUnnamed1787(o.types); | 516 checkUnnamed1785(o.types); |
518 } | 517 } |
519 buildCounterCustomError--; | 518 buildCounterCustomError--; |
520 } | 519 } |
521 | 520 |
522 core.int buildCounterCustomErrorRule = 0; | 521 core.int buildCounterCustomErrorRule = 0; |
523 buildCustomErrorRule() { | 522 buildCustomErrorRule() { |
524 var o = new api.CustomErrorRule(); | 523 var o = new api.CustomErrorRule(); |
525 buildCounterCustomErrorRule++; | 524 buildCounterCustomErrorRule++; |
526 if (buildCounterCustomErrorRule < 3) { | 525 if (buildCounterCustomErrorRule < 3) { |
527 o.isErrorType = true; | 526 o.isErrorType = true; |
(...skipping 30 matching lines...) Expand all Loading... |
558 unittest.expect(o.kind, unittest.equals('foo')); | 557 unittest.expect(o.kind, unittest.equals('foo')); |
559 unittest.expect(o.path, unittest.equals('foo')); | 558 unittest.expect(o.path, unittest.equals('foo')); |
560 } | 559 } |
561 buildCounterCustomHttpPattern--; | 560 buildCounterCustomHttpPattern--; |
562 } | 561 } |
563 | 562 |
564 core.int buildCounterDisableServiceRequest = 0; | 563 core.int buildCounterDisableServiceRequest = 0; |
565 buildDisableServiceRequest() { | 564 buildDisableServiceRequest() { |
566 var o = new api.DisableServiceRequest(); | 565 var o = new api.DisableServiceRequest(); |
567 buildCounterDisableServiceRequest++; | 566 buildCounterDisableServiceRequest++; |
568 if (buildCounterDisableServiceRequest < 3) { | 567 if (buildCounterDisableServiceRequest < 3) {} |
569 } | |
570 buildCounterDisableServiceRequest--; | 568 buildCounterDisableServiceRequest--; |
571 return o; | 569 return o; |
572 } | 570 } |
573 | 571 |
574 checkDisableServiceRequest(api.DisableServiceRequest o) { | 572 checkDisableServiceRequest(api.DisableServiceRequest o) { |
575 buildCounterDisableServiceRequest++; | 573 buildCounterDisableServiceRequest++; |
576 if (buildCounterDisableServiceRequest < 3) { | 574 if (buildCounterDisableServiceRequest < 3) {} |
577 } | |
578 buildCounterDisableServiceRequest--; | 575 buildCounterDisableServiceRequest--; |
579 } | 576 } |
580 | 577 |
581 buildUnnamed1788() { | 578 buildUnnamed1786() { |
582 var o = new core.List<api.Page>(); | 579 var o = new core.List<api.Page>(); |
583 o.add(buildPage()); | 580 o.add(buildPage()); |
584 o.add(buildPage()); | 581 o.add(buildPage()); |
585 return o; | 582 return o; |
586 } | 583 } |
587 | 584 |
588 checkUnnamed1788(core.List<api.Page> o) { | 585 checkUnnamed1786(core.List<api.Page> o) { |
589 unittest.expect(o, unittest.hasLength(2)); | 586 unittest.expect(o, unittest.hasLength(2)); |
590 checkPage(o[0]); | 587 checkPage(o[0]); |
591 checkPage(o[1]); | 588 checkPage(o[1]); |
592 } | 589 } |
593 | 590 |
594 buildUnnamed1789() { | 591 buildUnnamed1787() { |
595 var o = new core.List<api.DocumentationRule>(); | 592 var o = new core.List<api.DocumentationRule>(); |
596 o.add(buildDocumentationRule()); | 593 o.add(buildDocumentationRule()); |
597 o.add(buildDocumentationRule()); | 594 o.add(buildDocumentationRule()); |
598 return o; | 595 return o; |
599 } | 596 } |
600 | 597 |
601 checkUnnamed1789(core.List<api.DocumentationRule> o) { | 598 checkUnnamed1787(core.List<api.DocumentationRule> o) { |
602 unittest.expect(o, unittest.hasLength(2)); | 599 unittest.expect(o, unittest.hasLength(2)); |
603 checkDocumentationRule(o[0]); | 600 checkDocumentationRule(o[0]); |
604 checkDocumentationRule(o[1]); | 601 checkDocumentationRule(o[1]); |
605 } | 602 } |
606 | 603 |
607 core.int buildCounterDocumentation = 0; | 604 core.int buildCounterDocumentation = 0; |
608 buildDocumentation() { | 605 buildDocumentation() { |
609 var o = new api.Documentation(); | 606 var o = new api.Documentation(); |
610 buildCounterDocumentation++; | 607 buildCounterDocumentation++; |
611 if (buildCounterDocumentation < 3) { | 608 if (buildCounterDocumentation < 3) { |
612 o.documentationRootUrl = "foo"; | 609 o.documentationRootUrl = "foo"; |
613 o.overview = "foo"; | 610 o.overview = "foo"; |
614 o.pages = buildUnnamed1788(); | 611 o.pages = buildUnnamed1786(); |
615 o.rules = buildUnnamed1789(); | 612 o.rules = buildUnnamed1787(); |
616 o.summary = "foo"; | 613 o.summary = "foo"; |
617 } | 614 } |
618 buildCounterDocumentation--; | 615 buildCounterDocumentation--; |
619 return o; | 616 return o; |
620 } | 617 } |
621 | 618 |
622 checkDocumentation(api.Documentation o) { | 619 checkDocumentation(api.Documentation o) { |
623 buildCounterDocumentation++; | 620 buildCounterDocumentation++; |
624 if (buildCounterDocumentation < 3) { | 621 if (buildCounterDocumentation < 3) { |
625 unittest.expect(o.documentationRootUrl, unittest.equals('foo')); | 622 unittest.expect(o.documentationRootUrl, unittest.equals('foo')); |
626 unittest.expect(o.overview, unittest.equals('foo')); | 623 unittest.expect(o.overview, unittest.equals('foo')); |
627 checkUnnamed1788(o.pages); | 624 checkUnnamed1786(o.pages); |
628 checkUnnamed1789(o.rules); | 625 checkUnnamed1787(o.rules); |
629 unittest.expect(o.summary, unittest.equals('foo')); | 626 unittest.expect(o.summary, unittest.equals('foo')); |
630 } | 627 } |
631 buildCounterDocumentation--; | 628 buildCounterDocumentation--; |
632 } | 629 } |
633 | 630 |
634 core.int buildCounterDocumentationRule = 0; | 631 core.int buildCounterDocumentationRule = 0; |
635 buildDocumentationRule() { | 632 buildDocumentationRule() { |
636 var o = new api.DocumentationRule(); | 633 var o = new api.DocumentationRule(); |
637 buildCounterDocumentationRule++; | 634 buildCounterDocumentationRule++; |
638 if (buildCounterDocumentationRule < 3) { | 635 if (buildCounterDocumentationRule < 3) { |
(...skipping 12 matching lines...) Expand all Loading... |
651 unittest.expect(o.description, unittest.equals('foo')); | 648 unittest.expect(o.description, unittest.equals('foo')); |
652 unittest.expect(o.selector, unittest.equals('foo')); | 649 unittest.expect(o.selector, unittest.equals('foo')); |
653 } | 650 } |
654 buildCounterDocumentationRule--; | 651 buildCounterDocumentationRule--; |
655 } | 652 } |
656 | 653 |
657 core.int buildCounterEnableServiceRequest = 0; | 654 core.int buildCounterEnableServiceRequest = 0; |
658 buildEnableServiceRequest() { | 655 buildEnableServiceRequest() { |
659 var o = new api.EnableServiceRequest(); | 656 var o = new api.EnableServiceRequest(); |
660 buildCounterEnableServiceRequest++; | 657 buildCounterEnableServiceRequest++; |
661 if (buildCounterEnableServiceRequest < 3) { | 658 if (buildCounterEnableServiceRequest < 3) {} |
662 } | |
663 buildCounterEnableServiceRequest--; | 659 buildCounterEnableServiceRequest--; |
664 return o; | 660 return o; |
665 } | 661 } |
666 | 662 |
667 checkEnableServiceRequest(api.EnableServiceRequest o) { | 663 checkEnableServiceRequest(api.EnableServiceRequest o) { |
668 buildCounterEnableServiceRequest++; | 664 buildCounterEnableServiceRequest++; |
669 if (buildCounterEnableServiceRequest < 3) { | 665 if (buildCounterEnableServiceRequest < 3) {} |
670 } | |
671 buildCounterEnableServiceRequest--; | 666 buildCounterEnableServiceRequest--; |
672 } | 667 } |
673 | 668 |
| 669 buildUnnamed1788() { |
| 670 var o = new core.List<core.String>(); |
| 671 o.add("foo"); |
| 672 o.add("foo"); |
| 673 return o; |
| 674 } |
| 675 |
| 676 checkUnnamed1788(core.List<core.String> o) { |
| 677 unittest.expect(o, unittest.hasLength(2)); |
| 678 unittest.expect(o[0], unittest.equals('foo')); |
| 679 unittest.expect(o[1], unittest.equals('foo')); |
| 680 } |
| 681 |
| 682 buildUnnamed1789() { |
| 683 var o = new core.List<core.String>(); |
| 684 o.add("foo"); |
| 685 o.add("foo"); |
| 686 return o; |
| 687 } |
| 688 |
| 689 checkUnnamed1789(core.List<core.String> o) { |
| 690 unittest.expect(o, unittest.hasLength(2)); |
| 691 unittest.expect(o[0], unittest.equals('foo')); |
| 692 unittest.expect(o[1], unittest.equals('foo')); |
| 693 } |
| 694 |
674 buildUnnamed1790() { | 695 buildUnnamed1790() { |
675 var o = new core.List<core.String>(); | 696 var o = new core.List<core.String>(); |
676 o.add("foo"); | 697 o.add("foo"); |
677 o.add("foo"); | 698 o.add("foo"); |
678 return o; | 699 return o; |
679 } | 700 } |
680 | 701 |
681 checkUnnamed1790(core.List<core.String> o) { | 702 checkUnnamed1790(core.List<core.String> o) { |
682 unittest.expect(o, unittest.hasLength(2)); | 703 unittest.expect(o, unittest.hasLength(2)); |
683 unittest.expect(o[0], unittest.equals('foo')); | 704 unittest.expect(o[0], unittest.equals('foo')); |
684 unittest.expect(o[1], unittest.equals('foo')); | 705 unittest.expect(o[1], unittest.equals('foo')); |
685 } | |
686 | |
687 buildUnnamed1791() { | |
688 var o = new core.List<core.String>(); | |
689 o.add("foo"); | |
690 o.add("foo"); | |
691 return o; | |
692 } | |
693 | |
694 checkUnnamed1791(core.List<core.String> o) { | |
695 unittest.expect(o, unittest.hasLength(2)); | |
696 unittest.expect(o[0], unittest.equals('foo')); | |
697 unittest.expect(o[1], unittest.equals('foo')); | |
698 } | |
699 | |
700 buildUnnamed1792() { | |
701 var o = new core.List<core.String>(); | |
702 o.add("foo"); | |
703 o.add("foo"); | |
704 return o; | |
705 } | |
706 | |
707 checkUnnamed1792(core.List<core.String> o) { | |
708 unittest.expect(o, unittest.hasLength(2)); | |
709 unittest.expect(o[0], unittest.equals('foo')); | |
710 unittest.expect(o[1], unittest.equals('foo')); | |
711 } | 706 } |
712 | 707 |
713 core.int buildCounterEndpoint = 0; | 708 core.int buildCounterEndpoint = 0; |
714 buildEndpoint() { | 709 buildEndpoint() { |
715 var o = new api.Endpoint(); | 710 var o = new api.Endpoint(); |
716 buildCounterEndpoint++; | 711 buildCounterEndpoint++; |
717 if (buildCounterEndpoint < 3) { | 712 if (buildCounterEndpoint < 3) { |
718 o.aliases = buildUnnamed1790(); | 713 o.aliases = buildUnnamed1788(); |
719 o.allowCors = true; | 714 o.allowCors = true; |
720 o.apis = buildUnnamed1791(); | 715 o.apis = buildUnnamed1789(); |
721 o.features = buildUnnamed1792(); | 716 o.features = buildUnnamed1790(); |
722 o.name = "foo"; | 717 o.name = "foo"; |
723 o.target = "foo"; | 718 o.target = "foo"; |
724 } | 719 } |
725 buildCounterEndpoint--; | 720 buildCounterEndpoint--; |
726 return o; | 721 return o; |
727 } | 722 } |
728 | 723 |
729 checkEndpoint(api.Endpoint o) { | 724 checkEndpoint(api.Endpoint o) { |
730 buildCounterEndpoint++; | 725 buildCounterEndpoint++; |
731 if (buildCounterEndpoint < 3) { | 726 if (buildCounterEndpoint < 3) { |
732 checkUnnamed1790(o.aliases); | 727 checkUnnamed1788(o.aliases); |
733 unittest.expect(o.allowCors, unittest.isTrue); | 728 unittest.expect(o.allowCors, unittest.isTrue); |
734 checkUnnamed1791(o.apis); | 729 checkUnnamed1789(o.apis); |
735 checkUnnamed1792(o.features); | 730 checkUnnamed1790(o.features); |
736 unittest.expect(o.name, unittest.equals('foo')); | 731 unittest.expect(o.name, unittest.equals('foo')); |
737 unittest.expect(o.target, unittest.equals('foo')); | 732 unittest.expect(o.target, unittest.equals('foo')); |
738 } | 733 } |
739 buildCounterEndpoint--; | 734 buildCounterEndpoint--; |
740 } | 735 } |
741 | 736 |
742 buildUnnamed1793() { | 737 buildUnnamed1791() { |
743 var o = new core.List<api.EnumValue>(); | 738 var o = new core.List<api.EnumValue>(); |
744 o.add(buildEnumValue()); | 739 o.add(buildEnumValue()); |
745 o.add(buildEnumValue()); | 740 o.add(buildEnumValue()); |
746 return o; | 741 return o; |
747 } | 742 } |
748 | 743 |
749 checkUnnamed1793(core.List<api.EnumValue> o) { | 744 checkUnnamed1791(core.List<api.EnumValue> o) { |
750 unittest.expect(o, unittest.hasLength(2)); | 745 unittest.expect(o, unittest.hasLength(2)); |
751 checkEnumValue(o[0]); | 746 checkEnumValue(o[0]); |
752 checkEnumValue(o[1]); | 747 checkEnumValue(o[1]); |
753 } | 748 } |
754 | 749 |
755 buildUnnamed1794() { | 750 buildUnnamed1792() { |
756 var o = new core.List<api.Option>(); | 751 var o = new core.List<api.Option>(); |
757 o.add(buildOption()); | 752 o.add(buildOption()); |
758 o.add(buildOption()); | 753 o.add(buildOption()); |
759 return o; | 754 return o; |
760 } | 755 } |
761 | 756 |
762 checkUnnamed1794(core.List<api.Option> o) { | 757 checkUnnamed1792(core.List<api.Option> o) { |
763 unittest.expect(o, unittest.hasLength(2)); | 758 unittest.expect(o, unittest.hasLength(2)); |
764 checkOption(o[0]); | 759 checkOption(o[0]); |
765 checkOption(o[1]); | 760 checkOption(o[1]); |
766 } | 761 } |
767 | 762 |
768 core.int buildCounterEnum = 0; | 763 core.int buildCounterEnum = 0; |
769 buildEnum() { | 764 buildEnum() { |
770 var o = new api.Enum(); | 765 var o = new api.Enum(); |
771 buildCounterEnum++; | 766 buildCounterEnum++; |
772 if (buildCounterEnum < 3) { | 767 if (buildCounterEnum < 3) { |
773 o.enumvalue = buildUnnamed1793(); | 768 o.enumvalue = buildUnnamed1791(); |
774 o.name = "foo"; | 769 o.name = "foo"; |
775 o.options = buildUnnamed1794(); | 770 o.options = buildUnnamed1792(); |
776 o.sourceContext = buildSourceContext(); | 771 o.sourceContext = buildSourceContext(); |
777 o.syntax = "foo"; | 772 o.syntax = "foo"; |
778 } | 773 } |
779 buildCounterEnum--; | 774 buildCounterEnum--; |
780 return o; | 775 return o; |
781 } | 776 } |
782 | 777 |
783 checkEnum(api.Enum o) { | 778 checkEnum(api.Enum o) { |
784 buildCounterEnum++; | 779 buildCounterEnum++; |
785 if (buildCounterEnum < 3) { | 780 if (buildCounterEnum < 3) { |
786 checkUnnamed1793(o.enumvalue); | 781 checkUnnamed1791(o.enumvalue); |
787 unittest.expect(o.name, unittest.equals('foo')); | 782 unittest.expect(o.name, unittest.equals('foo')); |
788 checkUnnamed1794(o.options); | 783 checkUnnamed1792(o.options); |
789 checkSourceContext(o.sourceContext); | 784 checkSourceContext(o.sourceContext); |
790 unittest.expect(o.syntax, unittest.equals('foo')); | 785 unittest.expect(o.syntax, unittest.equals('foo')); |
791 } | 786 } |
792 buildCounterEnum--; | 787 buildCounterEnum--; |
793 } | 788 } |
794 | 789 |
795 buildUnnamed1795() { | 790 buildUnnamed1793() { |
796 var o = new core.List<api.Option>(); | 791 var o = new core.List<api.Option>(); |
797 o.add(buildOption()); | 792 o.add(buildOption()); |
798 o.add(buildOption()); | 793 o.add(buildOption()); |
799 return o; | 794 return o; |
800 } | 795 } |
801 | 796 |
802 checkUnnamed1795(core.List<api.Option> o) { | 797 checkUnnamed1793(core.List<api.Option> o) { |
803 unittest.expect(o, unittest.hasLength(2)); | 798 unittest.expect(o, unittest.hasLength(2)); |
804 checkOption(o[0]); | 799 checkOption(o[0]); |
805 checkOption(o[1]); | 800 checkOption(o[1]); |
806 } | 801 } |
807 | 802 |
808 core.int buildCounterEnumValue = 0; | 803 core.int buildCounterEnumValue = 0; |
809 buildEnumValue() { | 804 buildEnumValue() { |
810 var o = new api.EnumValue(); | 805 var o = new api.EnumValue(); |
811 buildCounterEnumValue++; | 806 buildCounterEnumValue++; |
812 if (buildCounterEnumValue < 3) { | 807 if (buildCounterEnumValue < 3) { |
813 o.name = "foo"; | 808 o.name = "foo"; |
814 o.number = 42; | 809 o.number = 42; |
815 o.options = buildUnnamed1795(); | 810 o.options = buildUnnamed1793(); |
816 } | 811 } |
817 buildCounterEnumValue--; | 812 buildCounterEnumValue--; |
818 return o; | 813 return o; |
819 } | 814 } |
820 | 815 |
821 checkEnumValue(api.EnumValue o) { | 816 checkEnumValue(api.EnumValue o) { |
822 buildCounterEnumValue++; | 817 buildCounterEnumValue++; |
823 if (buildCounterEnumValue < 3) { | 818 if (buildCounterEnumValue < 3) { |
824 unittest.expect(o.name, unittest.equals('foo')); | 819 unittest.expect(o.name, unittest.equals('foo')); |
825 unittest.expect(o.number, unittest.equals(42)); | 820 unittest.expect(o.number, unittest.equals(42)); |
826 checkUnnamed1795(o.options); | 821 checkUnnamed1793(o.options); |
827 } | 822 } |
828 buildCounterEnumValue--; | 823 buildCounterEnumValue--; |
829 } | 824 } |
830 | 825 |
831 core.int buildCounterExperimental = 0; | 826 core.int buildCounterExperimental = 0; |
832 buildExperimental() { | 827 buildExperimental() { |
833 var o = new api.Experimental(); | 828 var o = new api.Experimental(); |
834 buildCounterExperimental++; | 829 buildCounterExperimental++; |
835 if (buildCounterExperimental < 3) { | 830 if (buildCounterExperimental < 3) { |
836 o.authorization = buildAuthorizationConfig(); | 831 o.authorization = buildAuthorizationConfig(); |
837 } | 832 } |
838 buildCounterExperimental--; | 833 buildCounterExperimental--; |
839 return o; | 834 return o; |
840 } | 835 } |
841 | 836 |
842 checkExperimental(api.Experimental o) { | 837 checkExperimental(api.Experimental o) { |
843 buildCounterExperimental++; | 838 buildCounterExperimental++; |
844 if (buildCounterExperimental < 3) { | 839 if (buildCounterExperimental < 3) { |
845 checkAuthorizationConfig(o.authorization); | 840 checkAuthorizationConfig(o.authorization); |
846 } | 841 } |
847 buildCounterExperimental--; | 842 buildCounterExperimental--; |
848 } | 843 } |
849 | 844 |
850 buildUnnamed1796() { | 845 buildUnnamed1794() { |
851 var o = new core.List<api.Option>(); | 846 var o = new core.List<api.Option>(); |
852 o.add(buildOption()); | 847 o.add(buildOption()); |
853 o.add(buildOption()); | 848 o.add(buildOption()); |
854 return o; | 849 return o; |
855 } | 850 } |
856 | 851 |
857 checkUnnamed1796(core.List<api.Option> o) { | 852 checkUnnamed1794(core.List<api.Option> o) { |
858 unittest.expect(o, unittest.hasLength(2)); | 853 unittest.expect(o, unittest.hasLength(2)); |
859 checkOption(o[0]); | 854 checkOption(o[0]); |
860 checkOption(o[1]); | 855 checkOption(o[1]); |
861 } | 856 } |
862 | 857 |
863 core.int buildCounterField = 0; | 858 core.int buildCounterField = 0; |
864 buildField() { | 859 buildField() { |
865 var o = new api.Field(); | 860 var o = new api.Field(); |
866 buildCounterField++; | 861 buildCounterField++; |
867 if (buildCounterField < 3) { | 862 if (buildCounterField < 3) { |
868 o.cardinality = "foo"; | 863 o.cardinality = "foo"; |
869 o.defaultValue = "foo"; | 864 o.defaultValue = "foo"; |
870 o.jsonName = "foo"; | 865 o.jsonName = "foo"; |
871 o.kind = "foo"; | 866 o.kind = "foo"; |
872 o.name = "foo"; | 867 o.name = "foo"; |
873 o.number = 42; | 868 o.number = 42; |
874 o.oneofIndex = 42; | 869 o.oneofIndex = 42; |
875 o.options = buildUnnamed1796(); | 870 o.options = buildUnnamed1794(); |
876 o.packed = true; | 871 o.packed = true; |
877 o.typeUrl = "foo"; | 872 o.typeUrl = "foo"; |
878 } | 873 } |
879 buildCounterField--; | 874 buildCounterField--; |
880 return o; | 875 return o; |
881 } | 876 } |
882 | 877 |
883 checkField(api.Field o) { | 878 checkField(api.Field o) { |
884 buildCounterField++; | 879 buildCounterField++; |
885 if (buildCounterField < 3) { | 880 if (buildCounterField < 3) { |
886 unittest.expect(o.cardinality, unittest.equals('foo')); | 881 unittest.expect(o.cardinality, unittest.equals('foo')); |
887 unittest.expect(o.defaultValue, unittest.equals('foo')); | 882 unittest.expect(o.defaultValue, unittest.equals('foo')); |
888 unittest.expect(o.jsonName, unittest.equals('foo')); | 883 unittest.expect(o.jsonName, unittest.equals('foo')); |
889 unittest.expect(o.kind, unittest.equals('foo')); | 884 unittest.expect(o.kind, unittest.equals('foo')); |
890 unittest.expect(o.name, unittest.equals('foo')); | 885 unittest.expect(o.name, unittest.equals('foo')); |
891 unittest.expect(o.number, unittest.equals(42)); | 886 unittest.expect(o.number, unittest.equals(42)); |
892 unittest.expect(o.oneofIndex, unittest.equals(42)); | 887 unittest.expect(o.oneofIndex, unittest.equals(42)); |
893 checkUnnamed1796(o.options); | 888 checkUnnamed1794(o.options); |
894 unittest.expect(o.packed, unittest.isTrue); | 889 unittest.expect(o.packed, unittest.isTrue); |
895 unittest.expect(o.typeUrl, unittest.equals('foo')); | 890 unittest.expect(o.typeUrl, unittest.equals('foo')); |
896 } | 891 } |
897 buildCounterField--; | 892 buildCounterField--; |
898 } | 893 } |
899 | 894 |
900 buildUnnamed1797() { | 895 buildUnnamed1795() { |
901 var o = new core.List<api.HttpRule>(); | 896 var o = new core.List<api.HttpRule>(); |
902 o.add(buildHttpRule()); | 897 o.add(buildHttpRule()); |
903 o.add(buildHttpRule()); | 898 o.add(buildHttpRule()); |
904 return o; | 899 return o; |
905 } | 900 } |
906 | 901 |
907 checkUnnamed1797(core.List<api.HttpRule> o) { | 902 checkUnnamed1795(core.List<api.HttpRule> o) { |
908 unittest.expect(o, unittest.hasLength(2)); | 903 unittest.expect(o, unittest.hasLength(2)); |
909 checkHttpRule(o[0]); | 904 checkHttpRule(o[0]); |
910 checkHttpRule(o[1]); | 905 checkHttpRule(o[1]); |
911 } | 906 } |
912 | 907 |
913 core.int buildCounterHttp = 0; | 908 core.int buildCounterHttp = 0; |
914 buildHttp() { | 909 buildHttp() { |
915 var o = new api.Http(); | 910 var o = new api.Http(); |
916 buildCounterHttp++; | 911 buildCounterHttp++; |
917 if (buildCounterHttp < 3) { | 912 if (buildCounterHttp < 3) { |
918 o.fullyDecodeReservedExpansion = true; | 913 o.fullyDecodeReservedExpansion = true; |
919 o.rules = buildUnnamed1797(); | 914 o.rules = buildUnnamed1795(); |
920 } | 915 } |
921 buildCounterHttp--; | 916 buildCounterHttp--; |
922 return o; | 917 return o; |
923 } | 918 } |
924 | 919 |
925 checkHttp(api.Http o) { | 920 checkHttp(api.Http o) { |
926 buildCounterHttp++; | 921 buildCounterHttp++; |
927 if (buildCounterHttp < 3) { | 922 if (buildCounterHttp < 3) { |
928 unittest.expect(o.fullyDecodeReservedExpansion, unittest.isTrue); | 923 unittest.expect(o.fullyDecodeReservedExpansion, unittest.isTrue); |
929 checkUnnamed1797(o.rules); | 924 checkUnnamed1795(o.rules); |
930 } | 925 } |
931 buildCounterHttp--; | 926 buildCounterHttp--; |
932 } | 927 } |
933 | 928 |
934 buildUnnamed1798() { | 929 buildUnnamed1796() { |
935 var o = new core.List<api.HttpRule>(); | 930 var o = new core.List<api.HttpRule>(); |
936 o.add(buildHttpRule()); | 931 o.add(buildHttpRule()); |
937 o.add(buildHttpRule()); | 932 o.add(buildHttpRule()); |
938 return o; | 933 return o; |
939 } | 934 } |
940 | 935 |
941 checkUnnamed1798(core.List<api.HttpRule> o) { | 936 checkUnnamed1796(core.List<api.HttpRule> o) { |
942 unittest.expect(o, unittest.hasLength(2)); | 937 unittest.expect(o, unittest.hasLength(2)); |
943 checkHttpRule(o[0]); | 938 checkHttpRule(o[0]); |
944 checkHttpRule(o[1]); | 939 checkHttpRule(o[1]); |
945 } | 940 } |
946 | 941 |
947 buildUnnamed1799() { | 942 buildUnnamed1797() { |
948 var o = new core.List<api.AuthorizationRule>(); | 943 var o = new core.List<api.AuthorizationRule>(); |
949 o.add(buildAuthorizationRule()); | 944 o.add(buildAuthorizationRule()); |
950 o.add(buildAuthorizationRule()); | 945 o.add(buildAuthorizationRule()); |
951 return o; | 946 return o; |
952 } | 947 } |
953 | 948 |
954 checkUnnamed1799(core.List<api.AuthorizationRule> o) { | 949 checkUnnamed1797(core.List<api.AuthorizationRule> o) { |
955 unittest.expect(o, unittest.hasLength(2)); | 950 unittest.expect(o, unittest.hasLength(2)); |
956 checkAuthorizationRule(o[0]); | 951 checkAuthorizationRule(o[0]); |
957 checkAuthorizationRule(o[1]); | 952 checkAuthorizationRule(o[1]); |
958 } | 953 } |
959 | 954 |
960 core.int buildCounterHttpRule = 0; | 955 core.int buildCounterHttpRule = 0; |
961 buildHttpRule() { | 956 buildHttpRule() { |
962 var o = new api.HttpRule(); | 957 var o = new api.HttpRule(); |
963 buildCounterHttpRule++; | 958 buildCounterHttpRule++; |
964 if (buildCounterHttpRule < 3) { | 959 if (buildCounterHttpRule < 3) { |
965 o.additionalBindings = buildUnnamed1798(); | 960 o.additionalBindings = buildUnnamed1796(); |
966 o.authorizations = buildUnnamed1799(); | 961 o.authorizations = buildUnnamed1797(); |
967 o.body = "foo"; | 962 o.body = "foo"; |
968 o.custom = buildCustomHttpPattern(); | 963 o.custom = buildCustomHttpPattern(); |
969 o.delete = "foo"; | 964 o.delete = "foo"; |
970 o.get = "foo"; | 965 o.get = "foo"; |
971 o.mediaDownload = buildMediaDownload(); | 966 o.mediaDownload = buildMediaDownload(); |
972 o.mediaUpload = buildMediaUpload(); | 967 o.mediaUpload = buildMediaUpload(); |
973 o.patch = "foo"; | 968 o.patch = "foo"; |
974 o.post = "foo"; | 969 o.post = "foo"; |
975 o.put = "foo"; | 970 o.put = "foo"; |
976 o.responseBody = "foo"; | 971 o.responseBody = "foo"; |
977 o.restCollection = "foo"; | 972 o.restCollection = "foo"; |
978 o.restMethodName = "foo"; | 973 o.restMethodName = "foo"; |
979 o.selector = "foo"; | 974 o.selector = "foo"; |
980 } | 975 } |
981 buildCounterHttpRule--; | 976 buildCounterHttpRule--; |
982 return o; | 977 return o; |
983 } | 978 } |
984 | 979 |
985 checkHttpRule(api.HttpRule o) { | 980 checkHttpRule(api.HttpRule o) { |
986 buildCounterHttpRule++; | 981 buildCounterHttpRule++; |
987 if (buildCounterHttpRule < 3) { | 982 if (buildCounterHttpRule < 3) { |
988 checkUnnamed1798(o.additionalBindings); | 983 checkUnnamed1796(o.additionalBindings); |
989 checkUnnamed1799(o.authorizations); | 984 checkUnnamed1797(o.authorizations); |
990 unittest.expect(o.body, unittest.equals('foo')); | 985 unittest.expect(o.body, unittest.equals('foo')); |
991 checkCustomHttpPattern(o.custom); | 986 checkCustomHttpPattern(o.custom); |
992 unittest.expect(o.delete, unittest.equals('foo')); | 987 unittest.expect(o.delete, unittest.equals('foo')); |
993 unittest.expect(o.get, unittest.equals('foo')); | 988 unittest.expect(o.get, unittest.equals('foo')); |
994 checkMediaDownload(o.mediaDownload); | 989 checkMediaDownload(o.mediaDownload); |
995 checkMediaUpload(o.mediaUpload); | 990 checkMediaUpload(o.mediaUpload); |
996 unittest.expect(o.patch, unittest.equals('foo')); | 991 unittest.expect(o.patch, unittest.equals('foo')); |
997 unittest.expect(o.post, unittest.equals('foo')); | 992 unittest.expect(o.post, unittest.equals('foo')); |
998 unittest.expect(o.put, unittest.equals('foo')); | 993 unittest.expect(o.put, unittest.equals('foo')); |
999 unittest.expect(o.responseBody, unittest.equals('foo')); | 994 unittest.expect(o.responseBody, unittest.equals('foo')); |
(...skipping 20 matching lines...) Expand all Loading... |
1020 checkLabelDescriptor(api.LabelDescriptor o) { | 1015 checkLabelDescriptor(api.LabelDescriptor o) { |
1021 buildCounterLabelDescriptor++; | 1016 buildCounterLabelDescriptor++; |
1022 if (buildCounterLabelDescriptor < 3) { | 1017 if (buildCounterLabelDescriptor < 3) { |
1023 unittest.expect(o.description, unittest.equals('foo')); | 1018 unittest.expect(o.description, unittest.equals('foo')); |
1024 unittest.expect(o.key, unittest.equals('foo')); | 1019 unittest.expect(o.key, unittest.equals('foo')); |
1025 unittest.expect(o.valueType, unittest.equals('foo')); | 1020 unittest.expect(o.valueType, unittest.equals('foo')); |
1026 } | 1021 } |
1027 buildCounterLabelDescriptor--; | 1022 buildCounterLabelDescriptor--; |
1028 } | 1023 } |
1029 | 1024 |
1030 buildUnnamed1800() { | 1025 buildUnnamed1798() { |
1031 var o = new core.List<api.PublishedService>(); | 1026 var o = new core.List<api.PublishedService>(); |
1032 o.add(buildPublishedService()); | 1027 o.add(buildPublishedService()); |
1033 o.add(buildPublishedService()); | 1028 o.add(buildPublishedService()); |
1034 return o; | 1029 return o; |
1035 } | 1030 } |
1036 | 1031 |
1037 checkUnnamed1800(core.List<api.PublishedService> o) { | 1032 checkUnnamed1798(core.List<api.PublishedService> o) { |
1038 unittest.expect(o, unittest.hasLength(2)); | 1033 unittest.expect(o, unittest.hasLength(2)); |
1039 checkPublishedService(o[0]); | 1034 checkPublishedService(o[0]); |
1040 checkPublishedService(o[1]); | 1035 checkPublishedService(o[1]); |
1041 } | 1036 } |
1042 | 1037 |
1043 core.int buildCounterListEnabledServicesResponse = 0; | 1038 core.int buildCounterListEnabledServicesResponse = 0; |
1044 buildListEnabledServicesResponse() { | 1039 buildListEnabledServicesResponse() { |
1045 var o = new api.ListEnabledServicesResponse(); | 1040 var o = new api.ListEnabledServicesResponse(); |
1046 buildCounterListEnabledServicesResponse++; | 1041 buildCounterListEnabledServicesResponse++; |
1047 if (buildCounterListEnabledServicesResponse < 3) { | 1042 if (buildCounterListEnabledServicesResponse < 3) { |
1048 o.nextPageToken = "foo"; | 1043 o.nextPageToken = "foo"; |
1049 o.services = buildUnnamed1800(); | 1044 o.services = buildUnnamed1798(); |
1050 } | 1045 } |
1051 buildCounterListEnabledServicesResponse--; | 1046 buildCounterListEnabledServicesResponse--; |
1052 return o; | 1047 return o; |
1053 } | 1048 } |
1054 | 1049 |
1055 checkListEnabledServicesResponse(api.ListEnabledServicesResponse o) { | 1050 checkListEnabledServicesResponse(api.ListEnabledServicesResponse o) { |
1056 buildCounterListEnabledServicesResponse++; | 1051 buildCounterListEnabledServicesResponse++; |
1057 if (buildCounterListEnabledServicesResponse < 3) { | 1052 if (buildCounterListEnabledServicesResponse < 3) { |
1058 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1053 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1059 checkUnnamed1800(o.services); | 1054 checkUnnamed1798(o.services); |
1060 } | 1055 } |
1061 buildCounterListEnabledServicesResponse--; | 1056 buildCounterListEnabledServicesResponse--; |
1062 } | 1057 } |
1063 | 1058 |
1064 buildUnnamed1801() { | 1059 buildUnnamed1799() { |
1065 var o = new core.List<api.LabelDescriptor>(); | 1060 var o = new core.List<api.LabelDescriptor>(); |
1066 o.add(buildLabelDescriptor()); | 1061 o.add(buildLabelDescriptor()); |
1067 o.add(buildLabelDescriptor()); | 1062 o.add(buildLabelDescriptor()); |
1068 return o; | 1063 return o; |
1069 } | 1064 } |
1070 | 1065 |
1071 checkUnnamed1801(core.List<api.LabelDescriptor> o) { | 1066 checkUnnamed1799(core.List<api.LabelDescriptor> o) { |
1072 unittest.expect(o, unittest.hasLength(2)); | 1067 unittest.expect(o, unittest.hasLength(2)); |
1073 checkLabelDescriptor(o[0]); | 1068 checkLabelDescriptor(o[0]); |
1074 checkLabelDescriptor(o[1]); | 1069 checkLabelDescriptor(o[1]); |
1075 } | 1070 } |
1076 | 1071 |
1077 core.int buildCounterLogDescriptor = 0; | 1072 core.int buildCounterLogDescriptor = 0; |
1078 buildLogDescriptor() { | 1073 buildLogDescriptor() { |
1079 var o = new api.LogDescriptor(); | 1074 var o = new api.LogDescriptor(); |
1080 buildCounterLogDescriptor++; | 1075 buildCounterLogDescriptor++; |
1081 if (buildCounterLogDescriptor < 3) { | 1076 if (buildCounterLogDescriptor < 3) { |
1082 o.description = "foo"; | 1077 o.description = "foo"; |
1083 o.displayName = "foo"; | 1078 o.displayName = "foo"; |
1084 o.labels = buildUnnamed1801(); | 1079 o.labels = buildUnnamed1799(); |
1085 o.name = "foo"; | 1080 o.name = "foo"; |
1086 } | 1081 } |
1087 buildCounterLogDescriptor--; | 1082 buildCounterLogDescriptor--; |
1088 return o; | 1083 return o; |
1089 } | 1084 } |
1090 | 1085 |
1091 checkLogDescriptor(api.LogDescriptor o) { | 1086 checkLogDescriptor(api.LogDescriptor o) { |
1092 buildCounterLogDescriptor++; | 1087 buildCounterLogDescriptor++; |
1093 if (buildCounterLogDescriptor < 3) { | 1088 if (buildCounterLogDescriptor < 3) { |
1094 unittest.expect(o.description, unittest.equals('foo')); | 1089 unittest.expect(o.description, unittest.equals('foo')); |
1095 unittest.expect(o.displayName, unittest.equals('foo')); | 1090 unittest.expect(o.displayName, unittest.equals('foo')); |
1096 checkUnnamed1801(o.labels); | 1091 checkUnnamed1799(o.labels); |
1097 unittest.expect(o.name, unittest.equals('foo')); | 1092 unittest.expect(o.name, unittest.equals('foo')); |
1098 } | 1093 } |
1099 buildCounterLogDescriptor--; | 1094 buildCounterLogDescriptor--; |
1100 } | 1095 } |
1101 | 1096 |
1102 buildUnnamed1802() { | 1097 buildUnnamed1800() { |
1103 var o = new core.List<api.LoggingDestination>(); | 1098 var o = new core.List<api.LoggingDestination>(); |
1104 o.add(buildLoggingDestination()); | 1099 o.add(buildLoggingDestination()); |
1105 o.add(buildLoggingDestination()); | 1100 o.add(buildLoggingDestination()); |
1106 return o; | 1101 return o; |
1107 } | 1102 } |
1108 | 1103 |
1109 checkUnnamed1802(core.List<api.LoggingDestination> o) { | 1104 checkUnnamed1800(core.List<api.LoggingDestination> o) { |
1110 unittest.expect(o, unittest.hasLength(2)); | 1105 unittest.expect(o, unittest.hasLength(2)); |
1111 checkLoggingDestination(o[0]); | 1106 checkLoggingDestination(o[0]); |
1112 checkLoggingDestination(o[1]); | 1107 checkLoggingDestination(o[1]); |
1113 } | 1108 } |
1114 | 1109 |
1115 buildUnnamed1803() { | 1110 buildUnnamed1801() { |
1116 var o = new core.List<api.LoggingDestination>(); | 1111 var o = new core.List<api.LoggingDestination>(); |
1117 o.add(buildLoggingDestination()); | 1112 o.add(buildLoggingDestination()); |
1118 o.add(buildLoggingDestination()); | 1113 o.add(buildLoggingDestination()); |
1119 return o; | 1114 return o; |
1120 } | 1115 } |
1121 | 1116 |
1122 checkUnnamed1803(core.List<api.LoggingDestination> o) { | 1117 checkUnnamed1801(core.List<api.LoggingDestination> o) { |
1123 unittest.expect(o, unittest.hasLength(2)); | 1118 unittest.expect(o, unittest.hasLength(2)); |
1124 checkLoggingDestination(o[0]); | 1119 checkLoggingDestination(o[0]); |
1125 checkLoggingDestination(o[1]); | 1120 checkLoggingDestination(o[1]); |
1126 } | 1121 } |
1127 | 1122 |
1128 core.int buildCounterLogging = 0; | 1123 core.int buildCounterLogging = 0; |
1129 buildLogging() { | 1124 buildLogging() { |
1130 var o = new api.Logging(); | 1125 var o = new api.Logging(); |
1131 buildCounterLogging++; | 1126 buildCounterLogging++; |
1132 if (buildCounterLogging < 3) { | 1127 if (buildCounterLogging < 3) { |
1133 o.consumerDestinations = buildUnnamed1802(); | 1128 o.consumerDestinations = buildUnnamed1800(); |
1134 o.producerDestinations = buildUnnamed1803(); | 1129 o.producerDestinations = buildUnnamed1801(); |
1135 } | 1130 } |
1136 buildCounterLogging--; | 1131 buildCounterLogging--; |
1137 return o; | 1132 return o; |
1138 } | 1133 } |
1139 | 1134 |
1140 checkLogging(api.Logging o) { | 1135 checkLogging(api.Logging o) { |
1141 buildCounterLogging++; | 1136 buildCounterLogging++; |
1142 if (buildCounterLogging < 3) { | 1137 if (buildCounterLogging < 3) { |
1143 checkUnnamed1802(o.consumerDestinations); | 1138 checkUnnamed1800(o.consumerDestinations); |
1144 checkUnnamed1803(o.producerDestinations); | 1139 checkUnnamed1801(o.producerDestinations); |
1145 } | 1140 } |
1146 buildCounterLogging--; | 1141 buildCounterLogging--; |
1147 } | 1142 } |
1148 | 1143 |
1149 buildUnnamed1804() { | 1144 buildUnnamed1802() { |
1150 var o = new core.List<core.String>(); | 1145 var o = new core.List<core.String>(); |
1151 o.add("foo"); | 1146 o.add("foo"); |
1152 o.add("foo"); | 1147 o.add("foo"); |
1153 return o; | 1148 return o; |
1154 } | 1149 } |
1155 | 1150 |
1156 checkUnnamed1804(core.List<core.String> o) { | 1151 checkUnnamed1802(core.List<core.String> o) { |
1157 unittest.expect(o, unittest.hasLength(2)); | 1152 unittest.expect(o, unittest.hasLength(2)); |
1158 unittest.expect(o[0], unittest.equals('foo')); | 1153 unittest.expect(o[0], unittest.equals('foo')); |
1159 unittest.expect(o[1], unittest.equals('foo')); | 1154 unittest.expect(o[1], unittest.equals('foo')); |
1160 } | 1155 } |
1161 | 1156 |
1162 core.int buildCounterLoggingDestination = 0; | 1157 core.int buildCounterLoggingDestination = 0; |
1163 buildLoggingDestination() { | 1158 buildLoggingDestination() { |
1164 var o = new api.LoggingDestination(); | 1159 var o = new api.LoggingDestination(); |
1165 buildCounterLoggingDestination++; | 1160 buildCounterLoggingDestination++; |
1166 if (buildCounterLoggingDestination < 3) { | 1161 if (buildCounterLoggingDestination < 3) { |
1167 o.logs = buildUnnamed1804(); | 1162 o.logs = buildUnnamed1802(); |
1168 o.monitoredResource = "foo"; | 1163 o.monitoredResource = "foo"; |
1169 } | 1164 } |
1170 buildCounterLoggingDestination--; | 1165 buildCounterLoggingDestination--; |
1171 return o; | 1166 return o; |
1172 } | 1167 } |
1173 | 1168 |
1174 checkLoggingDestination(api.LoggingDestination o) { | 1169 checkLoggingDestination(api.LoggingDestination o) { |
1175 buildCounterLoggingDestination++; | 1170 buildCounterLoggingDestination++; |
1176 if (buildCounterLoggingDestination < 3) { | 1171 if (buildCounterLoggingDestination < 3) { |
1177 checkUnnamed1804(o.logs); | 1172 checkUnnamed1802(o.logs); |
1178 unittest.expect(o.monitoredResource, unittest.equals('foo')); | 1173 unittest.expect(o.monitoredResource, unittest.equals('foo')); |
1179 } | 1174 } |
1180 buildCounterLoggingDestination--; | 1175 buildCounterLoggingDestination--; |
1181 } | 1176 } |
1182 | 1177 |
1183 core.int buildCounterMediaDownload = 0; | 1178 core.int buildCounterMediaDownload = 0; |
1184 buildMediaDownload() { | 1179 buildMediaDownload() { |
1185 var o = new api.MediaDownload(); | 1180 var o = new api.MediaDownload(); |
1186 buildCounterMediaDownload++; | 1181 buildCounterMediaDownload++; |
1187 if (buildCounterMediaDownload < 3) { | 1182 if (buildCounterMediaDownload < 3) { |
(...skipping 14 matching lines...) Expand all Loading... |
1202 unittest.expect(o.completeNotification, unittest.isTrue); | 1197 unittest.expect(o.completeNotification, unittest.isTrue); |
1203 unittest.expect(o.downloadService, unittest.equals('foo')); | 1198 unittest.expect(o.downloadService, unittest.equals('foo')); |
1204 unittest.expect(o.dropzone, unittest.equals('foo')); | 1199 unittest.expect(o.dropzone, unittest.equals('foo')); |
1205 unittest.expect(o.enabled, unittest.isTrue); | 1200 unittest.expect(o.enabled, unittest.isTrue); |
1206 unittest.expect(o.maxDirectDownloadSize, unittest.equals('foo')); | 1201 unittest.expect(o.maxDirectDownloadSize, unittest.equals('foo')); |
1207 unittest.expect(o.useDirectDownload, unittest.isTrue); | 1202 unittest.expect(o.useDirectDownload, unittest.isTrue); |
1208 } | 1203 } |
1209 buildCounterMediaDownload--; | 1204 buildCounterMediaDownload--; |
1210 } | 1205 } |
1211 | 1206 |
1212 buildUnnamed1805() { | 1207 buildUnnamed1803() { |
1213 var o = new core.List<core.String>(); | 1208 var o = new core.List<core.String>(); |
1214 o.add("foo"); | 1209 o.add("foo"); |
1215 o.add("foo"); | 1210 o.add("foo"); |
1216 return o; | 1211 return o; |
1217 } | 1212 } |
1218 | 1213 |
1219 checkUnnamed1805(core.List<core.String> o) { | 1214 checkUnnamed1803(core.List<core.String> o) { |
1220 unittest.expect(o, unittest.hasLength(2)); | 1215 unittest.expect(o, unittest.hasLength(2)); |
1221 unittest.expect(o[0], unittest.equals('foo')); | 1216 unittest.expect(o[0], unittest.equals('foo')); |
1222 unittest.expect(o[1], unittest.equals('foo')); | 1217 unittest.expect(o[1], unittest.equals('foo')); |
1223 } | 1218 } |
1224 | 1219 |
1225 core.int buildCounterMediaUpload = 0; | 1220 core.int buildCounterMediaUpload = 0; |
1226 buildMediaUpload() { | 1221 buildMediaUpload() { |
1227 var o = new api.MediaUpload(); | 1222 var o = new api.MediaUpload(); |
1228 buildCounterMediaUpload++; | 1223 buildCounterMediaUpload++; |
1229 if (buildCounterMediaUpload < 3) { | 1224 if (buildCounterMediaUpload < 3) { |
1230 o.completeNotification = true; | 1225 o.completeNotification = true; |
1231 o.dropzone = "foo"; | 1226 o.dropzone = "foo"; |
1232 o.enabled = true; | 1227 o.enabled = true; |
1233 o.maxSize = "foo"; | 1228 o.maxSize = "foo"; |
1234 o.mimeTypes = buildUnnamed1805(); | 1229 o.mimeTypes = buildUnnamed1803(); |
1235 o.progressNotification = true; | 1230 o.progressNotification = true; |
1236 o.startNotification = true; | 1231 o.startNotification = true; |
1237 o.uploadService = "foo"; | 1232 o.uploadService = "foo"; |
1238 } | 1233 } |
1239 buildCounterMediaUpload--; | 1234 buildCounterMediaUpload--; |
1240 return o; | 1235 return o; |
1241 } | 1236 } |
1242 | 1237 |
1243 checkMediaUpload(api.MediaUpload o) { | 1238 checkMediaUpload(api.MediaUpload o) { |
1244 buildCounterMediaUpload++; | 1239 buildCounterMediaUpload++; |
1245 if (buildCounterMediaUpload < 3) { | 1240 if (buildCounterMediaUpload < 3) { |
1246 unittest.expect(o.completeNotification, unittest.isTrue); | 1241 unittest.expect(o.completeNotification, unittest.isTrue); |
1247 unittest.expect(o.dropzone, unittest.equals('foo')); | 1242 unittest.expect(o.dropzone, unittest.equals('foo')); |
1248 unittest.expect(o.enabled, unittest.isTrue); | 1243 unittest.expect(o.enabled, unittest.isTrue); |
1249 unittest.expect(o.maxSize, unittest.equals('foo')); | 1244 unittest.expect(o.maxSize, unittest.equals('foo')); |
1250 checkUnnamed1805(o.mimeTypes); | 1245 checkUnnamed1803(o.mimeTypes); |
1251 unittest.expect(o.progressNotification, unittest.isTrue); | 1246 unittest.expect(o.progressNotification, unittest.isTrue); |
1252 unittest.expect(o.startNotification, unittest.isTrue); | 1247 unittest.expect(o.startNotification, unittest.isTrue); |
1253 unittest.expect(o.uploadService, unittest.equals('foo')); | 1248 unittest.expect(o.uploadService, unittest.equals('foo')); |
1254 } | 1249 } |
1255 buildCounterMediaUpload--; | 1250 buildCounterMediaUpload--; |
1256 } | 1251 } |
1257 | 1252 |
1258 buildUnnamed1806() { | 1253 buildUnnamed1804() { |
1259 var o = new core.List<api.Option>(); | 1254 var o = new core.List<api.Option>(); |
1260 o.add(buildOption()); | 1255 o.add(buildOption()); |
1261 o.add(buildOption()); | 1256 o.add(buildOption()); |
1262 return o; | 1257 return o; |
1263 } | 1258 } |
1264 | 1259 |
1265 checkUnnamed1806(core.List<api.Option> o) { | 1260 checkUnnamed1804(core.List<api.Option> o) { |
1266 unittest.expect(o, unittest.hasLength(2)); | 1261 unittest.expect(o, unittest.hasLength(2)); |
1267 checkOption(o[0]); | 1262 checkOption(o[0]); |
1268 checkOption(o[1]); | 1263 checkOption(o[1]); |
1269 } | 1264 } |
1270 | 1265 |
1271 core.int buildCounterMethod = 0; | 1266 core.int buildCounterMethod = 0; |
1272 buildMethod() { | 1267 buildMethod() { |
1273 var o = new api.Method(); | 1268 var o = new api.Method(); |
1274 buildCounterMethod++; | 1269 buildCounterMethod++; |
1275 if (buildCounterMethod < 3) { | 1270 if (buildCounterMethod < 3) { |
1276 o.name = "foo"; | 1271 o.name = "foo"; |
1277 o.options = buildUnnamed1806(); | 1272 o.options = buildUnnamed1804(); |
1278 o.requestStreaming = true; | 1273 o.requestStreaming = true; |
1279 o.requestTypeUrl = "foo"; | 1274 o.requestTypeUrl = "foo"; |
1280 o.responseStreaming = true; | 1275 o.responseStreaming = true; |
1281 o.responseTypeUrl = "foo"; | 1276 o.responseTypeUrl = "foo"; |
1282 o.syntax = "foo"; | 1277 o.syntax = "foo"; |
1283 } | 1278 } |
1284 buildCounterMethod--; | 1279 buildCounterMethod--; |
1285 return o; | 1280 return o; |
1286 } | 1281 } |
1287 | 1282 |
1288 checkMethod(api.Method o) { | 1283 checkMethod(api.Method o) { |
1289 buildCounterMethod++; | 1284 buildCounterMethod++; |
1290 if (buildCounterMethod < 3) { | 1285 if (buildCounterMethod < 3) { |
1291 unittest.expect(o.name, unittest.equals('foo')); | 1286 unittest.expect(o.name, unittest.equals('foo')); |
1292 checkUnnamed1806(o.options); | 1287 checkUnnamed1804(o.options); |
1293 unittest.expect(o.requestStreaming, unittest.isTrue); | 1288 unittest.expect(o.requestStreaming, unittest.isTrue); |
1294 unittest.expect(o.requestTypeUrl, unittest.equals('foo')); | 1289 unittest.expect(o.requestTypeUrl, unittest.equals('foo')); |
1295 unittest.expect(o.responseStreaming, unittest.isTrue); | 1290 unittest.expect(o.responseStreaming, unittest.isTrue); |
1296 unittest.expect(o.responseTypeUrl, unittest.equals('foo')); | 1291 unittest.expect(o.responseTypeUrl, unittest.equals('foo')); |
1297 unittest.expect(o.syntax, unittest.equals('foo')); | 1292 unittest.expect(o.syntax, unittest.equals('foo')); |
1298 } | 1293 } |
1299 buildCounterMethod--; | 1294 buildCounterMethod--; |
1300 } | 1295 } |
1301 | 1296 |
1302 buildUnnamed1807() { | 1297 buildUnnamed1805() { |
1303 var o = new core.List<api.LabelDescriptor>(); | 1298 var o = new core.List<api.LabelDescriptor>(); |
1304 o.add(buildLabelDescriptor()); | 1299 o.add(buildLabelDescriptor()); |
1305 o.add(buildLabelDescriptor()); | 1300 o.add(buildLabelDescriptor()); |
1306 return o; | 1301 return o; |
1307 } | 1302 } |
1308 | 1303 |
1309 checkUnnamed1807(core.List<api.LabelDescriptor> o) { | 1304 checkUnnamed1805(core.List<api.LabelDescriptor> o) { |
1310 unittest.expect(o, unittest.hasLength(2)); | 1305 unittest.expect(o, unittest.hasLength(2)); |
1311 checkLabelDescriptor(o[0]); | 1306 checkLabelDescriptor(o[0]); |
1312 checkLabelDescriptor(o[1]); | 1307 checkLabelDescriptor(o[1]); |
1313 } | 1308 } |
1314 | 1309 |
1315 core.int buildCounterMetricDescriptor = 0; | 1310 core.int buildCounterMetricDescriptor = 0; |
1316 buildMetricDescriptor() { | 1311 buildMetricDescriptor() { |
1317 var o = new api.MetricDescriptor(); | 1312 var o = new api.MetricDescriptor(); |
1318 buildCounterMetricDescriptor++; | 1313 buildCounterMetricDescriptor++; |
1319 if (buildCounterMetricDescriptor < 3) { | 1314 if (buildCounterMetricDescriptor < 3) { |
1320 o.description = "foo"; | 1315 o.description = "foo"; |
1321 o.displayName = "foo"; | 1316 o.displayName = "foo"; |
1322 o.labels = buildUnnamed1807(); | 1317 o.labels = buildUnnamed1805(); |
1323 o.metricKind = "foo"; | 1318 o.metricKind = "foo"; |
1324 o.name = "foo"; | 1319 o.name = "foo"; |
1325 o.type = "foo"; | 1320 o.type = "foo"; |
1326 o.unit = "foo"; | 1321 o.unit = "foo"; |
1327 o.valueType = "foo"; | 1322 o.valueType = "foo"; |
1328 } | 1323 } |
1329 buildCounterMetricDescriptor--; | 1324 buildCounterMetricDescriptor--; |
1330 return o; | 1325 return o; |
1331 } | 1326 } |
1332 | 1327 |
1333 checkMetricDescriptor(api.MetricDescriptor o) { | 1328 checkMetricDescriptor(api.MetricDescriptor o) { |
1334 buildCounterMetricDescriptor++; | 1329 buildCounterMetricDescriptor++; |
1335 if (buildCounterMetricDescriptor < 3) { | 1330 if (buildCounterMetricDescriptor < 3) { |
1336 unittest.expect(o.description, unittest.equals('foo')); | 1331 unittest.expect(o.description, unittest.equals('foo')); |
1337 unittest.expect(o.displayName, unittest.equals('foo')); | 1332 unittest.expect(o.displayName, unittest.equals('foo')); |
1338 checkUnnamed1807(o.labels); | 1333 checkUnnamed1805(o.labels); |
1339 unittest.expect(o.metricKind, unittest.equals('foo')); | 1334 unittest.expect(o.metricKind, unittest.equals('foo')); |
1340 unittest.expect(o.name, unittest.equals('foo')); | 1335 unittest.expect(o.name, unittest.equals('foo')); |
1341 unittest.expect(o.type, unittest.equals('foo')); | 1336 unittest.expect(o.type, unittest.equals('foo')); |
1342 unittest.expect(o.unit, unittest.equals('foo')); | 1337 unittest.expect(o.unit, unittest.equals('foo')); |
1343 unittest.expect(o.valueType, unittest.equals('foo')); | 1338 unittest.expect(o.valueType, unittest.equals('foo')); |
1344 } | 1339 } |
1345 buildCounterMetricDescriptor--; | 1340 buildCounterMetricDescriptor--; |
1346 } | 1341 } |
1347 | 1342 |
1348 buildUnnamed1808() { | 1343 buildUnnamed1806() { |
1349 var o = new core.Map<core.String, core.String>(); | 1344 var o = new core.Map<core.String, core.String>(); |
1350 o["x"] = "foo"; | 1345 o["x"] = "foo"; |
1351 o["y"] = "foo"; | 1346 o["y"] = "foo"; |
1352 return o; | 1347 return o; |
1353 } | 1348 } |
1354 | 1349 |
1355 checkUnnamed1808(core.Map<core.String, core.String> o) { | 1350 checkUnnamed1806(core.Map<core.String, core.String> o) { |
1356 unittest.expect(o, unittest.hasLength(2)); | 1351 unittest.expect(o, unittest.hasLength(2)); |
1357 unittest.expect(o["x"], unittest.equals('foo')); | 1352 unittest.expect(o["x"], unittest.equals('foo')); |
1358 unittest.expect(o["y"], unittest.equals('foo')); | 1353 unittest.expect(o["y"], unittest.equals('foo')); |
1359 } | 1354 } |
1360 | 1355 |
1361 core.int buildCounterMetricRule = 0; | 1356 core.int buildCounterMetricRule = 0; |
1362 buildMetricRule() { | 1357 buildMetricRule() { |
1363 var o = new api.MetricRule(); | 1358 var o = new api.MetricRule(); |
1364 buildCounterMetricRule++; | 1359 buildCounterMetricRule++; |
1365 if (buildCounterMetricRule < 3) { | 1360 if (buildCounterMetricRule < 3) { |
1366 o.metricCosts = buildUnnamed1808(); | 1361 o.metricCosts = buildUnnamed1806(); |
1367 o.selector = "foo"; | 1362 o.selector = "foo"; |
1368 } | 1363 } |
1369 buildCounterMetricRule--; | 1364 buildCounterMetricRule--; |
1370 return o; | 1365 return o; |
1371 } | 1366 } |
1372 | 1367 |
1373 checkMetricRule(api.MetricRule o) { | 1368 checkMetricRule(api.MetricRule o) { |
1374 buildCounterMetricRule++; | 1369 buildCounterMetricRule++; |
1375 if (buildCounterMetricRule < 3) { | 1370 if (buildCounterMetricRule < 3) { |
1376 checkUnnamed1808(o.metricCosts); | 1371 checkUnnamed1806(o.metricCosts); |
1377 unittest.expect(o.selector, unittest.equals('foo')); | 1372 unittest.expect(o.selector, unittest.equals('foo')); |
1378 } | 1373 } |
1379 buildCounterMetricRule--; | 1374 buildCounterMetricRule--; |
1380 } | 1375 } |
1381 | 1376 |
1382 core.int buildCounterMixin = 0; | 1377 core.int buildCounterMixin = 0; |
1383 buildMixin() { | 1378 buildMixin() { |
1384 var o = new api.Mixin(); | 1379 var o = new api.Mixin(); |
1385 buildCounterMixin++; | 1380 buildCounterMixin++; |
1386 if (buildCounterMixin < 3) { | 1381 if (buildCounterMixin < 3) { |
1387 o.name = "foo"; | 1382 o.name = "foo"; |
1388 o.root = "foo"; | 1383 o.root = "foo"; |
1389 } | 1384 } |
1390 buildCounterMixin--; | 1385 buildCounterMixin--; |
1391 return o; | 1386 return o; |
1392 } | 1387 } |
1393 | 1388 |
1394 checkMixin(api.Mixin o) { | 1389 checkMixin(api.Mixin o) { |
1395 buildCounterMixin++; | 1390 buildCounterMixin++; |
1396 if (buildCounterMixin < 3) { | 1391 if (buildCounterMixin < 3) { |
1397 unittest.expect(o.name, unittest.equals('foo')); | 1392 unittest.expect(o.name, unittest.equals('foo')); |
1398 unittest.expect(o.root, unittest.equals('foo')); | 1393 unittest.expect(o.root, unittest.equals('foo')); |
1399 } | 1394 } |
1400 buildCounterMixin--; | 1395 buildCounterMixin--; |
1401 } | 1396 } |
1402 | 1397 |
1403 buildUnnamed1809() { | 1398 buildUnnamed1807() { |
1404 var o = new core.List<api.LabelDescriptor>(); | 1399 var o = new core.List<api.LabelDescriptor>(); |
1405 o.add(buildLabelDescriptor()); | 1400 o.add(buildLabelDescriptor()); |
1406 o.add(buildLabelDescriptor()); | 1401 o.add(buildLabelDescriptor()); |
1407 return o; | 1402 return o; |
1408 } | 1403 } |
1409 | 1404 |
1410 checkUnnamed1809(core.List<api.LabelDescriptor> o) { | 1405 checkUnnamed1807(core.List<api.LabelDescriptor> o) { |
1411 unittest.expect(o, unittest.hasLength(2)); | 1406 unittest.expect(o, unittest.hasLength(2)); |
1412 checkLabelDescriptor(o[0]); | 1407 checkLabelDescriptor(o[0]); |
1413 checkLabelDescriptor(o[1]); | 1408 checkLabelDescriptor(o[1]); |
1414 } | 1409 } |
1415 | 1410 |
1416 core.int buildCounterMonitoredResourceDescriptor = 0; | 1411 core.int buildCounterMonitoredResourceDescriptor = 0; |
1417 buildMonitoredResourceDescriptor() { | 1412 buildMonitoredResourceDescriptor() { |
1418 var o = new api.MonitoredResourceDescriptor(); | 1413 var o = new api.MonitoredResourceDescriptor(); |
1419 buildCounterMonitoredResourceDescriptor++; | 1414 buildCounterMonitoredResourceDescriptor++; |
1420 if (buildCounterMonitoredResourceDescriptor < 3) { | 1415 if (buildCounterMonitoredResourceDescriptor < 3) { |
1421 o.description = "foo"; | 1416 o.description = "foo"; |
1422 o.displayName = "foo"; | 1417 o.displayName = "foo"; |
1423 o.labels = buildUnnamed1809(); | 1418 o.labels = buildUnnamed1807(); |
1424 o.name = "foo"; | 1419 o.name = "foo"; |
1425 o.type = "foo"; | 1420 o.type = "foo"; |
1426 } | 1421 } |
1427 buildCounterMonitoredResourceDescriptor--; | 1422 buildCounterMonitoredResourceDescriptor--; |
1428 return o; | 1423 return o; |
1429 } | 1424 } |
1430 | 1425 |
1431 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { | 1426 checkMonitoredResourceDescriptor(api.MonitoredResourceDescriptor o) { |
1432 buildCounterMonitoredResourceDescriptor++; | 1427 buildCounterMonitoredResourceDescriptor++; |
1433 if (buildCounterMonitoredResourceDescriptor < 3) { | 1428 if (buildCounterMonitoredResourceDescriptor < 3) { |
1434 unittest.expect(o.description, unittest.equals('foo')); | 1429 unittest.expect(o.description, unittest.equals('foo')); |
1435 unittest.expect(o.displayName, unittest.equals('foo')); | 1430 unittest.expect(o.displayName, unittest.equals('foo')); |
1436 checkUnnamed1809(o.labels); | 1431 checkUnnamed1807(o.labels); |
1437 unittest.expect(o.name, unittest.equals('foo')); | 1432 unittest.expect(o.name, unittest.equals('foo')); |
1438 unittest.expect(o.type, unittest.equals('foo')); | 1433 unittest.expect(o.type, unittest.equals('foo')); |
1439 } | 1434 } |
1440 buildCounterMonitoredResourceDescriptor--; | 1435 buildCounterMonitoredResourceDescriptor--; |
1441 } | 1436 } |
1442 | 1437 |
1443 buildUnnamed1810() { | 1438 buildUnnamed1808() { |
1444 var o = new core.List<api.MonitoringDestination>(); | 1439 var o = new core.List<api.MonitoringDestination>(); |
1445 o.add(buildMonitoringDestination()); | 1440 o.add(buildMonitoringDestination()); |
1446 o.add(buildMonitoringDestination()); | 1441 o.add(buildMonitoringDestination()); |
1447 return o; | 1442 return o; |
1448 } | 1443 } |
1449 | 1444 |
1450 checkUnnamed1810(core.List<api.MonitoringDestination> o) { | 1445 checkUnnamed1808(core.List<api.MonitoringDestination> o) { |
1451 unittest.expect(o, unittest.hasLength(2)); | 1446 unittest.expect(o, unittest.hasLength(2)); |
1452 checkMonitoringDestination(o[0]); | 1447 checkMonitoringDestination(o[0]); |
1453 checkMonitoringDestination(o[1]); | 1448 checkMonitoringDestination(o[1]); |
1454 } | 1449 } |
1455 | 1450 |
1456 buildUnnamed1811() { | 1451 buildUnnamed1809() { |
1457 var o = new core.List<api.MonitoringDestination>(); | 1452 var o = new core.List<api.MonitoringDestination>(); |
1458 o.add(buildMonitoringDestination()); | 1453 o.add(buildMonitoringDestination()); |
1459 o.add(buildMonitoringDestination()); | 1454 o.add(buildMonitoringDestination()); |
1460 return o; | 1455 return o; |
1461 } | 1456 } |
1462 | 1457 |
1463 checkUnnamed1811(core.List<api.MonitoringDestination> o) { | 1458 checkUnnamed1809(core.List<api.MonitoringDestination> o) { |
1464 unittest.expect(o, unittest.hasLength(2)); | 1459 unittest.expect(o, unittest.hasLength(2)); |
1465 checkMonitoringDestination(o[0]); | 1460 checkMonitoringDestination(o[0]); |
1466 checkMonitoringDestination(o[1]); | 1461 checkMonitoringDestination(o[1]); |
1467 } | 1462 } |
1468 | 1463 |
1469 core.int buildCounterMonitoring = 0; | 1464 core.int buildCounterMonitoring = 0; |
1470 buildMonitoring() { | 1465 buildMonitoring() { |
1471 var o = new api.Monitoring(); | 1466 var o = new api.Monitoring(); |
1472 buildCounterMonitoring++; | 1467 buildCounterMonitoring++; |
1473 if (buildCounterMonitoring < 3) { | 1468 if (buildCounterMonitoring < 3) { |
1474 o.consumerDestinations = buildUnnamed1810(); | 1469 o.consumerDestinations = buildUnnamed1808(); |
1475 o.producerDestinations = buildUnnamed1811(); | 1470 o.producerDestinations = buildUnnamed1809(); |
1476 } | 1471 } |
1477 buildCounterMonitoring--; | 1472 buildCounterMonitoring--; |
1478 return o; | 1473 return o; |
1479 } | 1474 } |
1480 | 1475 |
1481 checkMonitoring(api.Monitoring o) { | 1476 checkMonitoring(api.Monitoring o) { |
1482 buildCounterMonitoring++; | 1477 buildCounterMonitoring++; |
1483 if (buildCounterMonitoring < 3) { | 1478 if (buildCounterMonitoring < 3) { |
1484 checkUnnamed1810(o.consumerDestinations); | 1479 checkUnnamed1808(o.consumerDestinations); |
1485 checkUnnamed1811(o.producerDestinations); | 1480 checkUnnamed1809(o.producerDestinations); |
1486 } | 1481 } |
1487 buildCounterMonitoring--; | 1482 buildCounterMonitoring--; |
1488 } | 1483 } |
1489 | 1484 |
1490 buildUnnamed1812() { | 1485 buildUnnamed1810() { |
1491 var o = new core.List<core.String>(); | 1486 var o = new core.List<core.String>(); |
1492 o.add("foo"); | 1487 o.add("foo"); |
1493 o.add("foo"); | 1488 o.add("foo"); |
1494 return o; | 1489 return o; |
1495 } | 1490 } |
1496 | 1491 |
1497 checkUnnamed1812(core.List<core.String> o) { | 1492 checkUnnamed1810(core.List<core.String> o) { |
1498 unittest.expect(o, unittest.hasLength(2)); | 1493 unittest.expect(o, unittest.hasLength(2)); |
1499 unittest.expect(o[0], unittest.equals('foo')); | 1494 unittest.expect(o[0], unittest.equals('foo')); |
1500 unittest.expect(o[1], unittest.equals('foo')); | 1495 unittest.expect(o[1], unittest.equals('foo')); |
1501 } | 1496 } |
1502 | 1497 |
1503 core.int buildCounterMonitoringDestination = 0; | 1498 core.int buildCounterMonitoringDestination = 0; |
1504 buildMonitoringDestination() { | 1499 buildMonitoringDestination() { |
1505 var o = new api.MonitoringDestination(); | 1500 var o = new api.MonitoringDestination(); |
1506 buildCounterMonitoringDestination++; | 1501 buildCounterMonitoringDestination++; |
1507 if (buildCounterMonitoringDestination < 3) { | 1502 if (buildCounterMonitoringDestination < 3) { |
1508 o.metrics = buildUnnamed1812(); | 1503 o.metrics = buildUnnamed1810(); |
1509 o.monitoredResource = "foo"; | 1504 o.monitoredResource = "foo"; |
1510 } | 1505 } |
1511 buildCounterMonitoringDestination--; | 1506 buildCounterMonitoringDestination--; |
1512 return o; | 1507 return o; |
1513 } | 1508 } |
1514 | 1509 |
1515 checkMonitoringDestination(api.MonitoringDestination o) { | 1510 checkMonitoringDestination(api.MonitoringDestination o) { |
1516 buildCounterMonitoringDestination++; | 1511 buildCounterMonitoringDestination++; |
1517 if (buildCounterMonitoringDestination < 3) { | 1512 if (buildCounterMonitoringDestination < 3) { |
1518 checkUnnamed1812(o.metrics); | 1513 checkUnnamed1810(o.metrics); |
1519 unittest.expect(o.monitoredResource, unittest.equals('foo')); | 1514 unittest.expect(o.monitoredResource, unittest.equals('foo')); |
1520 } | 1515 } |
1521 buildCounterMonitoringDestination--; | 1516 buildCounterMonitoringDestination--; |
1522 } | 1517 } |
1523 | 1518 |
1524 core.int buildCounterOAuthRequirements = 0; | 1519 core.int buildCounterOAuthRequirements = 0; |
1525 buildOAuthRequirements() { | 1520 buildOAuthRequirements() { |
1526 var o = new api.OAuthRequirements(); | 1521 var o = new api.OAuthRequirements(); |
1527 buildCounterOAuthRequirements++; | 1522 buildCounterOAuthRequirements++; |
1528 if (buildCounterOAuthRequirements < 3) { | 1523 if (buildCounterOAuthRequirements < 3) { |
1529 o.canonicalScopes = "foo"; | 1524 o.canonicalScopes = "foo"; |
1530 } | 1525 } |
1531 buildCounterOAuthRequirements--; | 1526 buildCounterOAuthRequirements--; |
1532 return o; | 1527 return o; |
1533 } | 1528 } |
1534 | 1529 |
1535 checkOAuthRequirements(api.OAuthRequirements o) { | 1530 checkOAuthRequirements(api.OAuthRequirements o) { |
1536 buildCounterOAuthRequirements++; | 1531 buildCounterOAuthRequirements++; |
1537 if (buildCounterOAuthRequirements < 3) { | 1532 if (buildCounterOAuthRequirements < 3) { |
1538 unittest.expect(o.canonicalScopes, unittest.equals('foo')); | 1533 unittest.expect(o.canonicalScopes, unittest.equals('foo')); |
1539 } | 1534 } |
1540 buildCounterOAuthRequirements--; | 1535 buildCounterOAuthRequirements--; |
1541 } | 1536 } |
1542 | 1537 |
1543 buildUnnamed1813() { | 1538 buildUnnamed1811() { |
1544 var o = new core.Map<core.String, core.Object>(); | 1539 var o = new core.Map<core.String, core.Object>(); |
1545 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1540 o["x"] = { |
1546 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1541 'list': [1, 2, 3], |
| 1542 'bool': true, |
| 1543 'string': 'foo' |
| 1544 }; |
| 1545 o["y"] = { |
| 1546 'list': [1, 2, 3], |
| 1547 'bool': true, |
| 1548 'string': 'foo' |
| 1549 }; |
1547 return o; | 1550 return o; |
1548 } | 1551 } |
1549 | 1552 |
1550 checkUnnamed1813(core.Map<core.String, core.Object> o) { | 1553 checkUnnamed1811(core.Map<core.String, core.Object> o) { |
1551 unittest.expect(o, unittest.hasLength(2)); | 1554 unittest.expect(o, unittest.hasLength(2)); |
1552 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')); | 1555 var casted1 = (o["x"]) as core.Map; |
1553 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')); | 1556 unittest.expect(casted1, unittest.hasLength(3)); |
| 1557 unittest.expect(casted1["list"], unittest.equals([1, 2, 3])); |
| 1558 unittest.expect(casted1["bool"], unittest.equals(true)); |
| 1559 unittest.expect(casted1["string"], unittest.equals('foo')); |
| 1560 var casted2 = (o["y"]) as core.Map; |
| 1561 unittest.expect(casted2, unittest.hasLength(3)); |
| 1562 unittest.expect(casted2["list"], unittest.equals([1, 2, 3])); |
| 1563 unittest.expect(casted2["bool"], unittest.equals(true)); |
| 1564 unittest.expect(casted2["string"], unittest.equals('foo')); |
1554 } | 1565 } |
1555 | 1566 |
1556 buildUnnamed1814() { | 1567 buildUnnamed1812() { |
1557 var o = new core.Map<core.String, core.Object>(); | 1568 var o = new core.Map<core.String, core.Object>(); |
1558 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1569 o["x"] = { |
1559 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1570 'list': [1, 2, 3], |
| 1571 'bool': true, |
| 1572 'string': 'foo' |
| 1573 }; |
| 1574 o["y"] = { |
| 1575 'list': [1, 2, 3], |
| 1576 'bool': true, |
| 1577 'string': 'foo' |
| 1578 }; |
1560 return o; | 1579 return o; |
1561 } | 1580 } |
1562 | 1581 |
1563 checkUnnamed1814(core.Map<core.String, core.Object> o) { | 1582 checkUnnamed1812(core.Map<core.String, core.Object> o) { |
1564 unittest.expect(o, unittest.hasLength(2)); | 1583 unittest.expect(o, unittest.hasLength(2)); |
1565 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')); | 1584 var casted3 = (o["x"]) as core.Map; |
1566 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')); | 1585 unittest.expect(casted3, unittest.hasLength(3)); |
| 1586 unittest.expect(casted3["list"], unittest.equals([1, 2, 3])); |
| 1587 unittest.expect(casted3["bool"], unittest.equals(true)); |
| 1588 unittest.expect(casted3["string"], unittest.equals('foo')); |
| 1589 var casted4 = (o["y"]) as core.Map; |
| 1590 unittest.expect(casted4, unittest.hasLength(3)); |
| 1591 unittest.expect(casted4["list"], unittest.equals([1, 2, 3])); |
| 1592 unittest.expect(casted4["bool"], unittest.equals(true)); |
| 1593 unittest.expect(casted4["string"], unittest.equals('foo')); |
1567 } | 1594 } |
1568 | 1595 |
1569 core.int buildCounterOperation = 0; | 1596 core.int buildCounterOperation = 0; |
1570 buildOperation() { | 1597 buildOperation() { |
1571 var o = new api.Operation(); | 1598 var o = new api.Operation(); |
1572 buildCounterOperation++; | 1599 buildCounterOperation++; |
1573 if (buildCounterOperation < 3) { | 1600 if (buildCounterOperation < 3) { |
1574 o.done = true; | 1601 o.done = true; |
1575 o.error = buildStatus(); | 1602 o.error = buildStatus(); |
1576 o.metadata = buildUnnamed1813(); | 1603 o.metadata = buildUnnamed1811(); |
1577 o.name = "foo"; | 1604 o.name = "foo"; |
1578 o.response = buildUnnamed1814(); | 1605 o.response = buildUnnamed1812(); |
1579 } | 1606 } |
1580 buildCounterOperation--; | 1607 buildCounterOperation--; |
1581 return o; | 1608 return o; |
1582 } | 1609 } |
1583 | 1610 |
1584 checkOperation(api.Operation o) { | 1611 checkOperation(api.Operation o) { |
1585 buildCounterOperation++; | 1612 buildCounterOperation++; |
1586 if (buildCounterOperation < 3) { | 1613 if (buildCounterOperation < 3) { |
1587 unittest.expect(o.done, unittest.isTrue); | 1614 unittest.expect(o.done, unittest.isTrue); |
1588 checkStatus(o.error); | 1615 checkStatus(o.error); |
1589 checkUnnamed1813(o.metadata); | 1616 checkUnnamed1811(o.metadata); |
1590 unittest.expect(o.name, unittest.equals('foo')); | 1617 unittest.expect(o.name, unittest.equals('foo')); |
1591 checkUnnamed1814(o.response); | 1618 checkUnnamed1812(o.response); |
1592 } | 1619 } |
1593 buildCounterOperation--; | 1620 buildCounterOperation--; |
1594 } | 1621 } |
1595 | 1622 |
1596 buildUnnamed1815() { | 1623 buildUnnamed1813() { |
1597 var o = new core.List<core.String>(); | 1624 var o = new core.List<core.String>(); |
1598 o.add("foo"); | 1625 o.add("foo"); |
1599 o.add("foo"); | 1626 o.add("foo"); |
1600 return o; | 1627 return o; |
1601 } | 1628 } |
1602 | 1629 |
1603 checkUnnamed1815(core.List<core.String> o) { | 1630 checkUnnamed1813(core.List<core.String> o) { |
1604 unittest.expect(o, unittest.hasLength(2)); | 1631 unittest.expect(o, unittest.hasLength(2)); |
1605 unittest.expect(o[0], unittest.equals('foo')); | 1632 unittest.expect(o[0], unittest.equals('foo')); |
1606 unittest.expect(o[1], unittest.equals('foo')); | 1633 unittest.expect(o[1], unittest.equals('foo')); |
1607 } | 1634 } |
1608 | 1635 |
1609 buildUnnamed1816() { | 1636 buildUnnamed1814() { |
1610 var o = new core.List<api.Step>(); | 1637 var o = new core.List<api.Step>(); |
1611 o.add(buildStep()); | 1638 o.add(buildStep()); |
1612 o.add(buildStep()); | 1639 o.add(buildStep()); |
1613 return o; | 1640 return o; |
1614 } | 1641 } |
1615 | 1642 |
1616 checkUnnamed1816(core.List<api.Step> o) { | 1643 checkUnnamed1814(core.List<api.Step> o) { |
1617 unittest.expect(o, unittest.hasLength(2)); | 1644 unittest.expect(o, unittest.hasLength(2)); |
1618 checkStep(o[0]); | 1645 checkStep(o[0]); |
1619 checkStep(o[1]); | 1646 checkStep(o[1]); |
1620 } | 1647 } |
1621 | 1648 |
1622 core.int buildCounterOperationMetadata = 0; | 1649 core.int buildCounterOperationMetadata = 0; |
1623 buildOperationMetadata() { | 1650 buildOperationMetadata() { |
1624 var o = new api.OperationMetadata(); | 1651 var o = new api.OperationMetadata(); |
1625 buildCounterOperationMetadata++; | 1652 buildCounterOperationMetadata++; |
1626 if (buildCounterOperationMetadata < 3) { | 1653 if (buildCounterOperationMetadata < 3) { |
1627 o.progressPercentage = 42; | 1654 o.progressPercentage = 42; |
1628 o.resourceNames = buildUnnamed1815(); | 1655 o.resourceNames = buildUnnamed1813(); |
1629 o.startTime = "foo"; | 1656 o.startTime = "foo"; |
1630 o.steps = buildUnnamed1816(); | 1657 o.steps = buildUnnamed1814(); |
1631 } | 1658 } |
1632 buildCounterOperationMetadata--; | 1659 buildCounterOperationMetadata--; |
1633 return o; | 1660 return o; |
1634 } | 1661 } |
1635 | 1662 |
1636 checkOperationMetadata(api.OperationMetadata o) { | 1663 checkOperationMetadata(api.OperationMetadata o) { |
1637 buildCounterOperationMetadata++; | 1664 buildCounterOperationMetadata++; |
1638 if (buildCounterOperationMetadata < 3) { | 1665 if (buildCounterOperationMetadata < 3) { |
1639 unittest.expect(o.progressPercentage, unittest.equals(42)); | 1666 unittest.expect(o.progressPercentage, unittest.equals(42)); |
1640 checkUnnamed1815(o.resourceNames); | 1667 checkUnnamed1813(o.resourceNames); |
1641 unittest.expect(o.startTime, unittest.equals('foo')); | 1668 unittest.expect(o.startTime, unittest.equals('foo')); |
1642 checkUnnamed1816(o.steps); | 1669 checkUnnamed1814(o.steps); |
1643 } | 1670 } |
1644 buildCounterOperationMetadata--; | 1671 buildCounterOperationMetadata--; |
1645 } | 1672 } |
1646 | 1673 |
1647 buildUnnamed1817() { | 1674 buildUnnamed1815() { |
1648 var o = new core.Map<core.String, core.Object>(); | 1675 var o = new core.Map<core.String, core.Object>(); |
1649 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1676 o["x"] = { |
1650 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 1677 'list': [1, 2, 3], |
| 1678 'bool': true, |
| 1679 'string': 'foo' |
| 1680 }; |
| 1681 o["y"] = { |
| 1682 'list': [1, 2, 3], |
| 1683 'bool': true, |
| 1684 'string': 'foo' |
| 1685 }; |
1651 return o; | 1686 return o; |
1652 } | 1687 } |
1653 | 1688 |
1654 checkUnnamed1817(core.Map<core.String, core.Object> o) { | 1689 checkUnnamed1815(core.Map<core.String, core.Object> o) { |
1655 unittest.expect(o, unittest.hasLength(2)); | 1690 unittest.expect(o, unittest.hasLength(2)); |
1656 var casted5 = (o["x"]) as core.Map; unittest.expect(casted5, unittest.hasLengt
h(3)); unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted5["bool"], unittest.equals(true)); unittest.expect(casted5["string"],
unittest.equals('foo')); | 1691 var casted5 = (o["x"]) as core.Map; |
1657 var casted6 = (o["y"]) as core.Map; unittest.expect(casted6, unittest.hasLengt
h(3)); unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted6["bool"], unittest.equals(true)); unittest.expect(casted6["string"],
unittest.equals('foo')); | 1692 unittest.expect(casted5, unittest.hasLength(3)); |
| 1693 unittest.expect(casted5["list"], unittest.equals([1, 2, 3])); |
| 1694 unittest.expect(casted5["bool"], unittest.equals(true)); |
| 1695 unittest.expect(casted5["string"], unittest.equals('foo')); |
| 1696 var casted6 = (o["y"]) as core.Map; |
| 1697 unittest.expect(casted6, unittest.hasLength(3)); |
| 1698 unittest.expect(casted6["list"], unittest.equals([1, 2, 3])); |
| 1699 unittest.expect(casted6["bool"], unittest.equals(true)); |
| 1700 unittest.expect(casted6["string"], unittest.equals('foo')); |
1658 } | 1701 } |
1659 | 1702 |
1660 core.int buildCounterOption = 0; | 1703 core.int buildCounterOption = 0; |
1661 buildOption() { | 1704 buildOption() { |
1662 var o = new api.Option(); | 1705 var o = new api.Option(); |
1663 buildCounterOption++; | 1706 buildCounterOption++; |
1664 if (buildCounterOption < 3) { | 1707 if (buildCounterOption < 3) { |
1665 o.name = "foo"; | 1708 o.name = "foo"; |
1666 o.value = buildUnnamed1817(); | 1709 o.value = buildUnnamed1815(); |
1667 } | 1710 } |
1668 buildCounterOption--; | 1711 buildCounterOption--; |
1669 return o; | 1712 return o; |
1670 } | 1713 } |
1671 | 1714 |
1672 checkOption(api.Option o) { | 1715 checkOption(api.Option o) { |
1673 buildCounterOption++; | 1716 buildCounterOption++; |
1674 if (buildCounterOption < 3) { | 1717 if (buildCounterOption < 3) { |
1675 unittest.expect(o.name, unittest.equals('foo')); | 1718 unittest.expect(o.name, unittest.equals('foo')); |
1676 checkUnnamed1817(o.value); | 1719 checkUnnamed1815(o.value); |
1677 } | 1720 } |
1678 buildCounterOption--; | 1721 buildCounterOption--; |
1679 } | 1722 } |
1680 | 1723 |
1681 buildUnnamed1818() { | 1724 buildUnnamed1816() { |
1682 var o = new core.List<api.Page>(); | 1725 var o = new core.List<api.Page>(); |
1683 o.add(buildPage()); | 1726 o.add(buildPage()); |
1684 o.add(buildPage()); | 1727 o.add(buildPage()); |
1685 return o; | 1728 return o; |
1686 } | 1729 } |
1687 | 1730 |
1688 checkUnnamed1818(core.List<api.Page> o) { | 1731 checkUnnamed1816(core.List<api.Page> o) { |
1689 unittest.expect(o, unittest.hasLength(2)); | 1732 unittest.expect(o, unittest.hasLength(2)); |
1690 checkPage(o[0]); | 1733 checkPage(o[0]); |
1691 checkPage(o[1]); | 1734 checkPage(o[1]); |
1692 } | 1735 } |
1693 | 1736 |
1694 core.int buildCounterPage = 0; | 1737 core.int buildCounterPage = 0; |
1695 buildPage() { | 1738 buildPage() { |
1696 var o = new api.Page(); | 1739 var o = new api.Page(); |
1697 buildCounterPage++; | 1740 buildCounterPage++; |
1698 if (buildCounterPage < 3) { | 1741 if (buildCounterPage < 3) { |
1699 o.content = "foo"; | 1742 o.content = "foo"; |
1700 o.name = "foo"; | 1743 o.name = "foo"; |
1701 o.subpages = buildUnnamed1818(); | 1744 o.subpages = buildUnnamed1816(); |
1702 } | 1745 } |
1703 buildCounterPage--; | 1746 buildCounterPage--; |
1704 return o; | 1747 return o; |
1705 } | 1748 } |
1706 | 1749 |
1707 checkPage(api.Page o) { | 1750 checkPage(api.Page o) { |
1708 buildCounterPage++; | 1751 buildCounterPage++; |
1709 if (buildCounterPage < 3) { | 1752 if (buildCounterPage < 3) { |
1710 unittest.expect(o.content, unittest.equals('foo')); | 1753 unittest.expect(o.content, unittest.equals('foo')); |
1711 unittest.expect(o.name, unittest.equals('foo')); | 1754 unittest.expect(o.name, unittest.equals('foo')); |
1712 checkUnnamed1818(o.subpages); | 1755 checkUnnamed1816(o.subpages); |
1713 } | 1756 } |
1714 buildCounterPage--; | 1757 buildCounterPage--; |
1715 } | 1758 } |
1716 | 1759 |
1717 core.int buildCounterPublishedService = 0; | 1760 core.int buildCounterPublishedService = 0; |
1718 buildPublishedService() { | 1761 buildPublishedService() { |
1719 var o = new api.PublishedService(); | 1762 var o = new api.PublishedService(); |
1720 buildCounterPublishedService++; | 1763 buildCounterPublishedService++; |
1721 if (buildCounterPublishedService < 3) { | 1764 if (buildCounterPublishedService < 3) { |
1722 o.name = "foo"; | 1765 o.name = "foo"; |
1723 o.service = buildService(); | 1766 o.service = buildService(); |
1724 } | 1767 } |
1725 buildCounterPublishedService--; | 1768 buildCounterPublishedService--; |
1726 return o; | 1769 return o; |
1727 } | 1770 } |
1728 | 1771 |
1729 checkPublishedService(api.PublishedService o) { | 1772 checkPublishedService(api.PublishedService o) { |
1730 buildCounterPublishedService++; | 1773 buildCounterPublishedService++; |
1731 if (buildCounterPublishedService < 3) { | 1774 if (buildCounterPublishedService < 3) { |
1732 unittest.expect(o.name, unittest.equals('foo')); | 1775 unittest.expect(o.name, unittest.equals('foo')); |
1733 checkService(o.service); | 1776 checkService(o.service); |
1734 } | 1777 } |
1735 buildCounterPublishedService--; | 1778 buildCounterPublishedService--; |
1736 } | 1779 } |
1737 | 1780 |
1738 buildUnnamed1819() { | 1781 buildUnnamed1817() { |
1739 var o = new core.List<api.QuotaLimit>(); | 1782 var o = new core.List<api.QuotaLimit>(); |
1740 o.add(buildQuotaLimit()); | 1783 o.add(buildQuotaLimit()); |
1741 o.add(buildQuotaLimit()); | 1784 o.add(buildQuotaLimit()); |
1742 return o; | 1785 return o; |
1743 } | 1786 } |
1744 | 1787 |
1745 checkUnnamed1819(core.List<api.QuotaLimit> o) { | 1788 checkUnnamed1817(core.List<api.QuotaLimit> o) { |
1746 unittest.expect(o, unittest.hasLength(2)); | 1789 unittest.expect(o, unittest.hasLength(2)); |
1747 checkQuotaLimit(o[0]); | 1790 checkQuotaLimit(o[0]); |
1748 checkQuotaLimit(o[1]); | 1791 checkQuotaLimit(o[1]); |
1749 } | 1792 } |
1750 | 1793 |
1751 buildUnnamed1820() { | 1794 buildUnnamed1818() { |
1752 var o = new core.List<api.MetricRule>(); | 1795 var o = new core.List<api.MetricRule>(); |
1753 o.add(buildMetricRule()); | 1796 o.add(buildMetricRule()); |
1754 o.add(buildMetricRule()); | 1797 o.add(buildMetricRule()); |
1755 return o; | 1798 return o; |
1756 } | 1799 } |
1757 | 1800 |
1758 checkUnnamed1820(core.List<api.MetricRule> o) { | 1801 checkUnnamed1818(core.List<api.MetricRule> o) { |
1759 unittest.expect(o, unittest.hasLength(2)); | 1802 unittest.expect(o, unittest.hasLength(2)); |
1760 checkMetricRule(o[0]); | 1803 checkMetricRule(o[0]); |
1761 checkMetricRule(o[1]); | 1804 checkMetricRule(o[1]); |
1762 } | 1805 } |
1763 | 1806 |
1764 core.int buildCounterQuota = 0; | 1807 core.int buildCounterQuota = 0; |
1765 buildQuota() { | 1808 buildQuota() { |
1766 var o = new api.Quota(); | 1809 var o = new api.Quota(); |
1767 buildCounterQuota++; | 1810 buildCounterQuota++; |
1768 if (buildCounterQuota < 3) { | 1811 if (buildCounterQuota < 3) { |
1769 o.limits = buildUnnamed1819(); | 1812 o.limits = buildUnnamed1817(); |
1770 o.metricRules = buildUnnamed1820(); | 1813 o.metricRules = buildUnnamed1818(); |
1771 } | 1814 } |
1772 buildCounterQuota--; | 1815 buildCounterQuota--; |
1773 return o; | 1816 return o; |
1774 } | 1817 } |
1775 | 1818 |
1776 checkQuota(api.Quota o) { | 1819 checkQuota(api.Quota o) { |
1777 buildCounterQuota++; | 1820 buildCounterQuota++; |
1778 if (buildCounterQuota < 3) { | 1821 if (buildCounterQuota < 3) { |
1779 checkUnnamed1819(o.limits); | 1822 checkUnnamed1817(o.limits); |
1780 checkUnnamed1820(o.metricRules); | 1823 checkUnnamed1818(o.metricRules); |
1781 } | 1824 } |
1782 buildCounterQuota--; | 1825 buildCounterQuota--; |
1783 } | 1826 } |
1784 | 1827 |
1785 buildUnnamed1821() { | 1828 buildUnnamed1819() { |
1786 var o = new core.Map<core.String, core.String>(); | 1829 var o = new core.Map<core.String, core.String>(); |
1787 o["x"] = "foo"; | 1830 o["x"] = "foo"; |
1788 o["y"] = "foo"; | 1831 o["y"] = "foo"; |
1789 return o; | 1832 return o; |
1790 } | 1833 } |
1791 | 1834 |
1792 checkUnnamed1821(core.Map<core.String, core.String> o) { | 1835 checkUnnamed1819(core.Map<core.String, core.String> o) { |
1793 unittest.expect(o, unittest.hasLength(2)); | 1836 unittest.expect(o, unittest.hasLength(2)); |
1794 unittest.expect(o["x"], unittest.equals('foo')); | 1837 unittest.expect(o["x"], unittest.equals('foo')); |
1795 unittest.expect(o["y"], unittest.equals('foo')); | 1838 unittest.expect(o["y"], unittest.equals('foo')); |
1796 } | 1839 } |
1797 | 1840 |
1798 core.int buildCounterQuotaLimit = 0; | 1841 core.int buildCounterQuotaLimit = 0; |
1799 buildQuotaLimit() { | 1842 buildQuotaLimit() { |
1800 var o = new api.QuotaLimit(); | 1843 var o = new api.QuotaLimit(); |
1801 buildCounterQuotaLimit++; | 1844 buildCounterQuotaLimit++; |
1802 if (buildCounterQuotaLimit < 3) { | 1845 if (buildCounterQuotaLimit < 3) { |
1803 o.defaultLimit = "foo"; | 1846 o.defaultLimit = "foo"; |
1804 o.description = "foo"; | 1847 o.description = "foo"; |
1805 o.displayName = "foo"; | 1848 o.displayName = "foo"; |
1806 o.duration = "foo"; | 1849 o.duration = "foo"; |
1807 o.freeTier = "foo"; | 1850 o.freeTier = "foo"; |
1808 o.maxLimit = "foo"; | 1851 o.maxLimit = "foo"; |
1809 o.metric = "foo"; | 1852 o.metric = "foo"; |
1810 o.name = "foo"; | 1853 o.name = "foo"; |
1811 o.unit = "foo"; | 1854 o.unit = "foo"; |
1812 o.values = buildUnnamed1821(); | 1855 o.values = buildUnnamed1819(); |
1813 } | 1856 } |
1814 buildCounterQuotaLimit--; | 1857 buildCounterQuotaLimit--; |
1815 return o; | 1858 return o; |
1816 } | 1859 } |
1817 | 1860 |
1818 checkQuotaLimit(api.QuotaLimit o) { | 1861 checkQuotaLimit(api.QuotaLimit o) { |
1819 buildCounterQuotaLimit++; | 1862 buildCounterQuotaLimit++; |
1820 if (buildCounterQuotaLimit < 3) { | 1863 if (buildCounterQuotaLimit < 3) { |
1821 unittest.expect(o.defaultLimit, unittest.equals('foo')); | 1864 unittest.expect(o.defaultLimit, unittest.equals('foo')); |
1822 unittest.expect(o.description, unittest.equals('foo')); | 1865 unittest.expect(o.description, unittest.equals('foo')); |
1823 unittest.expect(o.displayName, unittest.equals('foo')); | 1866 unittest.expect(o.displayName, unittest.equals('foo')); |
1824 unittest.expect(o.duration, unittest.equals('foo')); | 1867 unittest.expect(o.duration, unittest.equals('foo')); |
1825 unittest.expect(o.freeTier, unittest.equals('foo')); | 1868 unittest.expect(o.freeTier, unittest.equals('foo')); |
1826 unittest.expect(o.maxLimit, unittest.equals('foo')); | 1869 unittest.expect(o.maxLimit, unittest.equals('foo')); |
1827 unittest.expect(o.metric, unittest.equals('foo')); | 1870 unittest.expect(o.metric, unittest.equals('foo')); |
1828 unittest.expect(o.name, unittest.equals('foo')); | 1871 unittest.expect(o.name, unittest.equals('foo')); |
1829 unittest.expect(o.unit, unittest.equals('foo')); | 1872 unittest.expect(o.unit, unittest.equals('foo')); |
1830 checkUnnamed1821(o.values); | 1873 checkUnnamed1819(o.values); |
1831 } | 1874 } |
1832 buildCounterQuotaLimit--; | 1875 buildCounterQuotaLimit--; |
1833 } | 1876 } |
1834 | 1877 |
1835 buildUnnamed1822() { | 1878 buildUnnamed1820() { |
1836 var o = new core.List<api.PublishedService>(); | 1879 var o = new core.List<api.PublishedService>(); |
1837 o.add(buildPublishedService()); | 1880 o.add(buildPublishedService()); |
1838 o.add(buildPublishedService()); | 1881 o.add(buildPublishedService()); |
1839 return o; | 1882 return o; |
1840 } | 1883 } |
1841 | 1884 |
1842 checkUnnamed1822(core.List<api.PublishedService> o) { | 1885 checkUnnamed1820(core.List<api.PublishedService> o) { |
1843 unittest.expect(o, unittest.hasLength(2)); | 1886 unittest.expect(o, unittest.hasLength(2)); |
1844 checkPublishedService(o[0]); | 1887 checkPublishedService(o[0]); |
1845 checkPublishedService(o[1]); | 1888 checkPublishedService(o[1]); |
1846 } | 1889 } |
1847 | 1890 |
1848 core.int buildCounterSearchServicesResponse = 0; | 1891 core.int buildCounterSearchServicesResponse = 0; |
1849 buildSearchServicesResponse() { | 1892 buildSearchServicesResponse() { |
1850 var o = new api.SearchServicesResponse(); | 1893 var o = new api.SearchServicesResponse(); |
1851 buildCounterSearchServicesResponse++; | 1894 buildCounterSearchServicesResponse++; |
1852 if (buildCounterSearchServicesResponse < 3) { | 1895 if (buildCounterSearchServicesResponse < 3) { |
1853 o.nextPageToken = "foo"; | 1896 o.nextPageToken = "foo"; |
1854 o.services = buildUnnamed1822(); | 1897 o.services = buildUnnamed1820(); |
1855 } | 1898 } |
1856 buildCounterSearchServicesResponse--; | 1899 buildCounterSearchServicesResponse--; |
1857 return o; | 1900 return o; |
1858 } | 1901 } |
1859 | 1902 |
1860 checkSearchServicesResponse(api.SearchServicesResponse o) { | 1903 checkSearchServicesResponse(api.SearchServicesResponse o) { |
1861 buildCounterSearchServicesResponse++; | 1904 buildCounterSearchServicesResponse++; |
1862 if (buildCounterSearchServicesResponse < 3) { | 1905 if (buildCounterSearchServicesResponse < 3) { |
1863 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1906 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
1864 checkUnnamed1822(o.services); | 1907 checkUnnamed1820(o.services); |
1865 } | 1908 } |
1866 buildCounterSearchServicesResponse--; | 1909 buildCounterSearchServicesResponse--; |
1867 } | 1910 } |
1868 | 1911 |
1869 buildUnnamed1823() { | 1912 buildUnnamed1821() { |
1870 var o = new core.List<api.Api>(); | 1913 var o = new core.List<api.Api>(); |
1871 o.add(buildApi()); | 1914 o.add(buildApi()); |
1872 o.add(buildApi()); | 1915 o.add(buildApi()); |
1873 return o; | 1916 return o; |
1874 } | 1917 } |
1875 | 1918 |
1876 checkUnnamed1823(core.List<api.Api> o) { | 1919 checkUnnamed1821(core.List<api.Api> o) { |
1877 unittest.expect(o, unittest.hasLength(2)); | 1920 unittest.expect(o, unittest.hasLength(2)); |
1878 checkApi(o[0]); | 1921 checkApi(o[0]); |
1879 checkApi(o[1]); | 1922 checkApi(o[1]); |
1880 } | 1923 } |
1881 | 1924 |
1882 buildUnnamed1824() { | 1925 buildUnnamed1822() { |
1883 var o = new core.List<api.Endpoint>(); | 1926 var o = new core.List<api.Endpoint>(); |
1884 o.add(buildEndpoint()); | 1927 o.add(buildEndpoint()); |
1885 o.add(buildEndpoint()); | 1928 o.add(buildEndpoint()); |
1886 return o; | 1929 return o; |
1887 } | 1930 } |
1888 | 1931 |
1889 checkUnnamed1824(core.List<api.Endpoint> o) { | 1932 checkUnnamed1822(core.List<api.Endpoint> o) { |
1890 unittest.expect(o, unittest.hasLength(2)); | 1933 unittest.expect(o, unittest.hasLength(2)); |
1891 checkEndpoint(o[0]); | 1934 checkEndpoint(o[0]); |
1892 checkEndpoint(o[1]); | 1935 checkEndpoint(o[1]); |
1893 } | 1936 } |
1894 | 1937 |
1895 buildUnnamed1825() { | 1938 buildUnnamed1823() { |
1896 var o = new core.List<api.Enum>(); | 1939 var o = new core.List<api.Enum>(); |
1897 o.add(buildEnum()); | 1940 o.add(buildEnum()); |
1898 o.add(buildEnum()); | 1941 o.add(buildEnum()); |
1899 return o; | 1942 return o; |
1900 } | 1943 } |
1901 | 1944 |
1902 checkUnnamed1825(core.List<api.Enum> o) { | 1945 checkUnnamed1823(core.List<api.Enum> o) { |
1903 unittest.expect(o, unittest.hasLength(2)); | 1946 unittest.expect(o, unittest.hasLength(2)); |
1904 checkEnum(o[0]); | 1947 checkEnum(o[0]); |
1905 checkEnum(o[1]); | 1948 checkEnum(o[1]); |
1906 } | 1949 } |
1907 | 1950 |
1908 buildUnnamed1826() { | 1951 buildUnnamed1824() { |
1909 var o = new core.List<api.LogDescriptor>(); | 1952 var o = new core.List<api.LogDescriptor>(); |
1910 o.add(buildLogDescriptor()); | 1953 o.add(buildLogDescriptor()); |
1911 o.add(buildLogDescriptor()); | 1954 o.add(buildLogDescriptor()); |
1912 return o; | 1955 return o; |
1913 } | 1956 } |
1914 | 1957 |
1915 checkUnnamed1826(core.List<api.LogDescriptor> o) { | 1958 checkUnnamed1824(core.List<api.LogDescriptor> o) { |
1916 unittest.expect(o, unittest.hasLength(2)); | 1959 unittest.expect(o, unittest.hasLength(2)); |
1917 checkLogDescriptor(o[0]); | 1960 checkLogDescriptor(o[0]); |
1918 checkLogDescriptor(o[1]); | 1961 checkLogDescriptor(o[1]); |
1919 } | 1962 } |
1920 | 1963 |
1921 buildUnnamed1827() { | 1964 buildUnnamed1825() { |
1922 var o = new core.List<api.MetricDescriptor>(); | 1965 var o = new core.List<api.MetricDescriptor>(); |
1923 o.add(buildMetricDescriptor()); | 1966 o.add(buildMetricDescriptor()); |
1924 o.add(buildMetricDescriptor()); | 1967 o.add(buildMetricDescriptor()); |
1925 return o; | 1968 return o; |
1926 } | 1969 } |
1927 | 1970 |
1928 checkUnnamed1827(core.List<api.MetricDescriptor> o) { | 1971 checkUnnamed1825(core.List<api.MetricDescriptor> o) { |
1929 unittest.expect(o, unittest.hasLength(2)); | 1972 unittest.expect(o, unittest.hasLength(2)); |
1930 checkMetricDescriptor(o[0]); | 1973 checkMetricDescriptor(o[0]); |
1931 checkMetricDescriptor(o[1]); | 1974 checkMetricDescriptor(o[1]); |
1932 } | 1975 } |
1933 | 1976 |
1934 buildUnnamed1828() { | 1977 buildUnnamed1826() { |
1935 var o = new core.List<api.MonitoredResourceDescriptor>(); | 1978 var o = new core.List<api.MonitoredResourceDescriptor>(); |
1936 o.add(buildMonitoredResourceDescriptor()); | 1979 o.add(buildMonitoredResourceDescriptor()); |
1937 o.add(buildMonitoredResourceDescriptor()); | 1980 o.add(buildMonitoredResourceDescriptor()); |
1938 return o; | 1981 return o; |
1939 } | 1982 } |
1940 | 1983 |
1941 checkUnnamed1828(core.List<api.MonitoredResourceDescriptor> o) { | 1984 checkUnnamed1826(core.List<api.MonitoredResourceDescriptor> o) { |
1942 unittest.expect(o, unittest.hasLength(2)); | 1985 unittest.expect(o, unittest.hasLength(2)); |
1943 checkMonitoredResourceDescriptor(o[0]); | 1986 checkMonitoredResourceDescriptor(o[0]); |
1944 checkMonitoredResourceDescriptor(o[1]); | 1987 checkMonitoredResourceDescriptor(o[1]); |
1945 } | 1988 } |
1946 | 1989 |
1947 buildUnnamed1829() { | 1990 buildUnnamed1827() { |
1948 var o = new core.List<api.Type>(); | 1991 var o = new core.List<api.Type>(); |
1949 o.add(buildType()); | 1992 o.add(buildType()); |
1950 o.add(buildType()); | 1993 o.add(buildType()); |
1951 return o; | 1994 return o; |
1952 } | 1995 } |
1953 | 1996 |
1954 checkUnnamed1829(core.List<api.Type> o) { | 1997 checkUnnamed1827(core.List<api.Type> o) { |
1955 unittest.expect(o, unittest.hasLength(2)); | 1998 unittest.expect(o, unittest.hasLength(2)); |
1956 checkType(o[0]); | 1999 checkType(o[0]); |
1957 checkType(o[1]); | 2000 checkType(o[1]); |
1958 } | 2001 } |
1959 | 2002 |
1960 buildUnnamed1830() { | 2003 buildUnnamed1828() { |
1961 var o = new core.List<api.Type>(); | 2004 var o = new core.List<api.Type>(); |
1962 o.add(buildType()); | 2005 o.add(buildType()); |
1963 o.add(buildType()); | 2006 o.add(buildType()); |
1964 return o; | 2007 return o; |
1965 } | 2008 } |
1966 | 2009 |
1967 checkUnnamed1830(core.List<api.Type> o) { | 2010 checkUnnamed1828(core.List<api.Type> o) { |
1968 unittest.expect(o, unittest.hasLength(2)); | 2011 unittest.expect(o, unittest.hasLength(2)); |
1969 checkType(o[0]); | 2012 checkType(o[0]); |
1970 checkType(o[1]); | 2013 checkType(o[1]); |
1971 } | 2014 } |
1972 | 2015 |
1973 core.int buildCounterService = 0; | 2016 core.int buildCounterService = 0; |
1974 buildService() { | 2017 buildService() { |
1975 var o = new api.Service(); | 2018 var o = new api.Service(); |
1976 buildCounterService++; | 2019 buildCounterService++; |
1977 if (buildCounterService < 3) { | 2020 if (buildCounterService < 3) { |
1978 o.apis = buildUnnamed1823(); | 2021 o.apis = buildUnnamed1821(); |
1979 o.authentication = buildAuthentication(); | 2022 o.authentication = buildAuthentication(); |
1980 o.backend = buildBackend(); | 2023 o.backend = buildBackend(); |
1981 o.configVersion = 42; | 2024 o.configVersion = 42; |
1982 o.context = buildContext(); | 2025 o.context = buildContext(); |
1983 o.control = buildControl(); | 2026 o.control = buildControl(); |
1984 o.customError = buildCustomError(); | 2027 o.customError = buildCustomError(); |
1985 o.documentation = buildDocumentation(); | 2028 o.documentation = buildDocumentation(); |
1986 o.endpoints = buildUnnamed1824(); | 2029 o.endpoints = buildUnnamed1822(); |
1987 o.enums = buildUnnamed1825(); | 2030 o.enums = buildUnnamed1823(); |
1988 o.experimental = buildExperimental(); | 2031 o.experimental = buildExperimental(); |
1989 o.http = buildHttp(); | 2032 o.http = buildHttp(); |
1990 o.id = "foo"; | 2033 o.id = "foo"; |
1991 o.logging = buildLogging(); | 2034 o.logging = buildLogging(); |
1992 o.logs = buildUnnamed1826(); | 2035 o.logs = buildUnnamed1824(); |
1993 o.metrics = buildUnnamed1827(); | 2036 o.metrics = buildUnnamed1825(); |
1994 o.monitoredResources = buildUnnamed1828(); | 2037 o.monitoredResources = buildUnnamed1826(); |
1995 o.monitoring = buildMonitoring(); | 2038 o.monitoring = buildMonitoring(); |
1996 o.name = "foo"; | 2039 o.name = "foo"; |
1997 o.producerProjectId = "foo"; | 2040 o.producerProjectId = "foo"; |
1998 o.quota = buildQuota(); | 2041 o.quota = buildQuota(); |
1999 o.sourceInfo = buildSourceInfo(); | 2042 o.sourceInfo = buildSourceInfo(); |
2000 o.systemParameters = buildSystemParameters(); | 2043 o.systemParameters = buildSystemParameters(); |
2001 o.systemTypes = buildUnnamed1829(); | 2044 o.systemTypes = buildUnnamed1827(); |
2002 o.title = "foo"; | 2045 o.title = "foo"; |
2003 o.types = buildUnnamed1830(); | 2046 o.types = buildUnnamed1828(); |
2004 o.usage = buildUsage(); | 2047 o.usage = buildUsage(); |
2005 o.visibility = buildVisibility(); | 2048 o.visibility = buildVisibility(); |
2006 } | 2049 } |
2007 buildCounterService--; | 2050 buildCounterService--; |
2008 return o; | 2051 return o; |
2009 } | 2052 } |
2010 | 2053 |
2011 checkService(api.Service o) { | 2054 checkService(api.Service o) { |
2012 buildCounterService++; | 2055 buildCounterService++; |
2013 if (buildCounterService < 3) { | 2056 if (buildCounterService < 3) { |
2014 checkUnnamed1823(o.apis); | 2057 checkUnnamed1821(o.apis); |
2015 checkAuthentication(o.authentication); | 2058 checkAuthentication(o.authentication); |
2016 checkBackend(o.backend); | 2059 checkBackend(o.backend); |
2017 unittest.expect(o.configVersion, unittest.equals(42)); | 2060 unittest.expect(o.configVersion, unittest.equals(42)); |
2018 checkContext(o.context); | 2061 checkContext(o.context); |
2019 checkControl(o.control); | 2062 checkControl(o.control); |
2020 checkCustomError(o.customError); | 2063 checkCustomError(o.customError); |
2021 checkDocumentation(o.documentation); | 2064 checkDocumentation(o.documentation); |
2022 checkUnnamed1824(o.endpoints); | 2065 checkUnnamed1822(o.endpoints); |
2023 checkUnnamed1825(o.enums); | 2066 checkUnnamed1823(o.enums); |
2024 checkExperimental(o.experimental); | 2067 checkExperimental(o.experimental); |
2025 checkHttp(o.http); | 2068 checkHttp(o.http); |
2026 unittest.expect(o.id, unittest.equals('foo')); | 2069 unittest.expect(o.id, unittest.equals('foo')); |
2027 checkLogging(o.logging); | 2070 checkLogging(o.logging); |
2028 checkUnnamed1826(o.logs); | 2071 checkUnnamed1824(o.logs); |
2029 checkUnnamed1827(o.metrics); | 2072 checkUnnamed1825(o.metrics); |
2030 checkUnnamed1828(o.monitoredResources); | 2073 checkUnnamed1826(o.monitoredResources); |
2031 checkMonitoring(o.monitoring); | 2074 checkMonitoring(o.monitoring); |
2032 unittest.expect(o.name, unittest.equals('foo')); | 2075 unittest.expect(o.name, unittest.equals('foo')); |
2033 unittest.expect(o.producerProjectId, unittest.equals('foo')); | 2076 unittest.expect(o.producerProjectId, unittest.equals('foo')); |
2034 checkQuota(o.quota); | 2077 checkQuota(o.quota); |
2035 checkSourceInfo(o.sourceInfo); | 2078 checkSourceInfo(o.sourceInfo); |
2036 checkSystemParameters(o.systemParameters); | 2079 checkSystemParameters(o.systemParameters); |
2037 checkUnnamed1829(o.systemTypes); | 2080 checkUnnamed1827(o.systemTypes); |
2038 unittest.expect(o.title, unittest.equals('foo')); | 2081 unittest.expect(o.title, unittest.equals('foo')); |
2039 checkUnnamed1830(o.types); | 2082 checkUnnamed1828(o.types); |
2040 checkUsage(o.usage); | 2083 checkUsage(o.usage); |
2041 checkVisibility(o.visibility); | 2084 checkVisibility(o.visibility); |
2042 } | 2085 } |
2043 buildCounterService--; | 2086 buildCounterService--; |
2044 } | 2087 } |
2045 | 2088 |
2046 core.int buildCounterSourceContext = 0; | 2089 core.int buildCounterSourceContext = 0; |
2047 buildSourceContext() { | 2090 buildSourceContext() { |
2048 var o = new api.SourceContext(); | 2091 var o = new api.SourceContext(); |
2049 buildCounterSourceContext++; | 2092 buildCounterSourceContext++; |
2050 if (buildCounterSourceContext < 3) { | 2093 if (buildCounterSourceContext < 3) { |
2051 o.fileName = "foo"; | 2094 o.fileName = "foo"; |
2052 } | 2095 } |
2053 buildCounterSourceContext--; | 2096 buildCounterSourceContext--; |
2054 return o; | 2097 return o; |
2055 } | 2098 } |
2056 | 2099 |
2057 checkSourceContext(api.SourceContext o) { | 2100 checkSourceContext(api.SourceContext o) { |
2058 buildCounterSourceContext++; | 2101 buildCounterSourceContext++; |
2059 if (buildCounterSourceContext < 3) { | 2102 if (buildCounterSourceContext < 3) { |
2060 unittest.expect(o.fileName, unittest.equals('foo')); | 2103 unittest.expect(o.fileName, unittest.equals('foo')); |
2061 } | 2104 } |
2062 buildCounterSourceContext--; | 2105 buildCounterSourceContext--; |
2063 } | 2106 } |
2064 | 2107 |
2065 buildUnnamed1831() { | 2108 buildUnnamed1829() { |
2066 var o = new core.Map<core.String, core.Object>(); | 2109 var o = new core.Map<core.String, core.Object>(); |
2067 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 2110 o["x"] = { |
2068 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 2111 'list': [1, 2, 3], |
| 2112 'bool': true, |
| 2113 'string': 'foo' |
| 2114 }; |
| 2115 o["y"] = { |
| 2116 'list': [1, 2, 3], |
| 2117 'bool': true, |
| 2118 'string': 'foo' |
| 2119 }; |
2069 return o; | 2120 return o; |
2070 } | 2121 } |
2071 | 2122 |
2072 checkUnnamed1831(core.Map<core.String, core.Object> o) { | 2123 checkUnnamed1829(core.Map<core.String, core.Object> o) { |
2073 unittest.expect(o, unittest.hasLength(2)); | 2124 unittest.expect(o, unittest.hasLength(2)); |
2074 var casted7 = (o["x"]) as core.Map; unittest.expect(casted7, unittest.hasLengt
h(3)); unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted7["bool"], unittest.equals(true)); unittest.expect(casted7["string"],
unittest.equals('foo')); | 2125 var casted7 = (o["x"]) as core.Map; |
2075 var casted8 = (o["y"]) as core.Map; unittest.expect(casted8, unittest.hasLengt
h(3)); unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted8["bool"], unittest.equals(true)); unittest.expect(casted8["string"],
unittest.equals('foo')); | 2126 unittest.expect(casted7, unittest.hasLength(3)); |
| 2127 unittest.expect(casted7["list"], unittest.equals([1, 2, 3])); |
| 2128 unittest.expect(casted7["bool"], unittest.equals(true)); |
| 2129 unittest.expect(casted7["string"], unittest.equals('foo')); |
| 2130 var casted8 = (o["y"]) as core.Map; |
| 2131 unittest.expect(casted8, unittest.hasLength(3)); |
| 2132 unittest.expect(casted8["list"], unittest.equals([1, 2, 3])); |
| 2133 unittest.expect(casted8["bool"], unittest.equals(true)); |
| 2134 unittest.expect(casted8["string"], unittest.equals('foo')); |
2076 } | 2135 } |
2077 | 2136 |
2078 buildUnnamed1832() { | 2137 buildUnnamed1830() { |
2079 var o = new core.List<core.Map<core.String, core.Object>>(); | 2138 var o = new core.List<core.Map<core.String, core.Object>>(); |
2080 o.add(buildUnnamed1831()); | 2139 o.add(buildUnnamed1829()); |
2081 o.add(buildUnnamed1831()); | 2140 o.add(buildUnnamed1829()); |
2082 return o; | 2141 return o; |
2083 } | 2142 } |
2084 | 2143 |
2085 checkUnnamed1832(core.List<core.Map<core.String, core.Object>> o) { | 2144 checkUnnamed1830(core.List<core.Map<core.String, core.Object>> o) { |
2086 unittest.expect(o, unittest.hasLength(2)); | 2145 unittest.expect(o, unittest.hasLength(2)); |
2087 checkUnnamed1831(o[0]); | 2146 checkUnnamed1829(o[0]); |
2088 checkUnnamed1831(o[1]); | 2147 checkUnnamed1829(o[1]); |
2089 } | 2148 } |
2090 | 2149 |
2091 core.int buildCounterSourceInfo = 0; | 2150 core.int buildCounterSourceInfo = 0; |
2092 buildSourceInfo() { | 2151 buildSourceInfo() { |
2093 var o = new api.SourceInfo(); | 2152 var o = new api.SourceInfo(); |
2094 buildCounterSourceInfo++; | 2153 buildCounterSourceInfo++; |
2095 if (buildCounterSourceInfo < 3) { | 2154 if (buildCounterSourceInfo < 3) { |
2096 o.sourceFiles = buildUnnamed1832(); | 2155 o.sourceFiles = buildUnnamed1830(); |
2097 } | 2156 } |
2098 buildCounterSourceInfo--; | 2157 buildCounterSourceInfo--; |
2099 return o; | 2158 return o; |
2100 } | 2159 } |
2101 | 2160 |
2102 checkSourceInfo(api.SourceInfo o) { | 2161 checkSourceInfo(api.SourceInfo o) { |
2103 buildCounterSourceInfo++; | 2162 buildCounterSourceInfo++; |
2104 if (buildCounterSourceInfo < 3) { | 2163 if (buildCounterSourceInfo < 3) { |
2105 checkUnnamed1832(o.sourceFiles); | 2164 checkUnnamed1830(o.sourceFiles); |
2106 } | 2165 } |
2107 buildCounterSourceInfo--; | 2166 buildCounterSourceInfo--; |
2108 } | 2167 } |
2109 | 2168 |
2110 buildUnnamed1833() { | 2169 buildUnnamed1831() { |
2111 var o = new core.Map<core.String, core.Object>(); | 2170 var o = new core.Map<core.String, core.Object>(); |
2112 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 2171 o["x"] = { |
2113 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; | 2172 'list': [1, 2, 3], |
| 2173 'bool': true, |
| 2174 'string': 'foo' |
| 2175 }; |
| 2176 o["y"] = { |
| 2177 'list': [1, 2, 3], |
| 2178 'bool': true, |
| 2179 'string': 'foo' |
| 2180 }; |
2114 return o; | 2181 return o; |
2115 } | 2182 } |
2116 | 2183 |
2117 checkUnnamed1833(core.Map<core.String, core.Object> o) { | 2184 checkUnnamed1831(core.Map<core.String, core.Object> o) { |
2118 unittest.expect(o, unittest.hasLength(2)); | 2185 unittest.expect(o, unittest.hasLength(2)); |
2119 var casted9 = (o["x"]) as core.Map; unittest.expect(casted9, unittest.hasLengt
h(3)); unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); unittest.ex
pect(casted9["bool"], unittest.equals(true)); unittest.expect(casted9["string"],
unittest.equals('foo')); | 2186 var casted9 = (o["x"]) as core.Map; |
2120 var casted10 = (o["y"]) as core.Map; unittest.expect(casted10, unittest.hasLen
gth(3)); unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); unittest
.expect(casted10["bool"], unittest.equals(true)); unittest.expect(casted10["stri
ng"], unittest.equals('foo')); | 2187 unittest.expect(casted9, unittest.hasLength(3)); |
| 2188 unittest.expect(casted9["list"], unittest.equals([1, 2, 3])); |
| 2189 unittest.expect(casted9["bool"], unittest.equals(true)); |
| 2190 unittest.expect(casted9["string"], unittest.equals('foo')); |
| 2191 var casted10 = (o["y"]) as core.Map; |
| 2192 unittest.expect(casted10, unittest.hasLength(3)); |
| 2193 unittest.expect(casted10["list"], unittest.equals([1, 2, 3])); |
| 2194 unittest.expect(casted10["bool"], unittest.equals(true)); |
| 2195 unittest.expect(casted10["string"], unittest.equals('foo')); |
2121 } | 2196 } |
2122 | 2197 |
2123 buildUnnamed1834() { | 2198 buildUnnamed1832() { |
2124 var o = new core.List<core.Map<core.String, core.Object>>(); | 2199 var o = new core.List<core.Map<core.String, core.Object>>(); |
2125 o.add(buildUnnamed1833()); | 2200 o.add(buildUnnamed1831()); |
2126 o.add(buildUnnamed1833()); | 2201 o.add(buildUnnamed1831()); |
2127 return o; | 2202 return o; |
2128 } | 2203 } |
2129 | 2204 |
2130 checkUnnamed1834(core.List<core.Map<core.String, core.Object>> o) { | 2205 checkUnnamed1832(core.List<core.Map<core.String, core.Object>> o) { |
2131 unittest.expect(o, unittest.hasLength(2)); | 2206 unittest.expect(o, unittest.hasLength(2)); |
2132 checkUnnamed1833(o[0]); | 2207 checkUnnamed1831(o[0]); |
2133 checkUnnamed1833(o[1]); | 2208 checkUnnamed1831(o[1]); |
2134 } | 2209 } |
2135 | 2210 |
2136 core.int buildCounterStatus = 0; | 2211 core.int buildCounterStatus = 0; |
2137 buildStatus() { | 2212 buildStatus() { |
2138 var o = new api.Status(); | 2213 var o = new api.Status(); |
2139 buildCounterStatus++; | 2214 buildCounterStatus++; |
2140 if (buildCounterStatus < 3) { | 2215 if (buildCounterStatus < 3) { |
2141 o.code = 42; | 2216 o.code = 42; |
2142 o.details = buildUnnamed1834(); | 2217 o.details = buildUnnamed1832(); |
2143 o.message = "foo"; | 2218 o.message = "foo"; |
2144 } | 2219 } |
2145 buildCounterStatus--; | 2220 buildCounterStatus--; |
2146 return o; | 2221 return o; |
2147 } | 2222 } |
2148 | 2223 |
2149 checkStatus(api.Status o) { | 2224 checkStatus(api.Status o) { |
2150 buildCounterStatus++; | 2225 buildCounterStatus++; |
2151 if (buildCounterStatus < 3) { | 2226 if (buildCounterStatus < 3) { |
2152 unittest.expect(o.code, unittest.equals(42)); | 2227 unittest.expect(o.code, unittest.equals(42)); |
2153 checkUnnamed1834(o.details); | 2228 checkUnnamed1832(o.details); |
2154 unittest.expect(o.message, unittest.equals('foo')); | 2229 unittest.expect(o.message, unittest.equals('foo')); |
2155 } | 2230 } |
2156 buildCounterStatus--; | 2231 buildCounterStatus--; |
2157 } | 2232 } |
2158 | 2233 |
2159 core.int buildCounterStep = 0; | 2234 core.int buildCounterStep = 0; |
2160 buildStep() { | 2235 buildStep() { |
2161 var o = new api.Step(); | 2236 var o = new api.Step(); |
2162 buildCounterStep++; | 2237 buildCounterStep++; |
2163 if (buildCounterStep < 3) { | 2238 if (buildCounterStep < 3) { |
(...skipping 29 matching lines...) Expand all Loading... |
2193 checkSystemParameter(api.SystemParameter o) { | 2268 checkSystemParameter(api.SystemParameter o) { |
2194 buildCounterSystemParameter++; | 2269 buildCounterSystemParameter++; |
2195 if (buildCounterSystemParameter < 3) { | 2270 if (buildCounterSystemParameter < 3) { |
2196 unittest.expect(o.httpHeader, unittest.equals('foo')); | 2271 unittest.expect(o.httpHeader, unittest.equals('foo')); |
2197 unittest.expect(o.name, unittest.equals('foo')); | 2272 unittest.expect(o.name, unittest.equals('foo')); |
2198 unittest.expect(o.urlQueryParameter, unittest.equals('foo')); | 2273 unittest.expect(o.urlQueryParameter, unittest.equals('foo')); |
2199 } | 2274 } |
2200 buildCounterSystemParameter--; | 2275 buildCounterSystemParameter--; |
2201 } | 2276 } |
2202 | 2277 |
2203 buildUnnamed1835() { | 2278 buildUnnamed1833() { |
2204 var o = new core.List<api.SystemParameter>(); | 2279 var o = new core.List<api.SystemParameter>(); |
2205 o.add(buildSystemParameter()); | 2280 o.add(buildSystemParameter()); |
2206 o.add(buildSystemParameter()); | 2281 o.add(buildSystemParameter()); |
2207 return o; | 2282 return o; |
2208 } | 2283 } |
2209 | 2284 |
2210 checkUnnamed1835(core.List<api.SystemParameter> o) { | 2285 checkUnnamed1833(core.List<api.SystemParameter> o) { |
2211 unittest.expect(o, unittest.hasLength(2)); | 2286 unittest.expect(o, unittest.hasLength(2)); |
2212 checkSystemParameter(o[0]); | 2287 checkSystemParameter(o[0]); |
2213 checkSystemParameter(o[1]); | 2288 checkSystemParameter(o[1]); |
2214 } | 2289 } |
2215 | 2290 |
2216 core.int buildCounterSystemParameterRule = 0; | 2291 core.int buildCounterSystemParameterRule = 0; |
2217 buildSystemParameterRule() { | 2292 buildSystemParameterRule() { |
2218 var o = new api.SystemParameterRule(); | 2293 var o = new api.SystemParameterRule(); |
2219 buildCounterSystemParameterRule++; | 2294 buildCounterSystemParameterRule++; |
2220 if (buildCounterSystemParameterRule < 3) { | 2295 if (buildCounterSystemParameterRule < 3) { |
2221 o.parameters = buildUnnamed1835(); | 2296 o.parameters = buildUnnamed1833(); |
2222 o.selector = "foo"; | 2297 o.selector = "foo"; |
2223 } | 2298 } |
2224 buildCounterSystemParameterRule--; | 2299 buildCounterSystemParameterRule--; |
2225 return o; | 2300 return o; |
2226 } | 2301 } |
2227 | 2302 |
2228 checkSystemParameterRule(api.SystemParameterRule o) { | 2303 checkSystemParameterRule(api.SystemParameterRule o) { |
2229 buildCounterSystemParameterRule++; | 2304 buildCounterSystemParameterRule++; |
2230 if (buildCounterSystemParameterRule < 3) { | 2305 if (buildCounterSystemParameterRule < 3) { |
2231 checkUnnamed1835(o.parameters); | 2306 checkUnnamed1833(o.parameters); |
2232 unittest.expect(o.selector, unittest.equals('foo')); | 2307 unittest.expect(o.selector, unittest.equals('foo')); |
2233 } | 2308 } |
2234 buildCounterSystemParameterRule--; | 2309 buildCounterSystemParameterRule--; |
2235 } | 2310 } |
2236 | 2311 |
2237 buildUnnamed1836() { | 2312 buildUnnamed1834() { |
2238 var o = new core.List<api.SystemParameterRule>(); | 2313 var o = new core.List<api.SystemParameterRule>(); |
2239 o.add(buildSystemParameterRule()); | 2314 o.add(buildSystemParameterRule()); |
2240 o.add(buildSystemParameterRule()); | 2315 o.add(buildSystemParameterRule()); |
2241 return o; | 2316 return o; |
2242 } | 2317 } |
2243 | 2318 |
2244 checkUnnamed1836(core.List<api.SystemParameterRule> o) { | 2319 checkUnnamed1834(core.List<api.SystemParameterRule> o) { |
2245 unittest.expect(o, unittest.hasLength(2)); | 2320 unittest.expect(o, unittest.hasLength(2)); |
2246 checkSystemParameterRule(o[0]); | 2321 checkSystemParameterRule(o[0]); |
2247 checkSystemParameterRule(o[1]); | 2322 checkSystemParameterRule(o[1]); |
2248 } | 2323 } |
2249 | 2324 |
2250 core.int buildCounterSystemParameters = 0; | 2325 core.int buildCounterSystemParameters = 0; |
2251 buildSystemParameters() { | 2326 buildSystemParameters() { |
2252 var o = new api.SystemParameters(); | 2327 var o = new api.SystemParameters(); |
2253 buildCounterSystemParameters++; | 2328 buildCounterSystemParameters++; |
2254 if (buildCounterSystemParameters < 3) { | 2329 if (buildCounterSystemParameters < 3) { |
2255 o.rules = buildUnnamed1836(); | 2330 o.rules = buildUnnamed1834(); |
2256 } | 2331 } |
2257 buildCounterSystemParameters--; | 2332 buildCounterSystemParameters--; |
2258 return o; | 2333 return o; |
2259 } | 2334 } |
2260 | 2335 |
2261 checkSystemParameters(api.SystemParameters o) { | 2336 checkSystemParameters(api.SystemParameters o) { |
2262 buildCounterSystemParameters++; | 2337 buildCounterSystemParameters++; |
2263 if (buildCounterSystemParameters < 3) { | 2338 if (buildCounterSystemParameters < 3) { |
2264 checkUnnamed1836(o.rules); | 2339 checkUnnamed1834(o.rules); |
2265 } | 2340 } |
2266 buildCounterSystemParameters--; | 2341 buildCounterSystemParameters--; |
2267 } | 2342 } |
2268 | 2343 |
2269 buildUnnamed1837() { | 2344 buildUnnamed1835() { |
2270 var o = new core.List<api.Field>(); | 2345 var o = new core.List<api.Field>(); |
2271 o.add(buildField()); | 2346 o.add(buildField()); |
2272 o.add(buildField()); | 2347 o.add(buildField()); |
2273 return o; | 2348 return o; |
2274 } | 2349 } |
2275 | 2350 |
2276 checkUnnamed1837(core.List<api.Field> o) { | 2351 checkUnnamed1835(core.List<api.Field> o) { |
2277 unittest.expect(o, unittest.hasLength(2)); | 2352 unittest.expect(o, unittest.hasLength(2)); |
2278 checkField(o[0]); | 2353 checkField(o[0]); |
2279 checkField(o[1]); | 2354 checkField(o[1]); |
2280 } | 2355 } |
2281 | 2356 |
2282 buildUnnamed1838() { | 2357 buildUnnamed1836() { |
2283 var o = new core.List<core.String>(); | 2358 var o = new core.List<core.String>(); |
2284 o.add("foo"); | 2359 o.add("foo"); |
2285 o.add("foo"); | 2360 o.add("foo"); |
2286 return o; | 2361 return o; |
2287 } | 2362 } |
2288 | 2363 |
2289 checkUnnamed1838(core.List<core.String> o) { | 2364 checkUnnamed1836(core.List<core.String> o) { |
2290 unittest.expect(o, unittest.hasLength(2)); | 2365 unittest.expect(o, unittest.hasLength(2)); |
2291 unittest.expect(o[0], unittest.equals('foo')); | 2366 unittest.expect(o[0], unittest.equals('foo')); |
2292 unittest.expect(o[1], unittest.equals('foo')); | 2367 unittest.expect(o[1], unittest.equals('foo')); |
2293 } | 2368 } |
2294 | 2369 |
2295 buildUnnamed1839() { | 2370 buildUnnamed1837() { |
2296 var o = new core.List<api.Option>(); | 2371 var o = new core.List<api.Option>(); |
2297 o.add(buildOption()); | 2372 o.add(buildOption()); |
2298 o.add(buildOption()); | 2373 o.add(buildOption()); |
2299 return o; | 2374 return o; |
2300 } | 2375 } |
2301 | 2376 |
2302 checkUnnamed1839(core.List<api.Option> o) { | 2377 checkUnnamed1837(core.List<api.Option> o) { |
2303 unittest.expect(o, unittest.hasLength(2)); | 2378 unittest.expect(o, unittest.hasLength(2)); |
2304 checkOption(o[0]); | 2379 checkOption(o[0]); |
2305 checkOption(o[1]); | 2380 checkOption(o[1]); |
2306 } | 2381 } |
2307 | 2382 |
2308 core.int buildCounterType = 0; | 2383 core.int buildCounterType = 0; |
2309 buildType() { | 2384 buildType() { |
2310 var o = new api.Type(); | 2385 var o = new api.Type(); |
2311 buildCounterType++; | 2386 buildCounterType++; |
2312 if (buildCounterType < 3) { | 2387 if (buildCounterType < 3) { |
2313 o.fields = buildUnnamed1837(); | 2388 o.fields = buildUnnamed1835(); |
2314 o.name = "foo"; | 2389 o.name = "foo"; |
2315 o.oneofs = buildUnnamed1838(); | 2390 o.oneofs = buildUnnamed1836(); |
2316 o.options = buildUnnamed1839(); | 2391 o.options = buildUnnamed1837(); |
2317 o.sourceContext = buildSourceContext(); | 2392 o.sourceContext = buildSourceContext(); |
2318 o.syntax = "foo"; | 2393 o.syntax = "foo"; |
2319 } | 2394 } |
2320 buildCounterType--; | 2395 buildCounterType--; |
2321 return o; | 2396 return o; |
2322 } | 2397 } |
2323 | 2398 |
2324 checkType(api.Type o) { | 2399 checkType(api.Type o) { |
2325 buildCounterType++; | 2400 buildCounterType++; |
2326 if (buildCounterType < 3) { | 2401 if (buildCounterType < 3) { |
2327 checkUnnamed1837(o.fields); | 2402 checkUnnamed1835(o.fields); |
2328 unittest.expect(o.name, unittest.equals('foo')); | 2403 unittest.expect(o.name, unittest.equals('foo')); |
2329 checkUnnamed1838(o.oneofs); | 2404 checkUnnamed1836(o.oneofs); |
2330 checkUnnamed1839(o.options); | 2405 checkUnnamed1837(o.options); |
2331 checkSourceContext(o.sourceContext); | 2406 checkSourceContext(o.sourceContext); |
2332 unittest.expect(o.syntax, unittest.equals('foo')); | 2407 unittest.expect(o.syntax, unittest.equals('foo')); |
2333 } | 2408 } |
2334 buildCounterType--; | 2409 buildCounterType--; |
2335 } | 2410 } |
2336 | 2411 |
2337 buildUnnamed1840() { | 2412 buildUnnamed1838() { |
2338 var o = new core.List<core.String>(); | 2413 var o = new core.List<core.String>(); |
2339 o.add("foo"); | 2414 o.add("foo"); |
2340 o.add("foo"); | 2415 o.add("foo"); |
2341 return o; | 2416 return o; |
2342 } | 2417 } |
2343 | 2418 |
2344 checkUnnamed1840(core.List<core.String> o) { | 2419 checkUnnamed1838(core.List<core.String> o) { |
2345 unittest.expect(o, unittest.hasLength(2)); | 2420 unittest.expect(o, unittest.hasLength(2)); |
2346 unittest.expect(o[0], unittest.equals('foo')); | 2421 unittest.expect(o[0], unittest.equals('foo')); |
2347 unittest.expect(o[1], unittest.equals('foo')); | 2422 unittest.expect(o[1], unittest.equals('foo')); |
2348 } | 2423 } |
2349 | 2424 |
2350 buildUnnamed1841() { | 2425 buildUnnamed1839() { |
2351 var o = new core.List<api.UsageRule>(); | 2426 var o = new core.List<api.UsageRule>(); |
2352 o.add(buildUsageRule()); | 2427 o.add(buildUsageRule()); |
2353 o.add(buildUsageRule()); | 2428 o.add(buildUsageRule()); |
2354 return o; | 2429 return o; |
2355 } | 2430 } |
2356 | 2431 |
2357 checkUnnamed1841(core.List<api.UsageRule> o) { | 2432 checkUnnamed1839(core.List<api.UsageRule> o) { |
2358 unittest.expect(o, unittest.hasLength(2)); | 2433 unittest.expect(o, unittest.hasLength(2)); |
2359 checkUsageRule(o[0]); | 2434 checkUsageRule(o[0]); |
2360 checkUsageRule(o[1]); | 2435 checkUsageRule(o[1]); |
2361 } | 2436 } |
2362 | 2437 |
2363 core.int buildCounterUsage = 0; | 2438 core.int buildCounterUsage = 0; |
2364 buildUsage() { | 2439 buildUsage() { |
2365 var o = new api.Usage(); | 2440 var o = new api.Usage(); |
2366 buildCounterUsage++; | 2441 buildCounterUsage++; |
2367 if (buildCounterUsage < 3) { | 2442 if (buildCounterUsage < 3) { |
2368 o.producerNotificationChannel = "foo"; | 2443 o.producerNotificationChannel = "foo"; |
2369 o.requirements = buildUnnamed1840(); | 2444 o.requirements = buildUnnamed1838(); |
2370 o.rules = buildUnnamed1841(); | 2445 o.rules = buildUnnamed1839(); |
2371 } | 2446 } |
2372 buildCounterUsage--; | 2447 buildCounterUsage--; |
2373 return o; | 2448 return o; |
2374 } | 2449 } |
2375 | 2450 |
2376 checkUsage(api.Usage o) { | 2451 checkUsage(api.Usage o) { |
2377 buildCounterUsage++; | 2452 buildCounterUsage++; |
2378 if (buildCounterUsage < 3) { | 2453 if (buildCounterUsage < 3) { |
2379 unittest.expect(o.producerNotificationChannel, unittest.equals('foo')); | 2454 unittest.expect(o.producerNotificationChannel, unittest.equals('foo')); |
2380 checkUnnamed1840(o.requirements); | 2455 checkUnnamed1838(o.requirements); |
2381 checkUnnamed1841(o.rules); | 2456 checkUnnamed1839(o.rules); |
2382 } | 2457 } |
2383 buildCounterUsage--; | 2458 buildCounterUsage--; |
2384 } | 2459 } |
2385 | 2460 |
2386 core.int buildCounterUsageRule = 0; | 2461 core.int buildCounterUsageRule = 0; |
2387 buildUsageRule() { | 2462 buildUsageRule() { |
2388 var o = new api.UsageRule(); | 2463 var o = new api.UsageRule(); |
2389 buildCounterUsageRule++; | 2464 buildCounterUsageRule++; |
2390 if (buildCounterUsageRule < 3) { | 2465 if (buildCounterUsageRule < 3) { |
2391 o.allowUnregisteredCalls = true; | 2466 o.allowUnregisteredCalls = true; |
2392 o.selector = "foo"; | 2467 o.selector = "foo"; |
2393 o.skipServiceControl = true; | 2468 o.skipServiceControl = true; |
2394 } | 2469 } |
2395 buildCounterUsageRule--; | 2470 buildCounterUsageRule--; |
2396 return o; | 2471 return o; |
2397 } | 2472 } |
2398 | 2473 |
2399 checkUsageRule(api.UsageRule o) { | 2474 checkUsageRule(api.UsageRule o) { |
2400 buildCounterUsageRule++; | 2475 buildCounterUsageRule++; |
2401 if (buildCounterUsageRule < 3) { | 2476 if (buildCounterUsageRule < 3) { |
2402 unittest.expect(o.allowUnregisteredCalls, unittest.isTrue); | 2477 unittest.expect(o.allowUnregisteredCalls, unittest.isTrue); |
2403 unittest.expect(o.selector, unittest.equals('foo')); | 2478 unittest.expect(o.selector, unittest.equals('foo')); |
2404 unittest.expect(o.skipServiceControl, unittest.isTrue); | 2479 unittest.expect(o.skipServiceControl, unittest.isTrue); |
2405 } | 2480 } |
2406 buildCounterUsageRule--; | 2481 buildCounterUsageRule--; |
2407 } | 2482 } |
2408 | 2483 |
2409 buildUnnamed1842() { | 2484 buildUnnamed1840() { |
2410 var o = new core.List<api.VisibilityRule>(); | 2485 var o = new core.List<api.VisibilityRule>(); |
2411 o.add(buildVisibilityRule()); | 2486 o.add(buildVisibilityRule()); |
2412 o.add(buildVisibilityRule()); | 2487 o.add(buildVisibilityRule()); |
2413 return o; | 2488 return o; |
2414 } | 2489 } |
2415 | 2490 |
2416 checkUnnamed1842(core.List<api.VisibilityRule> o) { | 2491 checkUnnamed1840(core.List<api.VisibilityRule> o) { |
2417 unittest.expect(o, unittest.hasLength(2)); | 2492 unittest.expect(o, unittest.hasLength(2)); |
2418 checkVisibilityRule(o[0]); | 2493 checkVisibilityRule(o[0]); |
2419 checkVisibilityRule(o[1]); | 2494 checkVisibilityRule(o[1]); |
2420 } | 2495 } |
2421 | 2496 |
2422 core.int buildCounterVisibility = 0; | 2497 core.int buildCounterVisibility = 0; |
2423 buildVisibility() { | 2498 buildVisibility() { |
2424 var o = new api.Visibility(); | 2499 var o = new api.Visibility(); |
2425 buildCounterVisibility++; | 2500 buildCounterVisibility++; |
2426 if (buildCounterVisibility < 3) { | 2501 if (buildCounterVisibility < 3) { |
2427 o.rules = buildUnnamed1842(); | 2502 o.rules = buildUnnamed1840(); |
2428 } | 2503 } |
2429 buildCounterVisibility--; | 2504 buildCounterVisibility--; |
2430 return o; | 2505 return o; |
2431 } | 2506 } |
2432 | 2507 |
2433 checkVisibility(api.Visibility o) { | 2508 checkVisibility(api.Visibility o) { |
2434 buildCounterVisibility++; | 2509 buildCounterVisibility++; |
2435 if (buildCounterVisibility < 3) { | 2510 if (buildCounterVisibility < 3) { |
2436 checkUnnamed1842(o.rules); | 2511 checkUnnamed1840(o.rules); |
2437 } | 2512 } |
2438 buildCounterVisibility--; | 2513 buildCounterVisibility--; |
2439 } | 2514 } |
2440 | 2515 |
2441 core.int buildCounterVisibilityRule = 0; | 2516 core.int buildCounterVisibilityRule = 0; |
2442 buildVisibilityRule() { | 2517 buildVisibilityRule() { |
2443 var o = new api.VisibilityRule(); | 2518 var o = new api.VisibilityRule(); |
2444 buildCounterVisibilityRule++; | 2519 buildCounterVisibilityRule++; |
2445 if (buildCounterVisibilityRule < 3) { | 2520 if (buildCounterVisibilityRule < 3) { |
2446 o.restriction = "foo"; | 2521 o.restriction = "foo"; |
2447 o.selector = "foo"; | 2522 o.selector = "foo"; |
2448 } | 2523 } |
2449 buildCounterVisibilityRule--; | 2524 buildCounterVisibilityRule--; |
2450 return o; | 2525 return o; |
2451 } | 2526 } |
2452 | 2527 |
2453 checkVisibilityRule(api.VisibilityRule o) { | 2528 checkVisibilityRule(api.VisibilityRule o) { |
2454 buildCounterVisibilityRule++; | 2529 buildCounterVisibilityRule++; |
2455 if (buildCounterVisibilityRule < 3) { | 2530 if (buildCounterVisibilityRule < 3) { |
2456 unittest.expect(o.restriction, unittest.equals('foo')); | 2531 unittest.expect(o.restriction, unittest.equals('foo')); |
2457 unittest.expect(o.selector, unittest.equals('foo')); | 2532 unittest.expect(o.selector, unittest.equals('foo')); |
2458 } | 2533 } |
2459 buildCounterVisibilityRule--; | 2534 buildCounterVisibilityRule--; |
2460 } | 2535 } |
2461 | 2536 |
2462 | |
2463 main() { | 2537 main() { |
2464 unittest.group("obj-schema-Api", () { | 2538 unittest.group("obj-schema-Api", () { |
2465 unittest.test("to-json--from-json", () { | 2539 unittest.test("to-json--from-json", () { |
2466 var o = buildApi(); | 2540 var o = buildApi(); |
2467 var od = new api.Api.fromJson(o.toJson()); | 2541 var od = new api.Api.fromJson(o.toJson()); |
2468 checkApi(od); | 2542 checkApi(od); |
2469 }); | 2543 }); |
2470 }); | 2544 }); |
2471 | 2545 |
2472 | |
2473 unittest.group("obj-schema-AuthProvider", () { | 2546 unittest.group("obj-schema-AuthProvider", () { |
2474 unittest.test("to-json--from-json", () { | 2547 unittest.test("to-json--from-json", () { |
2475 var o = buildAuthProvider(); | 2548 var o = buildAuthProvider(); |
2476 var od = new api.AuthProvider.fromJson(o.toJson()); | 2549 var od = new api.AuthProvider.fromJson(o.toJson()); |
2477 checkAuthProvider(od); | 2550 checkAuthProvider(od); |
2478 }); | 2551 }); |
2479 }); | 2552 }); |
2480 | 2553 |
2481 | |
2482 unittest.group("obj-schema-AuthRequirement", () { | 2554 unittest.group("obj-schema-AuthRequirement", () { |
2483 unittest.test("to-json--from-json", () { | 2555 unittest.test("to-json--from-json", () { |
2484 var o = buildAuthRequirement(); | 2556 var o = buildAuthRequirement(); |
2485 var od = new api.AuthRequirement.fromJson(o.toJson()); | 2557 var od = new api.AuthRequirement.fromJson(o.toJson()); |
2486 checkAuthRequirement(od); | 2558 checkAuthRequirement(od); |
2487 }); | 2559 }); |
2488 }); | 2560 }); |
2489 | 2561 |
2490 | |
2491 unittest.group("obj-schema-Authentication", () { | 2562 unittest.group("obj-schema-Authentication", () { |
2492 unittest.test("to-json--from-json", () { | 2563 unittest.test("to-json--from-json", () { |
2493 var o = buildAuthentication(); | 2564 var o = buildAuthentication(); |
2494 var od = new api.Authentication.fromJson(o.toJson()); | 2565 var od = new api.Authentication.fromJson(o.toJson()); |
2495 checkAuthentication(od); | 2566 checkAuthentication(od); |
2496 }); | 2567 }); |
2497 }); | 2568 }); |
2498 | 2569 |
2499 | |
2500 unittest.group("obj-schema-AuthenticationRule", () { | 2570 unittest.group("obj-schema-AuthenticationRule", () { |
2501 unittest.test("to-json--from-json", () { | 2571 unittest.test("to-json--from-json", () { |
2502 var o = buildAuthenticationRule(); | 2572 var o = buildAuthenticationRule(); |
2503 var od = new api.AuthenticationRule.fromJson(o.toJson()); | 2573 var od = new api.AuthenticationRule.fromJson(o.toJson()); |
2504 checkAuthenticationRule(od); | 2574 checkAuthenticationRule(od); |
2505 }); | 2575 }); |
2506 }); | 2576 }); |
2507 | 2577 |
2508 | |
2509 unittest.group("obj-schema-AuthorizationConfig", () { | 2578 unittest.group("obj-schema-AuthorizationConfig", () { |
2510 unittest.test("to-json--from-json", () { | 2579 unittest.test("to-json--from-json", () { |
2511 var o = buildAuthorizationConfig(); | 2580 var o = buildAuthorizationConfig(); |
2512 var od = new api.AuthorizationConfig.fromJson(o.toJson()); | 2581 var od = new api.AuthorizationConfig.fromJson(o.toJson()); |
2513 checkAuthorizationConfig(od); | 2582 checkAuthorizationConfig(od); |
2514 }); | 2583 }); |
2515 }); | 2584 }); |
2516 | 2585 |
2517 | |
2518 unittest.group("obj-schema-AuthorizationRule", () { | 2586 unittest.group("obj-schema-AuthorizationRule", () { |
2519 unittest.test("to-json--from-json", () { | 2587 unittest.test("to-json--from-json", () { |
2520 var o = buildAuthorizationRule(); | 2588 var o = buildAuthorizationRule(); |
2521 var od = new api.AuthorizationRule.fromJson(o.toJson()); | 2589 var od = new api.AuthorizationRule.fromJson(o.toJson()); |
2522 checkAuthorizationRule(od); | 2590 checkAuthorizationRule(od); |
2523 }); | 2591 }); |
2524 }); | 2592 }); |
2525 | 2593 |
2526 | |
2527 unittest.group("obj-schema-Backend", () { | 2594 unittest.group("obj-schema-Backend", () { |
2528 unittest.test("to-json--from-json", () { | 2595 unittest.test("to-json--from-json", () { |
2529 var o = buildBackend(); | 2596 var o = buildBackend(); |
2530 var od = new api.Backend.fromJson(o.toJson()); | 2597 var od = new api.Backend.fromJson(o.toJson()); |
2531 checkBackend(od); | 2598 checkBackend(od); |
2532 }); | 2599 }); |
2533 }); | 2600 }); |
2534 | 2601 |
2535 | |
2536 unittest.group("obj-schema-BackendRule", () { | 2602 unittest.group("obj-schema-BackendRule", () { |
2537 unittest.test("to-json--from-json", () { | 2603 unittest.test("to-json--from-json", () { |
2538 var o = buildBackendRule(); | 2604 var o = buildBackendRule(); |
2539 var od = new api.BackendRule.fromJson(o.toJson()); | 2605 var od = new api.BackendRule.fromJson(o.toJson()); |
2540 checkBackendRule(od); | 2606 checkBackendRule(od); |
2541 }); | 2607 }); |
2542 }); | 2608 }); |
2543 | 2609 |
2544 | |
2545 unittest.group("obj-schema-Context", () { | 2610 unittest.group("obj-schema-Context", () { |
2546 unittest.test("to-json--from-json", () { | 2611 unittest.test("to-json--from-json", () { |
2547 var o = buildContext(); | 2612 var o = buildContext(); |
2548 var od = new api.Context.fromJson(o.toJson()); | 2613 var od = new api.Context.fromJson(o.toJson()); |
2549 checkContext(od); | 2614 checkContext(od); |
2550 }); | 2615 }); |
2551 }); | 2616 }); |
2552 | 2617 |
2553 | |
2554 unittest.group("obj-schema-ContextRule", () { | 2618 unittest.group("obj-schema-ContextRule", () { |
2555 unittest.test("to-json--from-json", () { | 2619 unittest.test("to-json--from-json", () { |
2556 var o = buildContextRule(); | 2620 var o = buildContextRule(); |
2557 var od = new api.ContextRule.fromJson(o.toJson()); | 2621 var od = new api.ContextRule.fromJson(o.toJson()); |
2558 checkContextRule(od); | 2622 checkContextRule(od); |
2559 }); | 2623 }); |
2560 }); | 2624 }); |
2561 | 2625 |
2562 | |
2563 unittest.group("obj-schema-Control", () { | 2626 unittest.group("obj-schema-Control", () { |
2564 unittest.test("to-json--from-json", () { | 2627 unittest.test("to-json--from-json", () { |
2565 var o = buildControl(); | 2628 var o = buildControl(); |
2566 var od = new api.Control.fromJson(o.toJson()); | 2629 var od = new api.Control.fromJson(o.toJson()); |
2567 checkControl(od); | 2630 checkControl(od); |
2568 }); | 2631 }); |
2569 }); | 2632 }); |
2570 | 2633 |
2571 | |
2572 unittest.group("obj-schema-CustomAuthRequirements", () { | 2634 unittest.group("obj-schema-CustomAuthRequirements", () { |
2573 unittest.test("to-json--from-json", () { | 2635 unittest.test("to-json--from-json", () { |
2574 var o = buildCustomAuthRequirements(); | 2636 var o = buildCustomAuthRequirements(); |
2575 var od = new api.CustomAuthRequirements.fromJson(o.toJson()); | 2637 var od = new api.CustomAuthRequirements.fromJson(o.toJson()); |
2576 checkCustomAuthRequirements(od); | 2638 checkCustomAuthRequirements(od); |
2577 }); | 2639 }); |
2578 }); | 2640 }); |
2579 | 2641 |
2580 | |
2581 unittest.group("obj-schema-CustomError", () { | 2642 unittest.group("obj-schema-CustomError", () { |
2582 unittest.test("to-json--from-json", () { | 2643 unittest.test("to-json--from-json", () { |
2583 var o = buildCustomError(); | 2644 var o = buildCustomError(); |
2584 var od = new api.CustomError.fromJson(o.toJson()); | 2645 var od = new api.CustomError.fromJson(o.toJson()); |
2585 checkCustomError(od); | 2646 checkCustomError(od); |
2586 }); | 2647 }); |
2587 }); | 2648 }); |
2588 | 2649 |
2589 | |
2590 unittest.group("obj-schema-CustomErrorRule", () { | 2650 unittest.group("obj-schema-CustomErrorRule", () { |
2591 unittest.test("to-json--from-json", () { | 2651 unittest.test("to-json--from-json", () { |
2592 var o = buildCustomErrorRule(); | 2652 var o = buildCustomErrorRule(); |
2593 var od = new api.CustomErrorRule.fromJson(o.toJson()); | 2653 var od = new api.CustomErrorRule.fromJson(o.toJson()); |
2594 checkCustomErrorRule(od); | 2654 checkCustomErrorRule(od); |
2595 }); | 2655 }); |
2596 }); | 2656 }); |
2597 | 2657 |
2598 | |
2599 unittest.group("obj-schema-CustomHttpPattern", () { | 2658 unittest.group("obj-schema-CustomHttpPattern", () { |
2600 unittest.test("to-json--from-json", () { | 2659 unittest.test("to-json--from-json", () { |
2601 var o = buildCustomHttpPattern(); | 2660 var o = buildCustomHttpPattern(); |
2602 var od = new api.CustomHttpPattern.fromJson(o.toJson()); | 2661 var od = new api.CustomHttpPattern.fromJson(o.toJson()); |
2603 checkCustomHttpPattern(od); | 2662 checkCustomHttpPattern(od); |
2604 }); | 2663 }); |
2605 }); | 2664 }); |
2606 | 2665 |
2607 | |
2608 unittest.group("obj-schema-DisableServiceRequest", () { | 2666 unittest.group("obj-schema-DisableServiceRequest", () { |
2609 unittest.test("to-json--from-json", () { | 2667 unittest.test("to-json--from-json", () { |
2610 var o = buildDisableServiceRequest(); | 2668 var o = buildDisableServiceRequest(); |
2611 var od = new api.DisableServiceRequest.fromJson(o.toJson()); | 2669 var od = new api.DisableServiceRequest.fromJson(o.toJson()); |
2612 checkDisableServiceRequest(od); | 2670 checkDisableServiceRequest(od); |
2613 }); | 2671 }); |
2614 }); | 2672 }); |
2615 | 2673 |
2616 | |
2617 unittest.group("obj-schema-Documentation", () { | 2674 unittest.group("obj-schema-Documentation", () { |
2618 unittest.test("to-json--from-json", () { | 2675 unittest.test("to-json--from-json", () { |
2619 var o = buildDocumentation(); | 2676 var o = buildDocumentation(); |
2620 var od = new api.Documentation.fromJson(o.toJson()); | 2677 var od = new api.Documentation.fromJson(o.toJson()); |
2621 checkDocumentation(od); | 2678 checkDocumentation(od); |
2622 }); | 2679 }); |
2623 }); | 2680 }); |
2624 | 2681 |
2625 | |
2626 unittest.group("obj-schema-DocumentationRule", () { | 2682 unittest.group("obj-schema-DocumentationRule", () { |
2627 unittest.test("to-json--from-json", () { | 2683 unittest.test("to-json--from-json", () { |
2628 var o = buildDocumentationRule(); | 2684 var o = buildDocumentationRule(); |
2629 var od = new api.DocumentationRule.fromJson(o.toJson()); | 2685 var od = new api.DocumentationRule.fromJson(o.toJson()); |
2630 checkDocumentationRule(od); | 2686 checkDocumentationRule(od); |
2631 }); | 2687 }); |
2632 }); | 2688 }); |
2633 | 2689 |
2634 | |
2635 unittest.group("obj-schema-EnableServiceRequest", () { | 2690 unittest.group("obj-schema-EnableServiceRequest", () { |
2636 unittest.test("to-json--from-json", () { | 2691 unittest.test("to-json--from-json", () { |
2637 var o = buildEnableServiceRequest(); | 2692 var o = buildEnableServiceRequest(); |
2638 var od = new api.EnableServiceRequest.fromJson(o.toJson()); | 2693 var od = new api.EnableServiceRequest.fromJson(o.toJson()); |
2639 checkEnableServiceRequest(od); | 2694 checkEnableServiceRequest(od); |
2640 }); | 2695 }); |
2641 }); | 2696 }); |
2642 | 2697 |
2643 | |
2644 unittest.group("obj-schema-Endpoint", () { | 2698 unittest.group("obj-schema-Endpoint", () { |
2645 unittest.test("to-json--from-json", () { | 2699 unittest.test("to-json--from-json", () { |
2646 var o = buildEndpoint(); | 2700 var o = buildEndpoint(); |
2647 var od = new api.Endpoint.fromJson(o.toJson()); | 2701 var od = new api.Endpoint.fromJson(o.toJson()); |
2648 checkEndpoint(od); | 2702 checkEndpoint(od); |
2649 }); | 2703 }); |
2650 }); | 2704 }); |
2651 | 2705 |
2652 | |
2653 unittest.group("obj-schema-Enum", () { | 2706 unittest.group("obj-schema-Enum", () { |
2654 unittest.test("to-json--from-json", () { | 2707 unittest.test("to-json--from-json", () { |
2655 var o = buildEnum(); | 2708 var o = buildEnum(); |
2656 var od = new api.Enum.fromJson(o.toJson()); | 2709 var od = new api.Enum.fromJson(o.toJson()); |
2657 checkEnum(od); | 2710 checkEnum(od); |
2658 }); | 2711 }); |
2659 }); | 2712 }); |
2660 | 2713 |
2661 | |
2662 unittest.group("obj-schema-EnumValue", () { | 2714 unittest.group("obj-schema-EnumValue", () { |
2663 unittest.test("to-json--from-json", () { | 2715 unittest.test("to-json--from-json", () { |
2664 var o = buildEnumValue(); | 2716 var o = buildEnumValue(); |
2665 var od = new api.EnumValue.fromJson(o.toJson()); | 2717 var od = new api.EnumValue.fromJson(o.toJson()); |
2666 checkEnumValue(od); | 2718 checkEnumValue(od); |
2667 }); | 2719 }); |
2668 }); | 2720 }); |
2669 | 2721 |
2670 | |
2671 unittest.group("obj-schema-Experimental", () { | 2722 unittest.group("obj-schema-Experimental", () { |
2672 unittest.test("to-json--from-json", () { | 2723 unittest.test("to-json--from-json", () { |
2673 var o = buildExperimental(); | 2724 var o = buildExperimental(); |
2674 var od = new api.Experimental.fromJson(o.toJson()); | 2725 var od = new api.Experimental.fromJson(o.toJson()); |
2675 checkExperimental(od); | 2726 checkExperimental(od); |
2676 }); | 2727 }); |
2677 }); | 2728 }); |
2678 | 2729 |
2679 | |
2680 unittest.group("obj-schema-Field", () { | 2730 unittest.group("obj-schema-Field", () { |
2681 unittest.test("to-json--from-json", () { | 2731 unittest.test("to-json--from-json", () { |
2682 var o = buildField(); | 2732 var o = buildField(); |
2683 var od = new api.Field.fromJson(o.toJson()); | 2733 var od = new api.Field.fromJson(o.toJson()); |
2684 checkField(od); | 2734 checkField(od); |
2685 }); | 2735 }); |
2686 }); | 2736 }); |
2687 | 2737 |
2688 | |
2689 unittest.group("obj-schema-Http", () { | 2738 unittest.group("obj-schema-Http", () { |
2690 unittest.test("to-json--from-json", () { | 2739 unittest.test("to-json--from-json", () { |
2691 var o = buildHttp(); | 2740 var o = buildHttp(); |
2692 var od = new api.Http.fromJson(o.toJson()); | 2741 var od = new api.Http.fromJson(o.toJson()); |
2693 checkHttp(od); | 2742 checkHttp(od); |
2694 }); | 2743 }); |
2695 }); | 2744 }); |
2696 | 2745 |
2697 | |
2698 unittest.group("obj-schema-HttpRule", () { | 2746 unittest.group("obj-schema-HttpRule", () { |
2699 unittest.test("to-json--from-json", () { | 2747 unittest.test("to-json--from-json", () { |
2700 var o = buildHttpRule(); | 2748 var o = buildHttpRule(); |
2701 var od = new api.HttpRule.fromJson(o.toJson()); | 2749 var od = new api.HttpRule.fromJson(o.toJson()); |
2702 checkHttpRule(od); | 2750 checkHttpRule(od); |
2703 }); | 2751 }); |
2704 }); | 2752 }); |
2705 | 2753 |
2706 | |
2707 unittest.group("obj-schema-LabelDescriptor", () { | 2754 unittest.group("obj-schema-LabelDescriptor", () { |
2708 unittest.test("to-json--from-json", () { | 2755 unittest.test("to-json--from-json", () { |
2709 var o = buildLabelDescriptor(); | 2756 var o = buildLabelDescriptor(); |
2710 var od = new api.LabelDescriptor.fromJson(o.toJson()); | 2757 var od = new api.LabelDescriptor.fromJson(o.toJson()); |
2711 checkLabelDescriptor(od); | 2758 checkLabelDescriptor(od); |
2712 }); | 2759 }); |
2713 }); | 2760 }); |
2714 | 2761 |
2715 | |
2716 unittest.group("obj-schema-ListEnabledServicesResponse", () { | 2762 unittest.group("obj-schema-ListEnabledServicesResponse", () { |
2717 unittest.test("to-json--from-json", () { | 2763 unittest.test("to-json--from-json", () { |
2718 var o = buildListEnabledServicesResponse(); | 2764 var o = buildListEnabledServicesResponse(); |
2719 var od = new api.ListEnabledServicesResponse.fromJson(o.toJson()); | 2765 var od = new api.ListEnabledServicesResponse.fromJson(o.toJson()); |
2720 checkListEnabledServicesResponse(od); | 2766 checkListEnabledServicesResponse(od); |
2721 }); | 2767 }); |
2722 }); | 2768 }); |
2723 | 2769 |
2724 | |
2725 unittest.group("obj-schema-LogDescriptor", () { | 2770 unittest.group("obj-schema-LogDescriptor", () { |
2726 unittest.test("to-json--from-json", () { | 2771 unittest.test("to-json--from-json", () { |
2727 var o = buildLogDescriptor(); | 2772 var o = buildLogDescriptor(); |
2728 var od = new api.LogDescriptor.fromJson(o.toJson()); | 2773 var od = new api.LogDescriptor.fromJson(o.toJson()); |
2729 checkLogDescriptor(od); | 2774 checkLogDescriptor(od); |
2730 }); | 2775 }); |
2731 }); | 2776 }); |
2732 | 2777 |
2733 | |
2734 unittest.group("obj-schema-Logging", () { | 2778 unittest.group("obj-schema-Logging", () { |
2735 unittest.test("to-json--from-json", () { | 2779 unittest.test("to-json--from-json", () { |
2736 var o = buildLogging(); | 2780 var o = buildLogging(); |
2737 var od = new api.Logging.fromJson(o.toJson()); | 2781 var od = new api.Logging.fromJson(o.toJson()); |
2738 checkLogging(od); | 2782 checkLogging(od); |
2739 }); | 2783 }); |
2740 }); | 2784 }); |
2741 | 2785 |
2742 | |
2743 unittest.group("obj-schema-LoggingDestination", () { | 2786 unittest.group("obj-schema-LoggingDestination", () { |
2744 unittest.test("to-json--from-json", () { | 2787 unittest.test("to-json--from-json", () { |
2745 var o = buildLoggingDestination(); | 2788 var o = buildLoggingDestination(); |
2746 var od = new api.LoggingDestination.fromJson(o.toJson()); | 2789 var od = new api.LoggingDestination.fromJson(o.toJson()); |
2747 checkLoggingDestination(od); | 2790 checkLoggingDestination(od); |
2748 }); | 2791 }); |
2749 }); | 2792 }); |
2750 | 2793 |
2751 | |
2752 unittest.group("obj-schema-MediaDownload", () { | 2794 unittest.group("obj-schema-MediaDownload", () { |
2753 unittest.test("to-json--from-json", () { | 2795 unittest.test("to-json--from-json", () { |
2754 var o = buildMediaDownload(); | 2796 var o = buildMediaDownload(); |
2755 var od = new api.MediaDownload.fromJson(o.toJson()); | 2797 var od = new api.MediaDownload.fromJson(o.toJson()); |
2756 checkMediaDownload(od); | 2798 checkMediaDownload(od); |
2757 }); | 2799 }); |
2758 }); | 2800 }); |
2759 | 2801 |
2760 | |
2761 unittest.group("obj-schema-MediaUpload", () { | 2802 unittest.group("obj-schema-MediaUpload", () { |
2762 unittest.test("to-json--from-json", () { | 2803 unittest.test("to-json--from-json", () { |
2763 var o = buildMediaUpload(); | 2804 var o = buildMediaUpload(); |
2764 var od = new api.MediaUpload.fromJson(o.toJson()); | 2805 var od = new api.MediaUpload.fromJson(o.toJson()); |
2765 checkMediaUpload(od); | 2806 checkMediaUpload(od); |
2766 }); | 2807 }); |
2767 }); | 2808 }); |
2768 | 2809 |
2769 | |
2770 unittest.group("obj-schema-Method", () { | 2810 unittest.group("obj-schema-Method", () { |
2771 unittest.test("to-json--from-json", () { | 2811 unittest.test("to-json--from-json", () { |
2772 var o = buildMethod(); | 2812 var o = buildMethod(); |
2773 var od = new api.Method.fromJson(o.toJson()); | 2813 var od = new api.Method.fromJson(o.toJson()); |
2774 checkMethod(od); | 2814 checkMethod(od); |
2775 }); | 2815 }); |
2776 }); | 2816 }); |
2777 | 2817 |
2778 | |
2779 unittest.group("obj-schema-MetricDescriptor", () { | 2818 unittest.group("obj-schema-MetricDescriptor", () { |
2780 unittest.test("to-json--from-json", () { | 2819 unittest.test("to-json--from-json", () { |
2781 var o = buildMetricDescriptor(); | 2820 var o = buildMetricDescriptor(); |
2782 var od = new api.MetricDescriptor.fromJson(o.toJson()); | 2821 var od = new api.MetricDescriptor.fromJson(o.toJson()); |
2783 checkMetricDescriptor(od); | 2822 checkMetricDescriptor(od); |
2784 }); | 2823 }); |
2785 }); | 2824 }); |
2786 | 2825 |
2787 | |
2788 unittest.group("obj-schema-MetricRule", () { | 2826 unittest.group("obj-schema-MetricRule", () { |
2789 unittest.test("to-json--from-json", () { | 2827 unittest.test("to-json--from-json", () { |
2790 var o = buildMetricRule(); | 2828 var o = buildMetricRule(); |
2791 var od = new api.MetricRule.fromJson(o.toJson()); | 2829 var od = new api.MetricRule.fromJson(o.toJson()); |
2792 checkMetricRule(od); | 2830 checkMetricRule(od); |
2793 }); | 2831 }); |
2794 }); | 2832 }); |
2795 | 2833 |
2796 | |
2797 unittest.group("obj-schema-Mixin", () { | 2834 unittest.group("obj-schema-Mixin", () { |
2798 unittest.test("to-json--from-json", () { | 2835 unittest.test("to-json--from-json", () { |
2799 var o = buildMixin(); | 2836 var o = buildMixin(); |
2800 var od = new api.Mixin.fromJson(o.toJson()); | 2837 var od = new api.Mixin.fromJson(o.toJson()); |
2801 checkMixin(od); | 2838 checkMixin(od); |
2802 }); | 2839 }); |
2803 }); | 2840 }); |
2804 | 2841 |
2805 | |
2806 unittest.group("obj-schema-MonitoredResourceDescriptor", () { | 2842 unittest.group("obj-schema-MonitoredResourceDescriptor", () { |
2807 unittest.test("to-json--from-json", () { | 2843 unittest.test("to-json--from-json", () { |
2808 var o = buildMonitoredResourceDescriptor(); | 2844 var o = buildMonitoredResourceDescriptor(); |
2809 var od = new api.MonitoredResourceDescriptor.fromJson(o.toJson()); | 2845 var od = new api.MonitoredResourceDescriptor.fromJson(o.toJson()); |
2810 checkMonitoredResourceDescriptor(od); | 2846 checkMonitoredResourceDescriptor(od); |
2811 }); | 2847 }); |
2812 }); | 2848 }); |
2813 | 2849 |
2814 | |
2815 unittest.group("obj-schema-Monitoring", () { | 2850 unittest.group("obj-schema-Monitoring", () { |
2816 unittest.test("to-json--from-json", () { | 2851 unittest.test("to-json--from-json", () { |
2817 var o = buildMonitoring(); | 2852 var o = buildMonitoring(); |
2818 var od = new api.Monitoring.fromJson(o.toJson()); | 2853 var od = new api.Monitoring.fromJson(o.toJson()); |
2819 checkMonitoring(od); | 2854 checkMonitoring(od); |
2820 }); | 2855 }); |
2821 }); | 2856 }); |
2822 | 2857 |
2823 | |
2824 unittest.group("obj-schema-MonitoringDestination", () { | 2858 unittest.group("obj-schema-MonitoringDestination", () { |
2825 unittest.test("to-json--from-json", () { | 2859 unittest.test("to-json--from-json", () { |
2826 var o = buildMonitoringDestination(); | 2860 var o = buildMonitoringDestination(); |
2827 var od = new api.MonitoringDestination.fromJson(o.toJson()); | 2861 var od = new api.MonitoringDestination.fromJson(o.toJson()); |
2828 checkMonitoringDestination(od); | 2862 checkMonitoringDestination(od); |
2829 }); | 2863 }); |
2830 }); | 2864 }); |
2831 | 2865 |
2832 | |
2833 unittest.group("obj-schema-OAuthRequirements", () { | 2866 unittest.group("obj-schema-OAuthRequirements", () { |
2834 unittest.test("to-json--from-json", () { | 2867 unittest.test("to-json--from-json", () { |
2835 var o = buildOAuthRequirements(); | 2868 var o = buildOAuthRequirements(); |
2836 var od = new api.OAuthRequirements.fromJson(o.toJson()); | 2869 var od = new api.OAuthRequirements.fromJson(o.toJson()); |
2837 checkOAuthRequirements(od); | 2870 checkOAuthRequirements(od); |
2838 }); | 2871 }); |
2839 }); | 2872 }); |
2840 | 2873 |
2841 | |
2842 unittest.group("obj-schema-Operation", () { | 2874 unittest.group("obj-schema-Operation", () { |
2843 unittest.test("to-json--from-json", () { | 2875 unittest.test("to-json--from-json", () { |
2844 var o = buildOperation(); | 2876 var o = buildOperation(); |
2845 var od = new api.Operation.fromJson(o.toJson()); | 2877 var od = new api.Operation.fromJson(o.toJson()); |
2846 checkOperation(od); | 2878 checkOperation(od); |
2847 }); | 2879 }); |
2848 }); | 2880 }); |
2849 | 2881 |
2850 | |
2851 unittest.group("obj-schema-OperationMetadata", () { | 2882 unittest.group("obj-schema-OperationMetadata", () { |
2852 unittest.test("to-json--from-json", () { | 2883 unittest.test("to-json--from-json", () { |
2853 var o = buildOperationMetadata(); | 2884 var o = buildOperationMetadata(); |
2854 var od = new api.OperationMetadata.fromJson(o.toJson()); | 2885 var od = new api.OperationMetadata.fromJson(o.toJson()); |
2855 checkOperationMetadata(od); | 2886 checkOperationMetadata(od); |
2856 }); | 2887 }); |
2857 }); | 2888 }); |
2858 | 2889 |
2859 | |
2860 unittest.group("obj-schema-Option", () { | 2890 unittest.group("obj-schema-Option", () { |
2861 unittest.test("to-json--from-json", () { | 2891 unittest.test("to-json--from-json", () { |
2862 var o = buildOption(); | 2892 var o = buildOption(); |
2863 var od = new api.Option.fromJson(o.toJson()); | 2893 var od = new api.Option.fromJson(o.toJson()); |
2864 checkOption(od); | 2894 checkOption(od); |
2865 }); | 2895 }); |
2866 }); | 2896 }); |
2867 | 2897 |
2868 | |
2869 unittest.group("obj-schema-Page", () { | 2898 unittest.group("obj-schema-Page", () { |
2870 unittest.test("to-json--from-json", () { | 2899 unittest.test("to-json--from-json", () { |
2871 var o = buildPage(); | 2900 var o = buildPage(); |
2872 var od = new api.Page.fromJson(o.toJson()); | 2901 var od = new api.Page.fromJson(o.toJson()); |
2873 checkPage(od); | 2902 checkPage(od); |
2874 }); | 2903 }); |
2875 }); | 2904 }); |
2876 | 2905 |
2877 | |
2878 unittest.group("obj-schema-PublishedService", () { | 2906 unittest.group("obj-schema-PublishedService", () { |
2879 unittest.test("to-json--from-json", () { | 2907 unittest.test("to-json--from-json", () { |
2880 var o = buildPublishedService(); | 2908 var o = buildPublishedService(); |
2881 var od = new api.PublishedService.fromJson(o.toJson()); | 2909 var od = new api.PublishedService.fromJson(o.toJson()); |
2882 checkPublishedService(od); | 2910 checkPublishedService(od); |
2883 }); | 2911 }); |
2884 }); | 2912 }); |
2885 | 2913 |
2886 | |
2887 unittest.group("obj-schema-Quota", () { | 2914 unittest.group("obj-schema-Quota", () { |
2888 unittest.test("to-json--from-json", () { | 2915 unittest.test("to-json--from-json", () { |
2889 var o = buildQuota(); | 2916 var o = buildQuota(); |
2890 var od = new api.Quota.fromJson(o.toJson()); | 2917 var od = new api.Quota.fromJson(o.toJson()); |
2891 checkQuota(od); | 2918 checkQuota(od); |
2892 }); | 2919 }); |
2893 }); | 2920 }); |
2894 | 2921 |
2895 | |
2896 unittest.group("obj-schema-QuotaLimit", () { | 2922 unittest.group("obj-schema-QuotaLimit", () { |
2897 unittest.test("to-json--from-json", () { | 2923 unittest.test("to-json--from-json", () { |
2898 var o = buildQuotaLimit(); | 2924 var o = buildQuotaLimit(); |
2899 var od = new api.QuotaLimit.fromJson(o.toJson()); | 2925 var od = new api.QuotaLimit.fromJson(o.toJson()); |
2900 checkQuotaLimit(od); | 2926 checkQuotaLimit(od); |
2901 }); | 2927 }); |
2902 }); | 2928 }); |
2903 | 2929 |
2904 | |
2905 unittest.group("obj-schema-SearchServicesResponse", () { | 2930 unittest.group("obj-schema-SearchServicesResponse", () { |
2906 unittest.test("to-json--from-json", () { | 2931 unittest.test("to-json--from-json", () { |
2907 var o = buildSearchServicesResponse(); | 2932 var o = buildSearchServicesResponse(); |
2908 var od = new api.SearchServicesResponse.fromJson(o.toJson()); | 2933 var od = new api.SearchServicesResponse.fromJson(o.toJson()); |
2909 checkSearchServicesResponse(od); | 2934 checkSearchServicesResponse(od); |
2910 }); | 2935 }); |
2911 }); | 2936 }); |
2912 | 2937 |
2913 | |
2914 unittest.group("obj-schema-Service", () { | 2938 unittest.group("obj-schema-Service", () { |
2915 unittest.test("to-json--from-json", () { | 2939 unittest.test("to-json--from-json", () { |
2916 var o = buildService(); | 2940 var o = buildService(); |
2917 var od = new api.Service.fromJson(o.toJson()); | 2941 var od = new api.Service.fromJson(o.toJson()); |
2918 checkService(od); | 2942 checkService(od); |
2919 }); | 2943 }); |
2920 }); | 2944 }); |
2921 | 2945 |
2922 | |
2923 unittest.group("obj-schema-SourceContext", () { | 2946 unittest.group("obj-schema-SourceContext", () { |
2924 unittest.test("to-json--from-json", () { | 2947 unittest.test("to-json--from-json", () { |
2925 var o = buildSourceContext(); | 2948 var o = buildSourceContext(); |
2926 var od = new api.SourceContext.fromJson(o.toJson()); | 2949 var od = new api.SourceContext.fromJson(o.toJson()); |
2927 checkSourceContext(od); | 2950 checkSourceContext(od); |
2928 }); | 2951 }); |
2929 }); | 2952 }); |
2930 | 2953 |
2931 | |
2932 unittest.group("obj-schema-SourceInfo", () { | 2954 unittest.group("obj-schema-SourceInfo", () { |
2933 unittest.test("to-json--from-json", () { | 2955 unittest.test("to-json--from-json", () { |
2934 var o = buildSourceInfo(); | 2956 var o = buildSourceInfo(); |
2935 var od = new api.SourceInfo.fromJson(o.toJson()); | 2957 var od = new api.SourceInfo.fromJson(o.toJson()); |
2936 checkSourceInfo(od); | 2958 checkSourceInfo(od); |
2937 }); | 2959 }); |
2938 }); | 2960 }); |
2939 | 2961 |
2940 | |
2941 unittest.group("obj-schema-Status", () { | 2962 unittest.group("obj-schema-Status", () { |
2942 unittest.test("to-json--from-json", () { | 2963 unittest.test("to-json--from-json", () { |
2943 var o = buildStatus(); | 2964 var o = buildStatus(); |
2944 var od = new api.Status.fromJson(o.toJson()); | 2965 var od = new api.Status.fromJson(o.toJson()); |
2945 checkStatus(od); | 2966 checkStatus(od); |
2946 }); | 2967 }); |
2947 }); | 2968 }); |
2948 | 2969 |
2949 | |
2950 unittest.group("obj-schema-Step", () { | 2970 unittest.group("obj-schema-Step", () { |
2951 unittest.test("to-json--from-json", () { | 2971 unittest.test("to-json--from-json", () { |
2952 var o = buildStep(); | 2972 var o = buildStep(); |
2953 var od = new api.Step.fromJson(o.toJson()); | 2973 var od = new api.Step.fromJson(o.toJson()); |
2954 checkStep(od); | 2974 checkStep(od); |
2955 }); | 2975 }); |
2956 }); | 2976 }); |
2957 | 2977 |
2958 | |
2959 unittest.group("obj-schema-SystemParameter", () { | 2978 unittest.group("obj-schema-SystemParameter", () { |
2960 unittest.test("to-json--from-json", () { | 2979 unittest.test("to-json--from-json", () { |
2961 var o = buildSystemParameter(); | 2980 var o = buildSystemParameter(); |
2962 var od = new api.SystemParameter.fromJson(o.toJson()); | 2981 var od = new api.SystemParameter.fromJson(o.toJson()); |
2963 checkSystemParameter(od); | 2982 checkSystemParameter(od); |
2964 }); | 2983 }); |
2965 }); | 2984 }); |
2966 | 2985 |
2967 | |
2968 unittest.group("obj-schema-SystemParameterRule", () { | 2986 unittest.group("obj-schema-SystemParameterRule", () { |
2969 unittest.test("to-json--from-json", () { | 2987 unittest.test("to-json--from-json", () { |
2970 var o = buildSystemParameterRule(); | 2988 var o = buildSystemParameterRule(); |
2971 var od = new api.SystemParameterRule.fromJson(o.toJson()); | 2989 var od = new api.SystemParameterRule.fromJson(o.toJson()); |
2972 checkSystemParameterRule(od); | 2990 checkSystemParameterRule(od); |
2973 }); | 2991 }); |
2974 }); | 2992 }); |
2975 | 2993 |
2976 | |
2977 unittest.group("obj-schema-SystemParameters", () { | 2994 unittest.group("obj-schema-SystemParameters", () { |
2978 unittest.test("to-json--from-json", () { | 2995 unittest.test("to-json--from-json", () { |
2979 var o = buildSystemParameters(); | 2996 var o = buildSystemParameters(); |
2980 var od = new api.SystemParameters.fromJson(o.toJson()); | 2997 var od = new api.SystemParameters.fromJson(o.toJson()); |
2981 checkSystemParameters(od); | 2998 checkSystemParameters(od); |
2982 }); | 2999 }); |
2983 }); | 3000 }); |
2984 | 3001 |
2985 | |
2986 unittest.group("obj-schema-Type", () { | 3002 unittest.group("obj-schema-Type", () { |
2987 unittest.test("to-json--from-json", () { | 3003 unittest.test("to-json--from-json", () { |
2988 var o = buildType(); | 3004 var o = buildType(); |
2989 var od = new api.Type.fromJson(o.toJson()); | 3005 var od = new api.Type.fromJson(o.toJson()); |
2990 checkType(od); | 3006 checkType(od); |
2991 }); | 3007 }); |
2992 }); | 3008 }); |
2993 | 3009 |
2994 | |
2995 unittest.group("obj-schema-Usage", () { | 3010 unittest.group("obj-schema-Usage", () { |
2996 unittest.test("to-json--from-json", () { | 3011 unittest.test("to-json--from-json", () { |
2997 var o = buildUsage(); | 3012 var o = buildUsage(); |
2998 var od = new api.Usage.fromJson(o.toJson()); | 3013 var od = new api.Usage.fromJson(o.toJson()); |
2999 checkUsage(od); | 3014 checkUsage(od); |
3000 }); | 3015 }); |
3001 }); | 3016 }); |
3002 | 3017 |
3003 | |
3004 unittest.group("obj-schema-UsageRule", () { | 3018 unittest.group("obj-schema-UsageRule", () { |
3005 unittest.test("to-json--from-json", () { | 3019 unittest.test("to-json--from-json", () { |
3006 var o = buildUsageRule(); | 3020 var o = buildUsageRule(); |
3007 var od = new api.UsageRule.fromJson(o.toJson()); | 3021 var od = new api.UsageRule.fromJson(o.toJson()); |
3008 checkUsageRule(od); | 3022 checkUsageRule(od); |
3009 }); | 3023 }); |
3010 }); | 3024 }); |
3011 | 3025 |
3012 | |
3013 unittest.group("obj-schema-Visibility", () { | 3026 unittest.group("obj-schema-Visibility", () { |
3014 unittest.test("to-json--from-json", () { | 3027 unittest.test("to-json--from-json", () { |
3015 var o = buildVisibility(); | 3028 var o = buildVisibility(); |
3016 var od = new api.Visibility.fromJson(o.toJson()); | 3029 var od = new api.Visibility.fromJson(o.toJson()); |
3017 checkVisibility(od); | 3030 checkVisibility(od); |
3018 }); | 3031 }); |
3019 }); | 3032 }); |
3020 | 3033 |
3021 | |
3022 unittest.group("obj-schema-VisibilityRule", () { | 3034 unittest.group("obj-schema-VisibilityRule", () { |
3023 unittest.test("to-json--from-json", () { | 3035 unittest.test("to-json--from-json", () { |
3024 var o = buildVisibilityRule(); | 3036 var o = buildVisibilityRule(); |
3025 var od = new api.VisibilityRule.fromJson(o.toJson()); | 3037 var od = new api.VisibilityRule.fromJson(o.toJson()); |
3026 checkVisibilityRule(od); | 3038 checkVisibilityRule(od); |
3027 }); | 3039 }); |
3028 }); | 3040 }); |
3029 | 3041 |
3030 | |
3031 unittest.group("resource-ProjectsServicesResourceApi", () { | 3042 unittest.group("resource-ProjectsServicesResourceApi", () { |
3032 unittest.test("method--disable", () { | 3043 unittest.test("method--disable", () { |
3033 | |
3034 var mock = new HttpServerMock(); | 3044 var mock = new HttpServerMock(); |
3035 api.ProjectsServicesResourceApi res = new api.ServiceuserApi(mock).project
s.services; | 3045 api.ProjectsServicesResourceApi res = |
| 3046 new api.ServiceuserApi(mock).projects.services; |
3036 var arg_request = buildDisableServiceRequest(); | 3047 var arg_request = buildDisableServiceRequest(); |
3037 var arg_name = "foo"; | 3048 var arg_name = "foo"; |
3038 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3049 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3039 var obj = new api.DisableServiceRequest.fromJson(json); | 3050 var obj = new api.DisableServiceRequest.fromJson(json); |
3040 checkDisableServiceRequest(obj); | 3051 checkDisableServiceRequest(obj); |
3041 | 3052 |
3042 var path = (req.url).path; | 3053 var path = (req.url).path; |
3043 var pathOffset = 0; | 3054 var pathOffset = 0; |
3044 var index; | 3055 var index; |
3045 var subPart; | 3056 var subPart; |
3046 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3057 unittest.expect( |
| 3058 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3047 pathOffset += 1; | 3059 pathOffset += 1; |
3048 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3060 unittest.expect( |
| 3061 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
3049 pathOffset += 3; | 3062 pathOffset += 3; |
3050 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3063 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
3051 | 3064 |
3052 var query = (req.url).query; | 3065 var query = (req.url).query; |
3053 var queryOffset = 0; | 3066 var queryOffset = 0; |
3054 var queryMap = {}; | 3067 var queryMap = {}; |
3055 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3068 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3056 parseBool(n) { | 3069 parseBool(n) { |
3057 if (n == "true") return true; | 3070 if (n == "true") return true; |
3058 if (n == "false") return false; | 3071 if (n == "false") return false; |
3059 if (n == null) return null; | 3072 if (n == null) return null; |
3060 throw new core.ArgumentError("Invalid boolean: $n"); | 3073 throw new core.ArgumentError("Invalid boolean: $n"); |
3061 } | 3074 } |
| 3075 |
3062 if (query.length > 0) { | 3076 if (query.length > 0) { |
3063 for (var part in query.split("&")) { | 3077 for (var part in query.split("&")) { |
3064 var keyvalue = part.split("="); | 3078 var keyvalue = part.split("="); |
3065 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3079 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3080 core.Uri.decodeQueryComponent(keyvalue[1])); |
3066 } | 3081 } |
3067 } | 3082 } |
3068 | 3083 |
3069 | |
3070 var h = { | 3084 var h = { |
3071 "content-type" : "application/json; charset=utf-8", | 3085 "content-type": "application/json; charset=utf-8", |
3072 }; | 3086 }; |
3073 var resp = convert.JSON.encode(buildOperation()); | 3087 var resp = convert.JSON.encode(buildOperation()); |
3074 return new async.Future.value(stringResponse(200, h, resp)); | 3088 return new async.Future.value(stringResponse(200, h, resp)); |
3075 }), true); | 3089 }), true); |
3076 res.disable(arg_request, arg_name).then(unittest.expectAsync1(((api.Operat
ion response) { | 3090 res |
| 3091 .disable(arg_request, arg_name) |
| 3092 .then(unittest.expectAsync1(((api.Operation response) { |
3077 checkOperation(response); | 3093 checkOperation(response); |
3078 }))); | 3094 }))); |
3079 }); | 3095 }); |
3080 | 3096 |
3081 unittest.test("method--enable", () { | 3097 unittest.test("method--enable", () { |
3082 | |
3083 var mock = new HttpServerMock(); | 3098 var mock = new HttpServerMock(); |
3084 api.ProjectsServicesResourceApi res = new api.ServiceuserApi(mock).project
s.services; | 3099 api.ProjectsServicesResourceApi res = |
| 3100 new api.ServiceuserApi(mock).projects.services; |
3085 var arg_request = buildEnableServiceRequest(); | 3101 var arg_request = buildEnableServiceRequest(); |
3086 var arg_name = "foo"; | 3102 var arg_name = "foo"; |
3087 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3103 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3088 var obj = new api.EnableServiceRequest.fromJson(json); | 3104 var obj = new api.EnableServiceRequest.fromJson(json); |
3089 checkEnableServiceRequest(obj); | 3105 checkEnableServiceRequest(obj); |
3090 | 3106 |
3091 var path = (req.url).path; | 3107 var path = (req.url).path; |
3092 var pathOffset = 0; | 3108 var pathOffset = 0; |
3093 var index; | 3109 var index; |
3094 var subPart; | 3110 var subPart; |
3095 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3111 unittest.expect( |
| 3112 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3096 pathOffset += 1; | 3113 pathOffset += 1; |
3097 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3114 unittest.expect( |
| 3115 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
3098 pathOffset += 3; | 3116 pathOffset += 3; |
3099 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3117 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
3100 | 3118 |
3101 var query = (req.url).query; | 3119 var query = (req.url).query; |
3102 var queryOffset = 0; | 3120 var queryOffset = 0; |
3103 var queryMap = {}; | 3121 var queryMap = {}; |
3104 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3122 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3105 parseBool(n) { | 3123 parseBool(n) { |
3106 if (n == "true") return true; | 3124 if (n == "true") return true; |
3107 if (n == "false") return false; | 3125 if (n == "false") return false; |
3108 if (n == null) return null; | 3126 if (n == null) return null; |
3109 throw new core.ArgumentError("Invalid boolean: $n"); | 3127 throw new core.ArgumentError("Invalid boolean: $n"); |
3110 } | 3128 } |
| 3129 |
3111 if (query.length > 0) { | 3130 if (query.length > 0) { |
3112 for (var part in query.split("&")) { | 3131 for (var part in query.split("&")) { |
3113 var keyvalue = part.split("="); | 3132 var keyvalue = part.split("="); |
3114 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3133 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3134 core.Uri.decodeQueryComponent(keyvalue[1])); |
3115 } | 3135 } |
3116 } | 3136 } |
3117 | 3137 |
3118 | |
3119 var h = { | 3138 var h = { |
3120 "content-type" : "application/json; charset=utf-8", | 3139 "content-type": "application/json; charset=utf-8", |
3121 }; | 3140 }; |
3122 var resp = convert.JSON.encode(buildOperation()); | 3141 var resp = convert.JSON.encode(buildOperation()); |
3123 return new async.Future.value(stringResponse(200, h, resp)); | 3142 return new async.Future.value(stringResponse(200, h, resp)); |
3124 }), true); | 3143 }), true); |
3125 res.enable(arg_request, arg_name).then(unittest.expectAsync1(((api.Operati
on response) { | 3144 res |
| 3145 .enable(arg_request, arg_name) |
| 3146 .then(unittest.expectAsync1(((api.Operation response) { |
3126 checkOperation(response); | 3147 checkOperation(response); |
3127 }))); | 3148 }))); |
3128 }); | 3149 }); |
3129 | 3150 |
3130 unittest.test("method--list", () { | 3151 unittest.test("method--list", () { |
3131 | |
3132 var mock = new HttpServerMock(); | 3152 var mock = new HttpServerMock(); |
3133 api.ProjectsServicesResourceApi res = new api.ServiceuserApi(mock).project
s.services; | 3153 api.ProjectsServicesResourceApi res = |
| 3154 new api.ServiceuserApi(mock).projects.services; |
3134 var arg_parent = "foo"; | 3155 var arg_parent = "foo"; |
| 3156 var arg_pageSize = 42; |
3135 var arg_pageToken = "foo"; | 3157 var arg_pageToken = "foo"; |
3136 var arg_pageSize = 42; | |
3137 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3158 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3138 var path = (req.url).path; | 3159 var path = (req.url).path; |
3139 var pathOffset = 0; | 3160 var pathOffset = 0; |
3140 var index; | 3161 var index; |
3141 var subPart; | 3162 var subPart; |
3142 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3163 unittest.expect( |
| 3164 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3143 pathOffset += 1; | 3165 pathOffset += 1; |
3144 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 3166 unittest.expect( |
| 3167 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/")); |
3145 pathOffset += 3; | 3168 pathOffset += 3; |
3146 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 3169 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
3147 | 3170 |
3148 var query = (req.url).query; | 3171 var query = (req.url).query; |
3149 var queryOffset = 0; | 3172 var queryOffset = 0; |
3150 var queryMap = {}; | 3173 var queryMap = {}; |
3151 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3174 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3152 parseBool(n) { | 3175 parseBool(n) { |
3153 if (n == "true") return true; | 3176 if (n == "true") return true; |
3154 if (n == "false") return false; | 3177 if (n == "false") return false; |
3155 if (n == null) return null; | 3178 if (n == null) return null; |
3156 throw new core.ArgumentError("Invalid boolean: $n"); | 3179 throw new core.ArgumentError("Invalid boolean: $n"); |
3157 } | 3180 } |
| 3181 |
3158 if (query.length > 0) { | 3182 if (query.length > 0) { |
3159 for (var part in query.split("&")) { | 3183 for (var part in query.split("&")) { |
3160 var keyvalue = part.split("="); | 3184 var keyvalue = part.split("="); |
3161 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3185 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3186 core.Uri.decodeQueryComponent(keyvalue[1])); |
3162 } | 3187 } |
3163 } | 3188 } |
3164 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3189 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
3165 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3190 unittest.equals(arg_pageSize)); |
3166 | 3191 unittest.expect( |
| 3192 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
3167 | 3193 |
3168 var h = { | 3194 var h = { |
3169 "content-type" : "application/json; charset=utf-8", | 3195 "content-type": "application/json; charset=utf-8", |
3170 }; | 3196 }; |
3171 var resp = convert.JSON.encode(buildListEnabledServicesResponse()); | 3197 var resp = convert.JSON.encode(buildListEnabledServicesResponse()); |
3172 return new async.Future.value(stringResponse(200, h, resp)); | 3198 return new async.Future.value(stringResponse(200, h, resp)); |
3173 }), true); | 3199 }), true); |
3174 res.list(arg_parent, pageToken: arg_pageToken, pageSize: arg_pageSize).the
n(unittest.expectAsync1(((api.ListEnabledServicesResponse response) { | 3200 res |
| 3201 .list(arg_parent, pageSize: arg_pageSize, pageToken: arg_pageToken) |
| 3202 .then(unittest |
| 3203 .expectAsync1(((api.ListEnabledServicesResponse response) { |
3175 checkListEnabledServicesResponse(response); | 3204 checkListEnabledServicesResponse(response); |
3176 }))); | 3205 }))); |
3177 }); | 3206 }); |
3178 | |
3179 }); | 3207 }); |
3180 | 3208 |
3181 | |
3182 unittest.group("resource-ServicesResourceApi", () { | 3209 unittest.group("resource-ServicesResourceApi", () { |
3183 unittest.test("method--search", () { | 3210 unittest.test("method--search", () { |
3184 | |
3185 var mock = new HttpServerMock(); | 3211 var mock = new HttpServerMock(); |
3186 api.ServicesResourceApi res = new api.ServiceuserApi(mock).services; | 3212 api.ServicesResourceApi res = new api.ServiceuserApi(mock).services; |
3187 var arg_pageToken = "foo"; | 3213 var arg_pageToken = "foo"; |
3188 var arg_pageSize = 42; | 3214 var arg_pageSize = 42; |
3189 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { | 3215 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { |
3190 var path = (req.url).path; | 3216 var path = (req.url).path; |
3191 var pathOffset = 0; | 3217 var pathOffset = 0; |
3192 var index; | 3218 var index; |
3193 var subPart; | 3219 var subPart; |
3194 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 3220 unittest.expect( |
| 3221 path.substring(pathOffset, pathOffset + 1), unittest.equals("/")); |
3195 pathOffset += 1; | 3222 pathOffset += 1; |
3196 unittest.expect(path.substring(pathOffset, pathOffset + 18), unittest.eq
uals("v1/services:search")); | 3223 unittest.expect(path.substring(pathOffset, pathOffset + 18), |
| 3224 unittest.equals("v1/services:search")); |
3197 pathOffset += 18; | 3225 pathOffset += 18; |
3198 | 3226 |
3199 var query = (req.url).query; | 3227 var query = (req.url).query; |
3200 var queryOffset = 0; | 3228 var queryOffset = 0; |
3201 var queryMap = {}; | 3229 var queryMap = {}; |
3202 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 3230 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
3203 parseBool(n) { | 3231 parseBool(n) { |
3204 if (n == "true") return true; | 3232 if (n == "true") return true; |
3205 if (n == "false") return false; | 3233 if (n == "false") return false; |
3206 if (n == null) return null; | 3234 if (n == null) return null; |
3207 throw new core.ArgumentError("Invalid boolean: $n"); | 3235 throw new core.ArgumentError("Invalid boolean: $n"); |
3208 } | 3236 } |
| 3237 |
3209 if (query.length > 0) { | 3238 if (query.length > 0) { |
3210 for (var part in query.split("&")) { | 3239 for (var part in query.split("&")) { |
3211 var keyvalue = part.split("="); | 3240 var keyvalue = part.split("="); |
3212 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 3241 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), |
| 3242 core.Uri.decodeQueryComponent(keyvalue[1])); |
3213 } | 3243 } |
3214 } | 3244 } |
3215 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 3245 unittest.expect( |
3216 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 3246 queryMap["pageToken"].first, unittest.equals(arg_pageToken)); |
3217 | 3247 unittest.expect(core.int.parse(queryMap["pageSize"].first), |
| 3248 unittest.equals(arg_pageSize)); |
3218 | 3249 |
3219 var h = { | 3250 var h = { |
3220 "content-type" : "application/json; charset=utf-8", | 3251 "content-type": "application/json; charset=utf-8", |
3221 }; | 3252 }; |
3222 var resp = convert.JSON.encode(buildSearchServicesResponse()); | 3253 var resp = convert.JSON.encode(buildSearchServicesResponse()); |
3223 return new async.Future.value(stringResponse(200, h, resp)); | 3254 return new async.Future.value(stringResponse(200, h, resp)); |
3224 }), true); | 3255 }), true); |
3225 res.search(pageToken: arg_pageToken, pageSize: arg_pageSize).then(unittest
.expectAsync1(((api.SearchServicesResponse response) { | 3256 res |
| 3257 .search(pageToken: arg_pageToken, pageSize: arg_pageSize) |
| 3258 .then(unittest.expectAsync1(((api.SearchServicesResponse response) { |
3226 checkSearchServicesResponse(response); | 3259 checkSearchServicesResponse(response); |
3227 }))); | 3260 }))); |
3228 }); | 3261 }); |
3229 | |
3230 }); | 3262 }); |
3231 | |
3232 | |
3233 } | 3263 } |
3234 | |
OLD | NEW |