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

Side by Side Diff: generated/googleapis/test/datastore/v1_test.dart

Issue 3006323002: Api-Roll 54: 2017-09-11 (Closed)
Patch Set: use 2.0.0-dev.infinity sdk constraint in pubspecs Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 library googleapis.datastore.v1.test; 1 library googleapis.datastore.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/datastore/v1.dart' as api; 10 import 'package:googleapis/datastore/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 buildUnnamed631() { 53 buildUnnamed630() {
55 var o = new core.List<api.Key>(); 54 var o = new core.List<api.Key>();
56 o.add(buildKey()); 55 o.add(buildKey());
57 o.add(buildKey()); 56 o.add(buildKey());
58 return o; 57 return o;
59 } 58 }
60 59
61 checkUnnamed631(core.List<api.Key> o) { 60 checkUnnamed630(core.List<api.Key> o) {
62 unittest.expect(o, unittest.hasLength(2)); 61 unittest.expect(o, unittest.hasLength(2));
63 checkKey(o[0]); 62 checkKey(o[0]);
64 checkKey(o[1]); 63 checkKey(o[1]);
65 } 64 }
66 65
67 core.int buildCounterAllocateIdsRequest = 0; 66 core.int buildCounterAllocateIdsRequest = 0;
68 buildAllocateIdsRequest() { 67 buildAllocateIdsRequest() {
69 var o = new api.AllocateIdsRequest(); 68 var o = new api.AllocateIdsRequest();
70 buildCounterAllocateIdsRequest++; 69 buildCounterAllocateIdsRequest++;
71 if (buildCounterAllocateIdsRequest < 3) { 70 if (buildCounterAllocateIdsRequest < 3) {
72 o.keys = buildUnnamed631(); 71 o.keys = buildUnnamed630();
73 } 72 }
74 buildCounterAllocateIdsRequest--; 73 buildCounterAllocateIdsRequest--;
75 return o; 74 return o;
76 } 75 }
77 76
78 checkAllocateIdsRequest(api.AllocateIdsRequest o) { 77 checkAllocateIdsRequest(api.AllocateIdsRequest o) {
79 buildCounterAllocateIdsRequest++; 78 buildCounterAllocateIdsRequest++;
80 if (buildCounterAllocateIdsRequest < 3) { 79 if (buildCounterAllocateIdsRequest < 3) {
81 checkUnnamed631(o.keys); 80 checkUnnamed630(o.keys);
82 } 81 }
83 buildCounterAllocateIdsRequest--; 82 buildCounterAllocateIdsRequest--;
84 } 83 }
85 84
86 buildUnnamed632() { 85 buildUnnamed631() {
87 var o = new core.List<api.Key>(); 86 var o = new core.List<api.Key>();
88 o.add(buildKey()); 87 o.add(buildKey());
89 o.add(buildKey()); 88 o.add(buildKey());
90 return o; 89 return o;
91 } 90 }
92 91
93 checkUnnamed632(core.List<api.Key> o) { 92 checkUnnamed631(core.List<api.Key> o) {
94 unittest.expect(o, unittest.hasLength(2)); 93 unittest.expect(o, unittest.hasLength(2));
95 checkKey(o[0]); 94 checkKey(o[0]);
96 checkKey(o[1]); 95 checkKey(o[1]);
97 } 96 }
98 97
99 core.int buildCounterAllocateIdsResponse = 0; 98 core.int buildCounterAllocateIdsResponse = 0;
100 buildAllocateIdsResponse() { 99 buildAllocateIdsResponse() {
101 var o = new api.AllocateIdsResponse(); 100 var o = new api.AllocateIdsResponse();
102 buildCounterAllocateIdsResponse++; 101 buildCounterAllocateIdsResponse++;
103 if (buildCounterAllocateIdsResponse < 3) { 102 if (buildCounterAllocateIdsResponse < 3) {
104 o.keys = buildUnnamed632(); 103 o.keys = buildUnnamed631();
105 } 104 }
106 buildCounterAllocateIdsResponse--; 105 buildCounterAllocateIdsResponse--;
107 return o; 106 return o;
108 } 107 }
109 108
110 checkAllocateIdsResponse(api.AllocateIdsResponse o) { 109 checkAllocateIdsResponse(api.AllocateIdsResponse o) {
111 buildCounterAllocateIdsResponse++; 110 buildCounterAllocateIdsResponse++;
112 if (buildCounterAllocateIdsResponse < 3) { 111 if (buildCounterAllocateIdsResponse < 3) {
113 checkUnnamed632(o.keys); 112 checkUnnamed631(o.keys);
114 } 113 }
115 buildCounterAllocateIdsResponse--; 114 buildCounterAllocateIdsResponse--;
116 } 115 }
117 116
118 buildUnnamed633() { 117 buildUnnamed632() {
119 var o = new core.List<api.Value>(); 118 var o = new core.List<api.Value>();
120 o.add(buildValue()); 119 o.add(buildValue());
121 o.add(buildValue()); 120 o.add(buildValue());
122 return o; 121 return o;
123 } 122 }
124 123
125 checkUnnamed633(core.List<api.Value> o) { 124 checkUnnamed632(core.List<api.Value> o) {
126 unittest.expect(o, unittest.hasLength(2)); 125 unittest.expect(o, unittest.hasLength(2));
127 checkValue(o[0]); 126 checkValue(o[0]);
128 checkValue(o[1]); 127 checkValue(o[1]);
129 } 128 }
130 129
131 core.int buildCounterArrayValue = 0; 130 core.int buildCounterArrayValue = 0;
132 buildArrayValue() { 131 buildArrayValue() {
133 var o = new api.ArrayValue(); 132 var o = new api.ArrayValue();
134 buildCounterArrayValue++; 133 buildCounterArrayValue++;
135 if (buildCounterArrayValue < 3) { 134 if (buildCounterArrayValue < 3) {
136 o.values = buildUnnamed633(); 135 o.values = buildUnnamed632();
137 } 136 }
138 buildCounterArrayValue--; 137 buildCounterArrayValue--;
139 return o; 138 return o;
140 } 139 }
141 140
142 checkArrayValue(api.ArrayValue o) { 141 checkArrayValue(api.ArrayValue o) {
143 buildCounterArrayValue++; 142 buildCounterArrayValue++;
144 if (buildCounterArrayValue < 3) { 143 if (buildCounterArrayValue < 3) {
145 checkUnnamed633(o.values); 144 checkUnnamed632(o.values);
146 } 145 }
147 buildCounterArrayValue--; 146 buildCounterArrayValue--;
148 } 147 }
149 148
150 core.int buildCounterBeginTransactionRequest = 0; 149 core.int buildCounterBeginTransactionRequest = 0;
151 buildBeginTransactionRequest() { 150 buildBeginTransactionRequest() {
152 var o = new api.BeginTransactionRequest(); 151 var o = new api.BeginTransactionRequest();
153 buildCounterBeginTransactionRequest++; 152 buildCounterBeginTransactionRequest++;
154 if (buildCounterBeginTransactionRequest < 3) { 153 if (buildCounterBeginTransactionRequest < 3) {
155 o.transactionOptions = buildTransactionOptions(); 154 o.transactionOptions = buildTransactionOptions();
(...skipping 22 matching lines...) Expand all
178 } 177 }
179 178
180 checkBeginTransactionResponse(api.BeginTransactionResponse o) { 179 checkBeginTransactionResponse(api.BeginTransactionResponse o) {
181 buildCounterBeginTransactionResponse++; 180 buildCounterBeginTransactionResponse++;
182 if (buildCounterBeginTransactionResponse < 3) { 181 if (buildCounterBeginTransactionResponse < 3) {
183 unittest.expect(o.transaction, unittest.equals('foo')); 182 unittest.expect(o.transaction, unittest.equals('foo'));
184 } 183 }
185 buildCounterBeginTransactionResponse--; 184 buildCounterBeginTransactionResponse--;
186 } 185 }
187 186
188 buildUnnamed634() { 187 buildUnnamed633() {
189 var o = new core.List<api.Mutation>(); 188 var o = new core.List<api.Mutation>();
190 o.add(buildMutation()); 189 o.add(buildMutation());
191 o.add(buildMutation()); 190 o.add(buildMutation());
192 return o; 191 return o;
193 } 192 }
194 193
195 checkUnnamed634(core.List<api.Mutation> o) { 194 checkUnnamed633(core.List<api.Mutation> o) {
196 unittest.expect(o, unittest.hasLength(2)); 195 unittest.expect(o, unittest.hasLength(2));
197 checkMutation(o[0]); 196 checkMutation(o[0]);
198 checkMutation(o[1]); 197 checkMutation(o[1]);
199 } 198 }
200 199
201 core.int buildCounterCommitRequest = 0; 200 core.int buildCounterCommitRequest = 0;
202 buildCommitRequest() { 201 buildCommitRequest() {
203 var o = new api.CommitRequest(); 202 var o = new api.CommitRequest();
204 buildCounterCommitRequest++; 203 buildCounterCommitRequest++;
205 if (buildCounterCommitRequest < 3) { 204 if (buildCounterCommitRequest < 3) {
206 o.mode = "foo"; 205 o.mode = "foo";
207 o.mutations = buildUnnamed634(); 206 o.mutations = buildUnnamed633();
208 o.transaction = "foo"; 207 o.transaction = "foo";
209 } 208 }
210 buildCounterCommitRequest--; 209 buildCounterCommitRequest--;
211 return o; 210 return o;
212 } 211 }
213 212
214 checkCommitRequest(api.CommitRequest o) { 213 checkCommitRequest(api.CommitRequest o) {
215 buildCounterCommitRequest++; 214 buildCounterCommitRequest++;
216 if (buildCounterCommitRequest < 3) { 215 if (buildCounterCommitRequest < 3) {
217 unittest.expect(o.mode, unittest.equals('foo')); 216 unittest.expect(o.mode, unittest.equals('foo'));
218 checkUnnamed634(o.mutations); 217 checkUnnamed633(o.mutations);
219 unittest.expect(o.transaction, unittest.equals('foo')); 218 unittest.expect(o.transaction, unittest.equals('foo'));
220 } 219 }
221 buildCounterCommitRequest--; 220 buildCounterCommitRequest--;
222 } 221 }
223 222
224 buildUnnamed635() { 223 buildUnnamed634() {
225 var o = new core.List<api.MutationResult>(); 224 var o = new core.List<api.MutationResult>();
226 o.add(buildMutationResult()); 225 o.add(buildMutationResult());
227 o.add(buildMutationResult()); 226 o.add(buildMutationResult());
228 return o; 227 return o;
229 } 228 }
230 229
231 checkUnnamed635(core.List<api.MutationResult> o) { 230 checkUnnamed634(core.List<api.MutationResult> o) {
232 unittest.expect(o, unittest.hasLength(2)); 231 unittest.expect(o, unittest.hasLength(2));
233 checkMutationResult(o[0]); 232 checkMutationResult(o[0]);
234 checkMutationResult(o[1]); 233 checkMutationResult(o[1]);
235 } 234 }
236 235
237 core.int buildCounterCommitResponse = 0; 236 core.int buildCounterCommitResponse = 0;
238 buildCommitResponse() { 237 buildCommitResponse() {
239 var o = new api.CommitResponse(); 238 var o = new api.CommitResponse();
240 buildCounterCommitResponse++; 239 buildCounterCommitResponse++;
241 if (buildCounterCommitResponse < 3) { 240 if (buildCounterCommitResponse < 3) {
242 o.indexUpdates = 42; 241 o.indexUpdates = 42;
243 o.mutationResults = buildUnnamed635(); 242 o.mutationResults = buildUnnamed634();
244 } 243 }
245 buildCounterCommitResponse--; 244 buildCounterCommitResponse--;
246 return o; 245 return o;
247 } 246 }
248 247
249 checkCommitResponse(api.CommitResponse o) { 248 checkCommitResponse(api.CommitResponse o) {
250 buildCounterCommitResponse++; 249 buildCounterCommitResponse++;
251 if (buildCounterCommitResponse < 3) { 250 if (buildCounterCommitResponse < 3) {
252 unittest.expect(o.indexUpdates, unittest.equals(42)); 251 unittest.expect(o.indexUpdates, unittest.equals(42));
253 checkUnnamed635(o.mutationResults); 252 checkUnnamed634(o.mutationResults);
254 } 253 }
255 buildCounterCommitResponse--; 254 buildCounterCommitResponse--;
256 } 255 }
257 256
258 buildUnnamed636() { 257 buildUnnamed635() {
259 var o = new core.List<api.Filter>(); 258 var o = new core.List<api.Filter>();
260 o.add(buildFilter()); 259 o.add(buildFilter());
261 o.add(buildFilter()); 260 o.add(buildFilter());
262 return o; 261 return o;
263 } 262 }
264 263
265 checkUnnamed636(core.List<api.Filter> o) { 264 checkUnnamed635(core.List<api.Filter> o) {
266 unittest.expect(o, unittest.hasLength(2)); 265 unittest.expect(o, unittest.hasLength(2));
267 checkFilter(o[0]); 266 checkFilter(o[0]);
268 checkFilter(o[1]); 267 checkFilter(o[1]);
269 } 268 }
270 269
271 core.int buildCounterCompositeFilter = 0; 270 core.int buildCounterCompositeFilter = 0;
272 buildCompositeFilter() { 271 buildCompositeFilter() {
273 var o = new api.CompositeFilter(); 272 var o = new api.CompositeFilter();
274 buildCounterCompositeFilter++; 273 buildCounterCompositeFilter++;
275 if (buildCounterCompositeFilter < 3) { 274 if (buildCounterCompositeFilter < 3) {
276 o.filters = buildUnnamed636(); 275 o.filters = buildUnnamed635();
277 o.op = "foo"; 276 o.op = "foo";
278 } 277 }
279 buildCounterCompositeFilter--; 278 buildCounterCompositeFilter--;
280 return o; 279 return o;
281 } 280 }
282 281
283 checkCompositeFilter(api.CompositeFilter o) { 282 checkCompositeFilter(api.CompositeFilter o) {
284 buildCounterCompositeFilter++; 283 buildCounterCompositeFilter++;
285 if (buildCounterCompositeFilter < 3) { 284 if (buildCounterCompositeFilter < 3) {
286 checkUnnamed636(o.filters); 285 checkUnnamed635(o.filters);
287 unittest.expect(o.op, unittest.equals('foo')); 286 unittest.expect(o.op, unittest.equals('foo'));
288 } 287 }
289 buildCounterCompositeFilter--; 288 buildCounterCompositeFilter--;
290 } 289 }
291 290
292 core.int buildCounterEmpty = 0; 291 core.int buildCounterEmpty = 0;
293 buildEmpty() { 292 buildEmpty() {
294 var o = new api.Empty(); 293 var o = new api.Empty();
295 buildCounterEmpty++; 294 buildCounterEmpty++;
296 if (buildCounterEmpty < 3) { 295 if (buildCounterEmpty < 3) {}
297 }
298 buildCounterEmpty--; 296 buildCounterEmpty--;
299 return o; 297 return o;
300 } 298 }
301 299
302 checkEmpty(api.Empty o) { 300 checkEmpty(api.Empty o) {
303 buildCounterEmpty++; 301 buildCounterEmpty++;
304 if (buildCounterEmpty < 3) { 302 if (buildCounterEmpty < 3) {}
305 }
306 buildCounterEmpty--; 303 buildCounterEmpty--;
307 } 304 }
308 305
309 buildUnnamed637() { 306 buildUnnamed636() {
310 var o = new core.Map<core.String, api.Value>(); 307 var o = new core.Map<core.String, api.Value>();
311 o["x"] = buildValue(); 308 o["x"] = buildValue();
312 o["y"] = buildValue(); 309 o["y"] = buildValue();
313 return o; 310 return o;
314 } 311 }
315 312
316 checkUnnamed637(core.Map<core.String, api.Value> o) { 313 checkUnnamed636(core.Map<core.String, api.Value> o) {
317 unittest.expect(o, unittest.hasLength(2)); 314 unittest.expect(o, unittest.hasLength(2));
318 checkValue(o["x"]); 315 checkValue(o["x"]);
319 checkValue(o["y"]); 316 checkValue(o["y"]);
320 } 317 }
321 318
322 core.int buildCounterEntity = 0; 319 core.int buildCounterEntity = 0;
323 buildEntity() { 320 buildEntity() {
324 var o = new api.Entity(); 321 var o = new api.Entity();
325 buildCounterEntity++; 322 buildCounterEntity++;
326 if (buildCounterEntity < 3) { 323 if (buildCounterEntity < 3) {
327 o.key = buildKey(); 324 o.key = buildKey();
328 o.properties = buildUnnamed637(); 325 o.properties = buildUnnamed636();
329 } 326 }
330 buildCounterEntity--; 327 buildCounterEntity--;
331 return o; 328 return o;
332 } 329 }
333 330
334 checkEntity(api.Entity o) { 331 checkEntity(api.Entity o) {
335 buildCounterEntity++; 332 buildCounterEntity++;
336 if (buildCounterEntity < 3) { 333 if (buildCounterEntity < 3) {
337 checkKey(o.key); 334 checkKey(o.key);
338 checkUnnamed637(o.properties); 335 checkUnnamed636(o.properties);
339 } 336 }
340 buildCounterEntity--; 337 buildCounterEntity--;
341 } 338 }
342 339
343 core.int buildCounterEntityResult = 0; 340 core.int buildCounterEntityResult = 0;
344 buildEntityResult() { 341 buildEntityResult() {
345 var o = new api.EntityResult(); 342 var o = new api.EntityResult();
346 buildCounterEntityResult++; 343 buildCounterEntityResult++;
347 if (buildCounterEntityResult < 3) { 344 if (buildCounterEntityResult < 3) {
348 o.cursor = "foo"; 345 o.cursor = "foo";
(...skipping 28 matching lines...) Expand all
377 374
378 checkFilter(api.Filter o) { 375 checkFilter(api.Filter o) {
379 buildCounterFilter++; 376 buildCounterFilter++;
380 if (buildCounterFilter < 3) { 377 if (buildCounterFilter < 3) {
381 checkCompositeFilter(o.compositeFilter); 378 checkCompositeFilter(o.compositeFilter);
382 checkPropertyFilter(o.propertyFilter); 379 checkPropertyFilter(o.propertyFilter);
383 } 380 }
384 buildCounterFilter--; 381 buildCounterFilter--;
385 } 382 }
386 383
387 buildUnnamed638() { 384 buildUnnamed637() {
388 var o = new core.Map<core.String, core.String>(); 385 var o = new core.Map<core.String, core.String>();
389 o["x"] = "foo"; 386 o["x"] = "foo";
390 o["y"] = "foo"; 387 o["y"] = "foo";
391 return o; 388 return o;
392 } 389 }
393 390
394 checkUnnamed638(core.Map<core.String, core.String> o) { 391 checkUnnamed637(core.Map<core.String, core.String> o) {
395 unittest.expect(o, unittest.hasLength(2)); 392 unittest.expect(o, unittest.hasLength(2));
396 unittest.expect(o["x"], unittest.equals('foo')); 393 unittest.expect(o["x"], unittest.equals('foo'));
397 unittest.expect(o["y"], unittest.equals('foo')); 394 unittest.expect(o["y"], unittest.equals('foo'));
398 } 395 }
399 396
400 core.int buildCounterGoogleDatastoreAdminV1beta1CommonMetadata = 0; 397 core.int buildCounterGoogleDatastoreAdminV1beta1CommonMetadata = 0;
401 buildGoogleDatastoreAdminV1beta1CommonMetadata() { 398 buildGoogleDatastoreAdminV1beta1CommonMetadata() {
402 var o = new api.GoogleDatastoreAdminV1beta1CommonMetadata(); 399 var o = new api.GoogleDatastoreAdminV1beta1CommonMetadata();
403 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata++; 400 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata++;
404 if (buildCounterGoogleDatastoreAdminV1beta1CommonMetadata < 3) { 401 if (buildCounterGoogleDatastoreAdminV1beta1CommonMetadata < 3) {
405 o.endTime = "foo"; 402 o.endTime = "foo";
406 o.labels = buildUnnamed638(); 403 o.labels = buildUnnamed637();
407 o.operationType = "foo"; 404 o.operationType = "foo";
408 o.startTime = "foo"; 405 o.startTime = "foo";
409 o.state = "foo"; 406 o.state = "foo";
410 } 407 }
411 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata--; 408 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata--;
412 return o; 409 return o;
413 } 410 }
414 411
415 checkGoogleDatastoreAdminV1beta1CommonMetadata(api.GoogleDatastoreAdminV1beta1Co mmonMetadata o) { 412 checkGoogleDatastoreAdminV1beta1CommonMetadata(
413 api.GoogleDatastoreAdminV1beta1CommonMetadata o) {
416 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata++; 414 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata++;
417 if (buildCounterGoogleDatastoreAdminV1beta1CommonMetadata < 3) { 415 if (buildCounterGoogleDatastoreAdminV1beta1CommonMetadata < 3) {
418 unittest.expect(o.endTime, unittest.equals('foo')); 416 unittest.expect(o.endTime, unittest.equals('foo'));
419 checkUnnamed638(o.labels); 417 checkUnnamed637(o.labels);
420 unittest.expect(o.operationType, unittest.equals('foo')); 418 unittest.expect(o.operationType, unittest.equals('foo'));
421 unittest.expect(o.startTime, unittest.equals('foo')); 419 unittest.expect(o.startTime, unittest.equals('foo'));
422 unittest.expect(o.state, unittest.equals('foo')); 420 unittest.expect(o.state, unittest.equals('foo'));
423 } 421 }
424 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata--; 422 buildCounterGoogleDatastoreAdminV1beta1CommonMetadata--;
425 } 423 }
426 424
425 buildUnnamed638() {
426 var o = new core.List<core.String>();
427 o.add("foo");
428 o.add("foo");
429 return o;
430 }
431
432 checkUnnamed638(core.List<core.String> o) {
433 unittest.expect(o, unittest.hasLength(2));
434 unittest.expect(o[0], unittest.equals('foo'));
435 unittest.expect(o[1], unittest.equals('foo'));
436 }
437
427 buildUnnamed639() { 438 buildUnnamed639() {
428 var o = new core.List<core.String>(); 439 var o = new core.List<core.String>();
429 o.add("foo"); 440 o.add("foo");
430 o.add("foo"); 441 o.add("foo");
431 return o; 442 return o;
432 } 443 }
433 444
434 checkUnnamed639(core.List<core.String> o) { 445 checkUnnamed639(core.List<core.String> o) {
435 unittest.expect(o, unittest.hasLength(2)); 446 unittest.expect(o, unittest.hasLength(2));
436 unittest.expect(o[0], unittest.equals('foo')); 447 unittest.expect(o[0], unittest.equals('foo'));
437 unittest.expect(o[1], unittest.equals('foo')); 448 unittest.expect(o[1], unittest.equals('foo'));
438 }
439
440 buildUnnamed640() {
441 var o = new core.List<core.String>();
442 o.add("foo");
443 o.add("foo");
444 return o;
445 }
446
447 checkUnnamed640(core.List<core.String> o) {
448 unittest.expect(o, unittest.hasLength(2));
449 unittest.expect(o[0], unittest.equals('foo'));
450 unittest.expect(o[1], unittest.equals('foo'));
451 } 449 }
452 450
453 core.int buildCounterGoogleDatastoreAdminV1beta1EntityFilter = 0; 451 core.int buildCounterGoogleDatastoreAdminV1beta1EntityFilter = 0;
454 buildGoogleDatastoreAdminV1beta1EntityFilter() { 452 buildGoogleDatastoreAdminV1beta1EntityFilter() {
455 var o = new api.GoogleDatastoreAdminV1beta1EntityFilter(); 453 var o = new api.GoogleDatastoreAdminV1beta1EntityFilter();
456 buildCounterGoogleDatastoreAdminV1beta1EntityFilter++; 454 buildCounterGoogleDatastoreAdminV1beta1EntityFilter++;
457 if (buildCounterGoogleDatastoreAdminV1beta1EntityFilter < 3) { 455 if (buildCounterGoogleDatastoreAdminV1beta1EntityFilter < 3) {
458 o.kinds = buildUnnamed639(); 456 o.kinds = buildUnnamed638();
459 o.namespaceIds = buildUnnamed640(); 457 o.namespaceIds = buildUnnamed639();
460 } 458 }
461 buildCounterGoogleDatastoreAdminV1beta1EntityFilter--; 459 buildCounterGoogleDatastoreAdminV1beta1EntityFilter--;
462 return o; 460 return o;
463 } 461 }
464 462
465 checkGoogleDatastoreAdminV1beta1EntityFilter(api.GoogleDatastoreAdminV1beta1Enti tyFilter o) { 463 checkGoogleDatastoreAdminV1beta1EntityFilter(
464 api.GoogleDatastoreAdminV1beta1EntityFilter o) {
466 buildCounterGoogleDatastoreAdminV1beta1EntityFilter++; 465 buildCounterGoogleDatastoreAdminV1beta1EntityFilter++;
467 if (buildCounterGoogleDatastoreAdminV1beta1EntityFilter < 3) { 466 if (buildCounterGoogleDatastoreAdminV1beta1EntityFilter < 3) {
468 checkUnnamed639(o.kinds); 467 checkUnnamed638(o.kinds);
469 checkUnnamed640(o.namespaceIds); 468 checkUnnamed639(o.namespaceIds);
470 } 469 }
471 buildCounterGoogleDatastoreAdminV1beta1EntityFilter--; 470 buildCounterGoogleDatastoreAdminV1beta1EntityFilter--;
472 } 471 }
473 472
474 core.int buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata = 0; 473 core.int buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata = 0;
475 buildGoogleDatastoreAdminV1beta1ExportEntitiesMetadata() { 474 buildGoogleDatastoreAdminV1beta1ExportEntitiesMetadata() {
476 var o = new api.GoogleDatastoreAdminV1beta1ExportEntitiesMetadata(); 475 var o = new api.GoogleDatastoreAdminV1beta1ExportEntitiesMetadata();
477 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata++; 476 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata++;
478 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata < 3) { 477 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata < 3) {
479 o.common = buildGoogleDatastoreAdminV1beta1CommonMetadata(); 478 o.common = buildGoogleDatastoreAdminV1beta1CommonMetadata();
480 o.entityFilter = buildGoogleDatastoreAdminV1beta1EntityFilter(); 479 o.entityFilter = buildGoogleDatastoreAdminV1beta1EntityFilter();
481 o.outputUrlPrefix = "foo"; 480 o.outputUrlPrefix = "foo";
482 o.progressBytes = buildGoogleDatastoreAdminV1beta1Progress(); 481 o.progressBytes = buildGoogleDatastoreAdminV1beta1Progress();
483 o.progressEntities = buildGoogleDatastoreAdminV1beta1Progress(); 482 o.progressEntities = buildGoogleDatastoreAdminV1beta1Progress();
484 } 483 }
485 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata--; 484 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata--;
486 return o; 485 return o;
487 } 486 }
488 487
489 checkGoogleDatastoreAdminV1beta1ExportEntitiesMetadata(api.GoogleDatastoreAdminV 1beta1ExportEntitiesMetadata o) { 488 checkGoogleDatastoreAdminV1beta1ExportEntitiesMetadata(
489 api.GoogleDatastoreAdminV1beta1ExportEntitiesMetadata o) {
490 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata++; 490 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata++;
491 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata < 3) { 491 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata < 3) {
492 checkGoogleDatastoreAdminV1beta1CommonMetadata(o.common); 492 checkGoogleDatastoreAdminV1beta1CommonMetadata(o.common);
493 checkGoogleDatastoreAdminV1beta1EntityFilter(o.entityFilter); 493 checkGoogleDatastoreAdminV1beta1EntityFilter(o.entityFilter);
494 unittest.expect(o.outputUrlPrefix, unittest.equals('foo')); 494 unittest.expect(o.outputUrlPrefix, unittest.equals('foo'));
495 checkGoogleDatastoreAdminV1beta1Progress(o.progressBytes); 495 checkGoogleDatastoreAdminV1beta1Progress(o.progressBytes);
496 checkGoogleDatastoreAdminV1beta1Progress(o.progressEntities); 496 checkGoogleDatastoreAdminV1beta1Progress(o.progressEntities);
497 } 497 }
498 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata--; 498 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesMetadata--;
499 } 499 }
500 500
501 core.int buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse = 0; 501 core.int buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse = 0;
502 buildGoogleDatastoreAdminV1beta1ExportEntitiesResponse() { 502 buildGoogleDatastoreAdminV1beta1ExportEntitiesResponse() {
503 var o = new api.GoogleDatastoreAdminV1beta1ExportEntitiesResponse(); 503 var o = new api.GoogleDatastoreAdminV1beta1ExportEntitiesResponse();
504 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse++; 504 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse++;
505 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse < 3) { 505 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse < 3) {
506 o.outputUrl = "foo"; 506 o.outputUrl = "foo";
507 } 507 }
508 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse--; 508 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse--;
509 return o; 509 return o;
510 } 510 }
511 511
512 checkGoogleDatastoreAdminV1beta1ExportEntitiesResponse(api.GoogleDatastoreAdminV 1beta1ExportEntitiesResponse o) { 512 checkGoogleDatastoreAdminV1beta1ExportEntitiesResponse(
513 api.GoogleDatastoreAdminV1beta1ExportEntitiesResponse o) {
513 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse++; 514 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse++;
514 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse < 3) { 515 if (buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse < 3) {
515 unittest.expect(o.outputUrl, unittest.equals('foo')); 516 unittest.expect(o.outputUrl, unittest.equals('foo'));
516 } 517 }
517 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse--; 518 buildCounterGoogleDatastoreAdminV1beta1ExportEntitiesResponse--;
518 } 519 }
519 520
520 core.int buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata = 0; 521 core.int buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata = 0;
521 buildGoogleDatastoreAdminV1beta1ImportEntitiesMetadata() { 522 buildGoogleDatastoreAdminV1beta1ImportEntitiesMetadata() {
522 var o = new api.GoogleDatastoreAdminV1beta1ImportEntitiesMetadata(); 523 var o = new api.GoogleDatastoreAdminV1beta1ImportEntitiesMetadata();
523 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata++; 524 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata++;
524 if (buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata < 3) { 525 if (buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata < 3) {
525 o.common = buildGoogleDatastoreAdminV1beta1CommonMetadata(); 526 o.common = buildGoogleDatastoreAdminV1beta1CommonMetadata();
526 o.entityFilter = buildGoogleDatastoreAdminV1beta1EntityFilter(); 527 o.entityFilter = buildGoogleDatastoreAdminV1beta1EntityFilter();
527 o.inputUrl = "foo"; 528 o.inputUrl = "foo";
528 o.progressBytes = buildGoogleDatastoreAdminV1beta1Progress(); 529 o.progressBytes = buildGoogleDatastoreAdminV1beta1Progress();
529 o.progressEntities = buildGoogleDatastoreAdminV1beta1Progress(); 530 o.progressEntities = buildGoogleDatastoreAdminV1beta1Progress();
530 } 531 }
531 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata--; 532 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata--;
532 return o; 533 return o;
533 } 534 }
534 535
535 checkGoogleDatastoreAdminV1beta1ImportEntitiesMetadata(api.GoogleDatastoreAdminV 1beta1ImportEntitiesMetadata o) { 536 checkGoogleDatastoreAdminV1beta1ImportEntitiesMetadata(
537 api.GoogleDatastoreAdminV1beta1ImportEntitiesMetadata o) {
536 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata++; 538 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata++;
537 if (buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata < 3) { 539 if (buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata < 3) {
538 checkGoogleDatastoreAdminV1beta1CommonMetadata(o.common); 540 checkGoogleDatastoreAdminV1beta1CommonMetadata(o.common);
539 checkGoogleDatastoreAdminV1beta1EntityFilter(o.entityFilter); 541 checkGoogleDatastoreAdminV1beta1EntityFilter(o.entityFilter);
540 unittest.expect(o.inputUrl, unittest.equals('foo')); 542 unittest.expect(o.inputUrl, unittest.equals('foo'));
541 checkGoogleDatastoreAdminV1beta1Progress(o.progressBytes); 543 checkGoogleDatastoreAdminV1beta1Progress(o.progressBytes);
542 checkGoogleDatastoreAdminV1beta1Progress(o.progressEntities); 544 checkGoogleDatastoreAdminV1beta1Progress(o.progressEntities);
543 } 545 }
544 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata--; 546 buildCounterGoogleDatastoreAdminV1beta1ImportEntitiesMetadata--;
545 } 547 }
546 548
547 core.int buildCounterGoogleDatastoreAdminV1beta1Progress = 0; 549 core.int buildCounterGoogleDatastoreAdminV1beta1Progress = 0;
548 buildGoogleDatastoreAdminV1beta1Progress() { 550 buildGoogleDatastoreAdminV1beta1Progress() {
549 var o = new api.GoogleDatastoreAdminV1beta1Progress(); 551 var o = new api.GoogleDatastoreAdminV1beta1Progress();
550 buildCounterGoogleDatastoreAdminV1beta1Progress++; 552 buildCounterGoogleDatastoreAdminV1beta1Progress++;
551 if (buildCounterGoogleDatastoreAdminV1beta1Progress < 3) { 553 if (buildCounterGoogleDatastoreAdminV1beta1Progress < 3) {
552 o.workCompleted = "foo"; 554 o.workCompleted = "foo";
553 o.workEstimated = "foo"; 555 o.workEstimated = "foo";
554 } 556 }
555 buildCounterGoogleDatastoreAdminV1beta1Progress--; 557 buildCounterGoogleDatastoreAdminV1beta1Progress--;
556 return o; 558 return o;
557 } 559 }
558 560
559 checkGoogleDatastoreAdminV1beta1Progress(api.GoogleDatastoreAdminV1beta1Progress o) { 561 checkGoogleDatastoreAdminV1beta1Progress(
562 api.GoogleDatastoreAdminV1beta1Progress o) {
560 buildCounterGoogleDatastoreAdminV1beta1Progress++; 563 buildCounterGoogleDatastoreAdminV1beta1Progress++;
561 if (buildCounterGoogleDatastoreAdminV1beta1Progress < 3) { 564 if (buildCounterGoogleDatastoreAdminV1beta1Progress < 3) {
562 unittest.expect(o.workCompleted, unittest.equals('foo')); 565 unittest.expect(o.workCompleted, unittest.equals('foo'));
563 unittest.expect(o.workEstimated, unittest.equals('foo')); 566 unittest.expect(o.workEstimated, unittest.equals('foo'));
564 } 567 }
565 buildCounterGoogleDatastoreAdminV1beta1Progress--; 568 buildCounterGoogleDatastoreAdminV1beta1Progress--;
566 } 569 }
567 570
568 buildUnnamed641() { 571 buildUnnamed640() {
569 var o = new core.List<api.GoogleLongrunningOperation>(); 572 var o = new core.List<api.GoogleLongrunningOperation>();
570 o.add(buildGoogleLongrunningOperation()); 573 o.add(buildGoogleLongrunningOperation());
571 o.add(buildGoogleLongrunningOperation()); 574 o.add(buildGoogleLongrunningOperation());
572 return o; 575 return o;
573 } 576 }
574 577
575 checkUnnamed641(core.List<api.GoogleLongrunningOperation> o) { 578 checkUnnamed640(core.List<api.GoogleLongrunningOperation> o) {
576 unittest.expect(o, unittest.hasLength(2)); 579 unittest.expect(o, unittest.hasLength(2));
577 checkGoogleLongrunningOperation(o[0]); 580 checkGoogleLongrunningOperation(o[0]);
578 checkGoogleLongrunningOperation(o[1]); 581 checkGoogleLongrunningOperation(o[1]);
579 } 582 }
580 583
581 core.int buildCounterGoogleLongrunningListOperationsResponse = 0; 584 core.int buildCounterGoogleLongrunningListOperationsResponse = 0;
582 buildGoogleLongrunningListOperationsResponse() { 585 buildGoogleLongrunningListOperationsResponse() {
583 var o = new api.GoogleLongrunningListOperationsResponse(); 586 var o = new api.GoogleLongrunningListOperationsResponse();
584 buildCounterGoogleLongrunningListOperationsResponse++; 587 buildCounterGoogleLongrunningListOperationsResponse++;
585 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { 588 if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
586 o.nextPageToken = "foo"; 589 o.nextPageToken = "foo";
587 o.operations = buildUnnamed641(); 590 o.operations = buildUnnamed640();
588 } 591 }
589 buildCounterGoogleLongrunningListOperationsResponse--; 592 buildCounterGoogleLongrunningListOperationsResponse--;
590 return o; 593 return o;
591 } 594 }
592 595
593 checkGoogleLongrunningListOperationsResponse(api.GoogleLongrunningListOperations Response o) { 596 checkGoogleLongrunningListOperationsResponse(
597 api.GoogleLongrunningListOperationsResponse o) {
594 buildCounterGoogleLongrunningListOperationsResponse++; 598 buildCounterGoogleLongrunningListOperationsResponse++;
595 if (buildCounterGoogleLongrunningListOperationsResponse < 3) { 599 if (buildCounterGoogleLongrunningListOperationsResponse < 3) {
596 unittest.expect(o.nextPageToken, unittest.equals('foo')); 600 unittest.expect(o.nextPageToken, unittest.equals('foo'));
597 checkUnnamed641(o.operations); 601 checkUnnamed640(o.operations);
598 } 602 }
599 buildCounterGoogleLongrunningListOperationsResponse--; 603 buildCounterGoogleLongrunningListOperationsResponse--;
600 } 604 }
601 605
606 buildUnnamed641() {
607 var o = new core.Map<core.String, core.Object>();
608 o["x"] = {
609 'list': [1, 2, 3],
610 'bool': true,
611 'string': 'foo'
612 };
613 o["y"] = {
614 'list': [1, 2, 3],
615 'bool': true,
616 'string': 'foo'
617 };
618 return o;
619 }
620
621 checkUnnamed641(core.Map<core.String, core.Object> o) {
622 unittest.expect(o, unittest.hasLength(2));
623 var casted1 = (o["x"]) as core.Map;
624 unittest.expect(casted1, unittest.hasLength(3));
625 unittest.expect(casted1["list"], unittest.equals([1, 2, 3]));
626 unittest.expect(casted1["bool"], unittest.equals(true));
627 unittest.expect(casted1["string"], unittest.equals('foo'));
628 var casted2 = (o["y"]) as core.Map;
629 unittest.expect(casted2, unittest.hasLength(3));
630 unittest.expect(casted2["list"], unittest.equals([1, 2, 3]));
631 unittest.expect(casted2["bool"], unittest.equals(true));
632 unittest.expect(casted2["string"], unittest.equals('foo'));
633 }
634
602 buildUnnamed642() { 635 buildUnnamed642() {
603 var o = new core.Map<core.String, core.Object>(); 636 var o = new core.Map<core.String, core.Object>();
604 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 637 o["x"] = {
605 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 638 'list': [1, 2, 3],
639 'bool': true,
640 'string': 'foo'
641 };
642 o["y"] = {
643 'list': [1, 2, 3],
644 'bool': true,
645 'string': 'foo'
646 };
606 return o; 647 return o;
607 } 648 }
608 649
609 checkUnnamed642(core.Map<core.String, core.Object> o) { 650 checkUnnamed642(core.Map<core.String, core.Object> o) {
610 unittest.expect(o, unittest.hasLength(2)); 651 unittest.expect(o, unittest.hasLength(2));
611 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')); 652 var casted3 = (o["x"]) as core.Map;
612 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')); 653 unittest.expect(casted3, unittest.hasLength(3));
613 } 654 unittest.expect(casted3["list"], unittest.equals([1, 2, 3]));
614 655 unittest.expect(casted3["bool"], unittest.equals(true));
615 buildUnnamed643() { 656 unittest.expect(casted3["string"], unittest.equals('foo'));
616 var o = new core.Map<core.String, core.Object>(); 657 var casted4 = (o["y"]) as core.Map;
617 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 658 unittest.expect(casted4, unittest.hasLength(3));
618 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 659 unittest.expect(casted4["list"], unittest.equals([1, 2, 3]));
619 return o; 660 unittest.expect(casted4["bool"], unittest.equals(true));
620 } 661 unittest.expect(casted4["string"], unittest.equals('foo'));
621
622 checkUnnamed643(core.Map<core.String, core.Object> o) {
623 unittest.expect(o, unittest.hasLength(2));
624 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'));
625 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'));
626 } 662 }
627 663
628 core.int buildCounterGoogleLongrunningOperation = 0; 664 core.int buildCounterGoogleLongrunningOperation = 0;
629 buildGoogleLongrunningOperation() { 665 buildGoogleLongrunningOperation() {
630 var o = new api.GoogleLongrunningOperation(); 666 var o = new api.GoogleLongrunningOperation();
631 buildCounterGoogleLongrunningOperation++; 667 buildCounterGoogleLongrunningOperation++;
632 if (buildCounterGoogleLongrunningOperation < 3) { 668 if (buildCounterGoogleLongrunningOperation < 3) {
633 o.done = true; 669 o.done = true;
634 o.error = buildStatus(); 670 o.error = buildStatus();
635 o.metadata = buildUnnamed642(); 671 o.metadata = buildUnnamed641();
636 o.name = "foo"; 672 o.name = "foo";
637 o.response = buildUnnamed643(); 673 o.response = buildUnnamed642();
638 } 674 }
639 buildCounterGoogleLongrunningOperation--; 675 buildCounterGoogleLongrunningOperation--;
640 return o; 676 return o;
641 } 677 }
642 678
643 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) { 679 checkGoogleLongrunningOperation(api.GoogleLongrunningOperation o) {
644 buildCounterGoogleLongrunningOperation++; 680 buildCounterGoogleLongrunningOperation++;
645 if (buildCounterGoogleLongrunningOperation < 3) { 681 if (buildCounterGoogleLongrunningOperation < 3) {
646 unittest.expect(o.done, unittest.isTrue); 682 unittest.expect(o.done, unittest.isTrue);
647 checkStatus(o.error); 683 checkStatus(o.error);
648 checkUnnamed642(o.metadata); 684 checkUnnamed641(o.metadata);
649 unittest.expect(o.name, unittest.equals('foo')); 685 unittest.expect(o.name, unittest.equals('foo'));
650 checkUnnamed643(o.response); 686 checkUnnamed642(o.response);
651 } 687 }
652 buildCounterGoogleLongrunningOperation--; 688 buildCounterGoogleLongrunningOperation--;
653 } 689 }
654 690
655 buildUnnamed644() { 691 buildUnnamed643() {
656 var o = new core.Map<core.String, api.GqlQueryParameter>(); 692 var o = new core.Map<core.String, api.GqlQueryParameter>();
657 o["x"] = buildGqlQueryParameter(); 693 o["x"] = buildGqlQueryParameter();
658 o["y"] = buildGqlQueryParameter(); 694 o["y"] = buildGqlQueryParameter();
659 return o; 695 return o;
660 } 696 }
661 697
662 checkUnnamed644(core.Map<core.String, api.GqlQueryParameter> o) { 698 checkUnnamed643(core.Map<core.String, api.GqlQueryParameter> o) {
663 unittest.expect(o, unittest.hasLength(2)); 699 unittest.expect(o, unittest.hasLength(2));
664 checkGqlQueryParameter(o["x"]); 700 checkGqlQueryParameter(o["x"]);
665 checkGqlQueryParameter(o["y"]); 701 checkGqlQueryParameter(o["y"]);
666 } 702 }
667 703
668 buildUnnamed645() { 704 buildUnnamed644() {
669 var o = new core.List<api.GqlQueryParameter>(); 705 var o = new core.List<api.GqlQueryParameter>();
670 o.add(buildGqlQueryParameter()); 706 o.add(buildGqlQueryParameter());
671 o.add(buildGqlQueryParameter()); 707 o.add(buildGqlQueryParameter());
672 return o; 708 return o;
673 } 709 }
674 710
675 checkUnnamed645(core.List<api.GqlQueryParameter> o) { 711 checkUnnamed644(core.List<api.GqlQueryParameter> o) {
676 unittest.expect(o, unittest.hasLength(2)); 712 unittest.expect(o, unittest.hasLength(2));
677 checkGqlQueryParameter(o[0]); 713 checkGqlQueryParameter(o[0]);
678 checkGqlQueryParameter(o[1]); 714 checkGqlQueryParameter(o[1]);
679 } 715 }
680 716
681 core.int buildCounterGqlQuery = 0; 717 core.int buildCounterGqlQuery = 0;
682 buildGqlQuery() { 718 buildGqlQuery() {
683 var o = new api.GqlQuery(); 719 var o = new api.GqlQuery();
684 buildCounterGqlQuery++; 720 buildCounterGqlQuery++;
685 if (buildCounterGqlQuery < 3) { 721 if (buildCounterGqlQuery < 3) {
686 o.allowLiterals = true; 722 o.allowLiterals = true;
687 o.namedBindings = buildUnnamed644(); 723 o.namedBindings = buildUnnamed643();
688 o.positionalBindings = buildUnnamed645(); 724 o.positionalBindings = buildUnnamed644();
689 o.queryString = "foo"; 725 o.queryString = "foo";
690 } 726 }
691 buildCounterGqlQuery--; 727 buildCounterGqlQuery--;
692 return o; 728 return o;
693 } 729 }
694 730
695 checkGqlQuery(api.GqlQuery o) { 731 checkGqlQuery(api.GqlQuery o) {
696 buildCounterGqlQuery++; 732 buildCounterGqlQuery++;
697 if (buildCounterGqlQuery < 3) { 733 if (buildCounterGqlQuery < 3) {
698 unittest.expect(o.allowLiterals, unittest.isTrue); 734 unittest.expect(o.allowLiterals, unittest.isTrue);
699 checkUnnamed644(o.namedBindings); 735 checkUnnamed643(o.namedBindings);
700 checkUnnamed645(o.positionalBindings); 736 checkUnnamed644(o.positionalBindings);
701 unittest.expect(o.queryString, unittest.equals('foo')); 737 unittest.expect(o.queryString, unittest.equals('foo'));
702 } 738 }
703 buildCounterGqlQuery--; 739 buildCounterGqlQuery--;
704 } 740 }
705 741
706 core.int buildCounterGqlQueryParameter = 0; 742 core.int buildCounterGqlQueryParameter = 0;
707 buildGqlQueryParameter() { 743 buildGqlQueryParameter() {
708 var o = new api.GqlQueryParameter(); 744 var o = new api.GqlQueryParameter();
709 buildCounterGqlQueryParameter++; 745 buildCounterGqlQueryParameter++;
710 if (buildCounterGqlQueryParameter < 3) { 746 if (buildCounterGqlQueryParameter < 3) {
711 o.cursor = "foo"; 747 o.cursor = "foo";
712 o.value = buildValue(); 748 o.value = buildValue();
713 } 749 }
714 buildCounterGqlQueryParameter--; 750 buildCounterGqlQueryParameter--;
715 return o; 751 return o;
716 } 752 }
717 753
718 checkGqlQueryParameter(api.GqlQueryParameter o) { 754 checkGqlQueryParameter(api.GqlQueryParameter o) {
719 buildCounterGqlQueryParameter++; 755 buildCounterGqlQueryParameter++;
720 if (buildCounterGqlQueryParameter < 3) { 756 if (buildCounterGqlQueryParameter < 3) {
721 unittest.expect(o.cursor, unittest.equals('foo')); 757 unittest.expect(o.cursor, unittest.equals('foo'));
722 checkValue(o.value); 758 checkValue(o.value);
723 } 759 }
724 buildCounterGqlQueryParameter--; 760 buildCounterGqlQueryParameter--;
725 } 761 }
726 762
727 buildUnnamed646() { 763 buildUnnamed645() {
728 var o = new core.List<api.PathElement>(); 764 var o = new core.List<api.PathElement>();
729 o.add(buildPathElement()); 765 o.add(buildPathElement());
730 o.add(buildPathElement()); 766 o.add(buildPathElement());
731 return o; 767 return o;
732 } 768 }
733 769
734 checkUnnamed646(core.List<api.PathElement> o) { 770 checkUnnamed645(core.List<api.PathElement> o) {
735 unittest.expect(o, unittest.hasLength(2)); 771 unittest.expect(o, unittest.hasLength(2));
736 checkPathElement(o[0]); 772 checkPathElement(o[0]);
737 checkPathElement(o[1]); 773 checkPathElement(o[1]);
738 } 774 }
739 775
740 core.int buildCounterKey = 0; 776 core.int buildCounterKey = 0;
741 buildKey() { 777 buildKey() {
742 var o = new api.Key(); 778 var o = new api.Key();
743 buildCounterKey++; 779 buildCounterKey++;
744 if (buildCounterKey < 3) { 780 if (buildCounterKey < 3) {
745 o.partitionId = buildPartitionId(); 781 o.partitionId = buildPartitionId();
746 o.path = buildUnnamed646(); 782 o.path = buildUnnamed645();
747 } 783 }
748 buildCounterKey--; 784 buildCounterKey--;
749 return o; 785 return o;
750 } 786 }
751 787
752 checkKey(api.Key o) { 788 checkKey(api.Key o) {
753 buildCounterKey++; 789 buildCounterKey++;
754 if (buildCounterKey < 3) { 790 if (buildCounterKey < 3) {
755 checkPartitionId(o.partitionId); 791 checkPartitionId(o.partitionId);
756 checkUnnamed646(o.path); 792 checkUnnamed645(o.path);
757 } 793 }
758 buildCounterKey--; 794 buildCounterKey--;
759 } 795 }
760 796
761 core.int buildCounterKindExpression = 0; 797 core.int buildCounterKindExpression = 0;
762 buildKindExpression() { 798 buildKindExpression() {
763 var o = new api.KindExpression(); 799 var o = new api.KindExpression();
764 buildCounterKindExpression++; 800 buildCounterKindExpression++;
765 if (buildCounterKindExpression < 3) { 801 if (buildCounterKindExpression < 3) {
766 o.name = "foo"; 802 o.name = "foo";
(...skipping 24 matching lines...) Expand all
791 827
792 checkLatLng(api.LatLng o) { 828 checkLatLng(api.LatLng o) {
793 buildCounterLatLng++; 829 buildCounterLatLng++;
794 if (buildCounterLatLng < 3) { 830 if (buildCounterLatLng < 3) {
795 unittest.expect(o.latitude, unittest.equals(42.0)); 831 unittest.expect(o.latitude, unittest.equals(42.0));
796 unittest.expect(o.longitude, unittest.equals(42.0)); 832 unittest.expect(o.longitude, unittest.equals(42.0));
797 } 833 }
798 buildCounterLatLng--; 834 buildCounterLatLng--;
799 } 835 }
800 836
801 buildUnnamed647() { 837 buildUnnamed646() {
802 var o = new core.List<api.Key>(); 838 var o = new core.List<api.Key>();
803 o.add(buildKey()); 839 o.add(buildKey());
804 o.add(buildKey()); 840 o.add(buildKey());
805 return o; 841 return o;
806 } 842 }
807 843
808 checkUnnamed647(core.List<api.Key> o) { 844 checkUnnamed646(core.List<api.Key> o) {
809 unittest.expect(o, unittest.hasLength(2)); 845 unittest.expect(o, unittest.hasLength(2));
810 checkKey(o[0]); 846 checkKey(o[0]);
811 checkKey(o[1]); 847 checkKey(o[1]);
812 } 848 }
813 849
814 core.int buildCounterLookupRequest = 0; 850 core.int buildCounterLookupRequest = 0;
815 buildLookupRequest() { 851 buildLookupRequest() {
816 var o = new api.LookupRequest(); 852 var o = new api.LookupRequest();
817 buildCounterLookupRequest++; 853 buildCounterLookupRequest++;
818 if (buildCounterLookupRequest < 3) { 854 if (buildCounterLookupRequest < 3) {
819 o.keys = buildUnnamed647(); 855 o.keys = buildUnnamed646();
820 o.readOptions = buildReadOptions(); 856 o.readOptions = buildReadOptions();
821 } 857 }
822 buildCounterLookupRequest--; 858 buildCounterLookupRequest--;
823 return o; 859 return o;
824 } 860 }
825 861
826 checkLookupRequest(api.LookupRequest o) { 862 checkLookupRequest(api.LookupRequest o) {
827 buildCounterLookupRequest++; 863 buildCounterLookupRequest++;
828 if (buildCounterLookupRequest < 3) { 864 if (buildCounterLookupRequest < 3) {
829 checkUnnamed647(o.keys); 865 checkUnnamed646(o.keys);
830 checkReadOptions(o.readOptions); 866 checkReadOptions(o.readOptions);
831 } 867 }
832 buildCounterLookupRequest--; 868 buildCounterLookupRequest--;
833 } 869 }
834 870
835 buildUnnamed648() { 871 buildUnnamed647() {
836 var o = new core.List<api.Key>(); 872 var o = new core.List<api.Key>();
837 o.add(buildKey()); 873 o.add(buildKey());
838 o.add(buildKey()); 874 o.add(buildKey());
839 return o; 875 return o;
840 } 876 }
841 877
842 checkUnnamed648(core.List<api.Key> o) { 878 checkUnnamed647(core.List<api.Key> o) {
843 unittest.expect(o, unittest.hasLength(2)); 879 unittest.expect(o, unittest.hasLength(2));
844 checkKey(o[0]); 880 checkKey(o[0]);
845 checkKey(o[1]); 881 checkKey(o[1]);
846 } 882 }
847 883
884 buildUnnamed648() {
885 var o = new core.List<api.EntityResult>();
886 o.add(buildEntityResult());
887 o.add(buildEntityResult());
888 return o;
889 }
890
891 checkUnnamed648(core.List<api.EntityResult> o) {
892 unittest.expect(o, unittest.hasLength(2));
893 checkEntityResult(o[0]);
894 checkEntityResult(o[1]);
895 }
896
848 buildUnnamed649() { 897 buildUnnamed649() {
849 var o = new core.List<api.EntityResult>(); 898 var o = new core.List<api.EntityResult>();
850 o.add(buildEntityResult()); 899 o.add(buildEntityResult());
851 o.add(buildEntityResult()); 900 o.add(buildEntityResult());
852 return o; 901 return o;
853 } 902 }
854 903
855 checkUnnamed649(core.List<api.EntityResult> o) { 904 checkUnnamed649(core.List<api.EntityResult> o) {
856 unittest.expect(o, unittest.hasLength(2)); 905 unittest.expect(o, unittest.hasLength(2));
857 checkEntityResult(o[0]); 906 checkEntityResult(o[0]);
858 checkEntityResult(o[1]); 907 checkEntityResult(o[1]);
859 }
860
861 buildUnnamed650() {
862 var o = new core.List<api.EntityResult>();
863 o.add(buildEntityResult());
864 o.add(buildEntityResult());
865 return o;
866 }
867
868 checkUnnamed650(core.List<api.EntityResult> o) {
869 unittest.expect(o, unittest.hasLength(2));
870 checkEntityResult(o[0]);
871 checkEntityResult(o[1]);
872 } 908 }
873 909
874 core.int buildCounterLookupResponse = 0; 910 core.int buildCounterLookupResponse = 0;
875 buildLookupResponse() { 911 buildLookupResponse() {
876 var o = new api.LookupResponse(); 912 var o = new api.LookupResponse();
877 buildCounterLookupResponse++; 913 buildCounterLookupResponse++;
878 if (buildCounterLookupResponse < 3) { 914 if (buildCounterLookupResponse < 3) {
879 o.deferred = buildUnnamed648(); 915 o.deferred = buildUnnamed647();
880 o.found = buildUnnamed649(); 916 o.found = buildUnnamed648();
881 o.missing = buildUnnamed650(); 917 o.missing = buildUnnamed649();
882 } 918 }
883 buildCounterLookupResponse--; 919 buildCounterLookupResponse--;
884 return o; 920 return o;
885 } 921 }
886 922
887 checkLookupResponse(api.LookupResponse o) { 923 checkLookupResponse(api.LookupResponse o) {
888 buildCounterLookupResponse++; 924 buildCounterLookupResponse++;
889 if (buildCounterLookupResponse < 3) { 925 if (buildCounterLookupResponse < 3) {
890 checkUnnamed648(o.deferred); 926 checkUnnamed647(o.deferred);
891 checkUnnamed649(o.found); 927 checkUnnamed648(o.found);
892 checkUnnamed650(o.missing); 928 checkUnnamed649(o.missing);
893 } 929 }
894 buildCounterLookupResponse--; 930 buildCounterLookupResponse--;
895 } 931 }
896 932
897 core.int buildCounterMutation = 0; 933 core.int buildCounterMutation = 0;
898 buildMutation() { 934 buildMutation() {
899 var o = new api.Mutation(); 935 var o = new api.Mutation();
900 buildCounterMutation++; 936 buildCounterMutation++;
901 if (buildCounterMutation < 3) { 937 if (buildCounterMutation < 3) {
902 o.baseVersion = "foo"; 938 o.baseVersion = "foo";
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
1063 } 1099 }
1064 1100
1065 checkPropertyReference(api.PropertyReference o) { 1101 checkPropertyReference(api.PropertyReference o) {
1066 buildCounterPropertyReference++; 1102 buildCounterPropertyReference++;
1067 if (buildCounterPropertyReference < 3) { 1103 if (buildCounterPropertyReference < 3) {
1068 unittest.expect(o.name, unittest.equals('foo')); 1104 unittest.expect(o.name, unittest.equals('foo'));
1069 } 1105 }
1070 buildCounterPropertyReference--; 1106 buildCounterPropertyReference--;
1071 } 1107 }
1072 1108
1073 buildUnnamed651() { 1109 buildUnnamed650() {
1074 var o = new core.List<api.PropertyReference>(); 1110 var o = new core.List<api.PropertyReference>();
1075 o.add(buildPropertyReference()); 1111 o.add(buildPropertyReference());
1076 o.add(buildPropertyReference()); 1112 o.add(buildPropertyReference());
1077 return o; 1113 return o;
1078 } 1114 }
1079 1115
1080 checkUnnamed651(core.List<api.PropertyReference> o) { 1116 checkUnnamed650(core.List<api.PropertyReference> o) {
1081 unittest.expect(o, unittest.hasLength(2)); 1117 unittest.expect(o, unittest.hasLength(2));
1082 checkPropertyReference(o[0]); 1118 checkPropertyReference(o[0]);
1083 checkPropertyReference(o[1]); 1119 checkPropertyReference(o[1]);
1084 } 1120 }
1085 1121
1086 buildUnnamed652() { 1122 buildUnnamed651() {
1087 var o = new core.List<api.KindExpression>(); 1123 var o = new core.List<api.KindExpression>();
1088 o.add(buildKindExpression()); 1124 o.add(buildKindExpression());
1089 o.add(buildKindExpression()); 1125 o.add(buildKindExpression());
1090 return o; 1126 return o;
1091 } 1127 }
1092 1128
1093 checkUnnamed652(core.List<api.KindExpression> o) { 1129 checkUnnamed651(core.List<api.KindExpression> o) {
1094 unittest.expect(o, unittest.hasLength(2)); 1130 unittest.expect(o, unittest.hasLength(2));
1095 checkKindExpression(o[0]); 1131 checkKindExpression(o[0]);
1096 checkKindExpression(o[1]); 1132 checkKindExpression(o[1]);
1097 } 1133 }
1098 1134
1099 buildUnnamed653() { 1135 buildUnnamed652() {
1100 var o = new core.List<api.PropertyOrder>(); 1136 var o = new core.List<api.PropertyOrder>();
1101 o.add(buildPropertyOrder()); 1137 o.add(buildPropertyOrder());
1102 o.add(buildPropertyOrder()); 1138 o.add(buildPropertyOrder());
1103 return o; 1139 return o;
1104 } 1140 }
1105 1141
1106 checkUnnamed653(core.List<api.PropertyOrder> o) { 1142 checkUnnamed652(core.List<api.PropertyOrder> o) {
1107 unittest.expect(o, unittest.hasLength(2)); 1143 unittest.expect(o, unittest.hasLength(2));
1108 checkPropertyOrder(o[0]); 1144 checkPropertyOrder(o[0]);
1109 checkPropertyOrder(o[1]); 1145 checkPropertyOrder(o[1]);
1110 } 1146 }
1111 1147
1112 buildUnnamed654() { 1148 buildUnnamed653() {
1113 var o = new core.List<api.Projection>(); 1149 var o = new core.List<api.Projection>();
1114 o.add(buildProjection()); 1150 o.add(buildProjection());
1115 o.add(buildProjection()); 1151 o.add(buildProjection());
1116 return o; 1152 return o;
1117 } 1153 }
1118 1154
1119 checkUnnamed654(core.List<api.Projection> o) { 1155 checkUnnamed653(core.List<api.Projection> o) {
1120 unittest.expect(o, unittest.hasLength(2)); 1156 unittest.expect(o, unittest.hasLength(2));
1121 checkProjection(o[0]); 1157 checkProjection(o[0]);
1122 checkProjection(o[1]); 1158 checkProjection(o[1]);
1123 } 1159 }
1124 1160
1125 core.int buildCounterQuery = 0; 1161 core.int buildCounterQuery = 0;
1126 buildQuery() { 1162 buildQuery() {
1127 var o = new api.Query(); 1163 var o = new api.Query();
1128 buildCounterQuery++; 1164 buildCounterQuery++;
1129 if (buildCounterQuery < 3) { 1165 if (buildCounterQuery < 3) {
1130 o.distinctOn = buildUnnamed651(); 1166 o.distinctOn = buildUnnamed650();
1131 o.endCursor = "foo"; 1167 o.endCursor = "foo";
1132 o.filter = buildFilter(); 1168 o.filter = buildFilter();
1133 o.kind = buildUnnamed652(); 1169 o.kind = buildUnnamed651();
1134 o.limit = 42; 1170 o.limit = 42;
1135 o.offset = 42; 1171 o.offset = 42;
1136 o.order = buildUnnamed653(); 1172 o.order = buildUnnamed652();
1137 o.projection = buildUnnamed654(); 1173 o.projection = buildUnnamed653();
1138 o.startCursor = "foo"; 1174 o.startCursor = "foo";
1139 } 1175 }
1140 buildCounterQuery--; 1176 buildCounterQuery--;
1141 return o; 1177 return o;
1142 } 1178 }
1143 1179
1144 checkQuery(api.Query o) { 1180 checkQuery(api.Query o) {
1145 buildCounterQuery++; 1181 buildCounterQuery++;
1146 if (buildCounterQuery < 3) { 1182 if (buildCounterQuery < 3) {
1147 checkUnnamed651(o.distinctOn); 1183 checkUnnamed650(o.distinctOn);
1148 unittest.expect(o.endCursor, unittest.equals('foo')); 1184 unittest.expect(o.endCursor, unittest.equals('foo'));
1149 checkFilter(o.filter); 1185 checkFilter(o.filter);
1150 checkUnnamed652(o.kind); 1186 checkUnnamed651(o.kind);
1151 unittest.expect(o.limit, unittest.equals(42)); 1187 unittest.expect(o.limit, unittest.equals(42));
1152 unittest.expect(o.offset, unittest.equals(42)); 1188 unittest.expect(o.offset, unittest.equals(42));
1153 checkUnnamed653(o.order); 1189 checkUnnamed652(o.order);
1154 checkUnnamed654(o.projection); 1190 checkUnnamed653(o.projection);
1155 unittest.expect(o.startCursor, unittest.equals('foo')); 1191 unittest.expect(o.startCursor, unittest.equals('foo'));
1156 } 1192 }
1157 buildCounterQuery--; 1193 buildCounterQuery--;
1158 } 1194 }
1159 1195
1160 buildUnnamed655() { 1196 buildUnnamed654() {
1161 var o = new core.List<api.EntityResult>(); 1197 var o = new core.List<api.EntityResult>();
1162 o.add(buildEntityResult()); 1198 o.add(buildEntityResult());
1163 o.add(buildEntityResult()); 1199 o.add(buildEntityResult());
1164 return o; 1200 return o;
1165 } 1201 }
1166 1202
1167 checkUnnamed655(core.List<api.EntityResult> o) { 1203 checkUnnamed654(core.List<api.EntityResult> o) {
1168 unittest.expect(o, unittest.hasLength(2)); 1204 unittest.expect(o, unittest.hasLength(2));
1169 checkEntityResult(o[0]); 1205 checkEntityResult(o[0]);
1170 checkEntityResult(o[1]); 1206 checkEntityResult(o[1]);
1171 } 1207 }
1172 1208
1173 core.int buildCounterQueryResultBatch = 0; 1209 core.int buildCounterQueryResultBatch = 0;
1174 buildQueryResultBatch() { 1210 buildQueryResultBatch() {
1175 var o = new api.QueryResultBatch(); 1211 var o = new api.QueryResultBatch();
1176 buildCounterQueryResultBatch++; 1212 buildCounterQueryResultBatch++;
1177 if (buildCounterQueryResultBatch < 3) { 1213 if (buildCounterQueryResultBatch < 3) {
1178 o.endCursor = "foo"; 1214 o.endCursor = "foo";
1179 o.entityResultType = "foo"; 1215 o.entityResultType = "foo";
1180 o.entityResults = buildUnnamed655(); 1216 o.entityResults = buildUnnamed654();
1181 o.moreResults = "foo"; 1217 o.moreResults = "foo";
1182 o.skippedCursor = "foo"; 1218 o.skippedCursor = "foo";
1183 o.skippedResults = 42; 1219 o.skippedResults = 42;
1184 o.snapshotVersion = "foo"; 1220 o.snapshotVersion = "foo";
1185 } 1221 }
1186 buildCounterQueryResultBatch--; 1222 buildCounterQueryResultBatch--;
1187 return o; 1223 return o;
1188 } 1224 }
1189 1225
1190 checkQueryResultBatch(api.QueryResultBatch o) { 1226 checkQueryResultBatch(api.QueryResultBatch o) {
1191 buildCounterQueryResultBatch++; 1227 buildCounterQueryResultBatch++;
1192 if (buildCounterQueryResultBatch < 3) { 1228 if (buildCounterQueryResultBatch < 3) {
1193 unittest.expect(o.endCursor, unittest.equals('foo')); 1229 unittest.expect(o.endCursor, unittest.equals('foo'));
1194 unittest.expect(o.entityResultType, unittest.equals('foo')); 1230 unittest.expect(o.entityResultType, unittest.equals('foo'));
1195 checkUnnamed655(o.entityResults); 1231 checkUnnamed654(o.entityResults);
1196 unittest.expect(o.moreResults, unittest.equals('foo')); 1232 unittest.expect(o.moreResults, unittest.equals('foo'));
1197 unittest.expect(o.skippedCursor, unittest.equals('foo')); 1233 unittest.expect(o.skippedCursor, unittest.equals('foo'));
1198 unittest.expect(o.skippedResults, unittest.equals(42)); 1234 unittest.expect(o.skippedResults, unittest.equals(42));
1199 unittest.expect(o.snapshotVersion, unittest.equals('foo')); 1235 unittest.expect(o.snapshotVersion, unittest.equals('foo'));
1200 } 1236 }
1201 buildCounterQueryResultBatch--; 1237 buildCounterQueryResultBatch--;
1202 } 1238 }
1203 1239
1204 core.int buildCounterReadOnly = 0; 1240 core.int buildCounterReadOnly = 0;
1205 buildReadOnly() { 1241 buildReadOnly() {
1206 var o = new api.ReadOnly(); 1242 var o = new api.ReadOnly();
1207 buildCounterReadOnly++; 1243 buildCounterReadOnly++;
1208 if (buildCounterReadOnly < 3) { 1244 if (buildCounterReadOnly < 3) {}
1209 }
1210 buildCounterReadOnly--; 1245 buildCounterReadOnly--;
1211 return o; 1246 return o;
1212 } 1247 }
1213 1248
1214 checkReadOnly(api.ReadOnly o) { 1249 checkReadOnly(api.ReadOnly o) {
1215 buildCounterReadOnly++; 1250 buildCounterReadOnly++;
1216 if (buildCounterReadOnly < 3) { 1251 if (buildCounterReadOnly < 3) {}
1217 }
1218 buildCounterReadOnly--; 1252 buildCounterReadOnly--;
1219 } 1253 }
1220 1254
1221 core.int buildCounterReadOptions = 0; 1255 core.int buildCounterReadOptions = 0;
1222 buildReadOptions() { 1256 buildReadOptions() {
1223 var o = new api.ReadOptions(); 1257 var o = new api.ReadOptions();
1224 buildCounterReadOptions++; 1258 buildCounterReadOptions++;
1225 if (buildCounterReadOptions < 3) { 1259 if (buildCounterReadOptions < 3) {
1226 o.readConsistency = "foo"; 1260 o.readConsistency = "foo";
1227 o.transaction = "foo"; 1261 o.transaction = "foo";
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 if (buildCounterRollbackRequest < 3) { 1308 if (buildCounterRollbackRequest < 3) {
1275 unittest.expect(o.transaction, unittest.equals('foo')); 1309 unittest.expect(o.transaction, unittest.equals('foo'));
1276 } 1310 }
1277 buildCounterRollbackRequest--; 1311 buildCounterRollbackRequest--;
1278 } 1312 }
1279 1313
1280 core.int buildCounterRollbackResponse = 0; 1314 core.int buildCounterRollbackResponse = 0;
1281 buildRollbackResponse() { 1315 buildRollbackResponse() {
1282 var o = new api.RollbackResponse(); 1316 var o = new api.RollbackResponse();
1283 buildCounterRollbackResponse++; 1317 buildCounterRollbackResponse++;
1284 if (buildCounterRollbackResponse < 3) { 1318 if (buildCounterRollbackResponse < 3) {}
1285 }
1286 buildCounterRollbackResponse--; 1319 buildCounterRollbackResponse--;
1287 return o; 1320 return o;
1288 } 1321 }
1289 1322
1290 checkRollbackResponse(api.RollbackResponse o) { 1323 checkRollbackResponse(api.RollbackResponse o) {
1291 buildCounterRollbackResponse++; 1324 buildCounterRollbackResponse++;
1292 if (buildCounterRollbackResponse < 3) { 1325 if (buildCounterRollbackResponse < 3) {}
1293 }
1294 buildCounterRollbackResponse--; 1326 buildCounterRollbackResponse--;
1295 } 1327 }
1296 1328
1297 core.int buildCounterRunQueryRequest = 0; 1329 core.int buildCounterRunQueryRequest = 0;
1298 buildRunQueryRequest() { 1330 buildRunQueryRequest() {
1299 var o = new api.RunQueryRequest(); 1331 var o = new api.RunQueryRequest();
1300 buildCounterRunQueryRequest++; 1332 buildCounterRunQueryRequest++;
1301 if (buildCounterRunQueryRequest < 3) { 1333 if (buildCounterRunQueryRequest < 3) {
1302 o.gqlQuery = buildGqlQuery(); 1334 o.gqlQuery = buildGqlQuery();
1303 o.partitionId = buildPartitionId(); 1335 o.partitionId = buildPartitionId();
(...skipping 29 matching lines...) Expand all
1333 1365
1334 checkRunQueryResponse(api.RunQueryResponse o) { 1366 checkRunQueryResponse(api.RunQueryResponse o) {
1335 buildCounterRunQueryResponse++; 1367 buildCounterRunQueryResponse++;
1336 if (buildCounterRunQueryResponse < 3) { 1368 if (buildCounterRunQueryResponse < 3) {
1337 checkQueryResultBatch(o.batch); 1369 checkQueryResultBatch(o.batch);
1338 checkQuery(o.query); 1370 checkQuery(o.query);
1339 } 1371 }
1340 buildCounterRunQueryResponse--; 1372 buildCounterRunQueryResponse--;
1341 } 1373 }
1342 1374
1343 buildUnnamed656() { 1375 buildUnnamed655() {
1344 var o = new core.Map<core.String, core.Object>(); 1376 var o = new core.Map<core.String, core.Object>();
1345 o["x"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 1377 o["x"] = {
1346 o["y"] = {'list' : [1, 2, 3], 'bool' : true, 'string' : 'foo'}; 1378 'list': [1, 2, 3],
1379 'bool': true,
1380 'string': 'foo'
1381 };
1382 o["y"] = {
1383 'list': [1, 2, 3],
1384 'bool': true,
1385 'string': 'foo'
1386 };
1347 return o; 1387 return o;
1348 } 1388 }
1349 1389
1350 checkUnnamed656(core.Map<core.String, core.Object> o) { 1390 checkUnnamed655(core.Map<core.String, core.Object> o) {
1351 unittest.expect(o, unittest.hasLength(2)); 1391 unittest.expect(o, unittest.hasLength(2));
1352 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')); 1392 var casted5 = (o["x"]) as core.Map;
1353 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')); 1393 unittest.expect(casted5, unittest.hasLength(3));
1394 unittest.expect(casted5["list"], unittest.equals([1, 2, 3]));
1395 unittest.expect(casted5["bool"], unittest.equals(true));
1396 unittest.expect(casted5["string"], unittest.equals('foo'));
1397 var casted6 = (o["y"]) as core.Map;
1398 unittest.expect(casted6, unittest.hasLength(3));
1399 unittest.expect(casted6["list"], unittest.equals([1, 2, 3]));
1400 unittest.expect(casted6["bool"], unittest.equals(true));
1401 unittest.expect(casted6["string"], unittest.equals('foo'));
1354 } 1402 }
1355 1403
1356 buildUnnamed657() { 1404 buildUnnamed656() {
1357 var o = new core.List<core.Map<core.String, core.Object>>(); 1405 var o = new core.List<core.Map<core.String, core.Object>>();
1358 o.add(buildUnnamed656()); 1406 o.add(buildUnnamed655());
1359 o.add(buildUnnamed656()); 1407 o.add(buildUnnamed655());
1360 return o; 1408 return o;
1361 } 1409 }
1362 1410
1363 checkUnnamed657(core.List<core.Map<core.String, core.Object>> o) { 1411 checkUnnamed656(core.List<core.Map<core.String, core.Object>> o) {
1364 unittest.expect(o, unittest.hasLength(2)); 1412 unittest.expect(o, unittest.hasLength(2));
1365 checkUnnamed656(o[0]); 1413 checkUnnamed655(o[0]);
1366 checkUnnamed656(o[1]); 1414 checkUnnamed655(o[1]);
1367 } 1415 }
1368 1416
1369 core.int buildCounterStatus = 0; 1417 core.int buildCounterStatus = 0;
1370 buildStatus() { 1418 buildStatus() {
1371 var o = new api.Status(); 1419 var o = new api.Status();
1372 buildCounterStatus++; 1420 buildCounterStatus++;
1373 if (buildCounterStatus < 3) { 1421 if (buildCounterStatus < 3) {
1374 o.code = 42; 1422 o.code = 42;
1375 o.details = buildUnnamed657(); 1423 o.details = buildUnnamed656();
1376 o.message = "foo"; 1424 o.message = "foo";
1377 } 1425 }
1378 buildCounterStatus--; 1426 buildCounterStatus--;
1379 return o; 1427 return o;
1380 } 1428 }
1381 1429
1382 checkStatus(api.Status o) { 1430 checkStatus(api.Status o) {
1383 buildCounterStatus++; 1431 buildCounterStatus++;
1384 if (buildCounterStatus < 3) { 1432 if (buildCounterStatus < 3) {
1385 unittest.expect(o.code, unittest.equals(42)); 1433 unittest.expect(o.code, unittest.equals(42));
1386 checkUnnamed657(o.details); 1434 checkUnnamed656(o.details);
1387 unittest.expect(o.message, unittest.equals('foo')); 1435 unittest.expect(o.message, unittest.equals('foo'));
1388 } 1436 }
1389 buildCounterStatus--; 1437 buildCounterStatus--;
1390 } 1438 }
1391 1439
1392 core.int buildCounterTransactionOptions = 0; 1440 core.int buildCounterTransactionOptions = 0;
1393 buildTransactionOptions() { 1441 buildTransactionOptions() {
1394 var o = new api.TransactionOptions(); 1442 var o = new api.TransactionOptions();
1395 buildCounterTransactionOptions++; 1443 buildCounterTransactionOptions++;
1396 if (buildCounterTransactionOptions < 3) { 1444 if (buildCounterTransactionOptions < 3) {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 unittest.expect(o.integerValue, unittest.equals('foo')); 1494 unittest.expect(o.integerValue, unittest.equals('foo'));
1447 checkKey(o.keyValue); 1495 checkKey(o.keyValue);
1448 unittest.expect(o.meaning, unittest.equals(42)); 1496 unittest.expect(o.meaning, unittest.equals(42));
1449 unittest.expect(o.nullValue, unittest.equals('foo')); 1497 unittest.expect(o.nullValue, unittest.equals('foo'));
1450 unittest.expect(o.stringValue, unittest.equals('foo')); 1498 unittest.expect(o.stringValue, unittest.equals('foo'));
1451 unittest.expect(o.timestampValue, unittest.equals('foo')); 1499 unittest.expect(o.timestampValue, unittest.equals('foo'));
1452 } 1500 }
1453 buildCounterValue--; 1501 buildCounterValue--;
1454 } 1502 }
1455 1503
1456
1457 main() { 1504 main() {
1458 unittest.group("obj-schema-AllocateIdsRequest", () { 1505 unittest.group("obj-schema-AllocateIdsRequest", () {
1459 unittest.test("to-json--from-json", () { 1506 unittest.test("to-json--from-json", () {
1460 var o = buildAllocateIdsRequest(); 1507 var o = buildAllocateIdsRequest();
1461 var od = new api.AllocateIdsRequest.fromJson(o.toJson()); 1508 var od = new api.AllocateIdsRequest.fromJson(o.toJson());
1462 checkAllocateIdsRequest(od); 1509 checkAllocateIdsRequest(od);
1463 }); 1510 });
1464 }); 1511 });
1465 1512
1466
1467 unittest.group("obj-schema-AllocateIdsResponse", () { 1513 unittest.group("obj-schema-AllocateIdsResponse", () {
1468 unittest.test("to-json--from-json", () { 1514 unittest.test("to-json--from-json", () {
1469 var o = buildAllocateIdsResponse(); 1515 var o = buildAllocateIdsResponse();
1470 var od = new api.AllocateIdsResponse.fromJson(o.toJson()); 1516 var od = new api.AllocateIdsResponse.fromJson(o.toJson());
1471 checkAllocateIdsResponse(od); 1517 checkAllocateIdsResponse(od);
1472 }); 1518 });
1473 }); 1519 });
1474 1520
1475
1476 unittest.group("obj-schema-ArrayValue", () { 1521 unittest.group("obj-schema-ArrayValue", () {
1477 unittest.test("to-json--from-json", () { 1522 unittest.test("to-json--from-json", () {
1478 var o = buildArrayValue(); 1523 var o = buildArrayValue();
1479 var od = new api.ArrayValue.fromJson(o.toJson()); 1524 var od = new api.ArrayValue.fromJson(o.toJson());
1480 checkArrayValue(od); 1525 checkArrayValue(od);
1481 }); 1526 });
1482 }); 1527 });
1483 1528
1484
1485 unittest.group("obj-schema-BeginTransactionRequest", () { 1529 unittest.group("obj-schema-BeginTransactionRequest", () {
1486 unittest.test("to-json--from-json", () { 1530 unittest.test("to-json--from-json", () {
1487 var o = buildBeginTransactionRequest(); 1531 var o = buildBeginTransactionRequest();
1488 var od = new api.BeginTransactionRequest.fromJson(o.toJson()); 1532 var od = new api.BeginTransactionRequest.fromJson(o.toJson());
1489 checkBeginTransactionRequest(od); 1533 checkBeginTransactionRequest(od);
1490 }); 1534 });
1491 }); 1535 });
1492 1536
1493
1494 unittest.group("obj-schema-BeginTransactionResponse", () { 1537 unittest.group("obj-schema-BeginTransactionResponse", () {
1495 unittest.test("to-json--from-json", () { 1538 unittest.test("to-json--from-json", () {
1496 var o = buildBeginTransactionResponse(); 1539 var o = buildBeginTransactionResponse();
1497 var od = new api.BeginTransactionResponse.fromJson(o.toJson()); 1540 var od = new api.BeginTransactionResponse.fromJson(o.toJson());
1498 checkBeginTransactionResponse(od); 1541 checkBeginTransactionResponse(od);
1499 }); 1542 });
1500 }); 1543 });
1501 1544
1502
1503 unittest.group("obj-schema-CommitRequest", () { 1545 unittest.group("obj-schema-CommitRequest", () {
1504 unittest.test("to-json--from-json", () { 1546 unittest.test("to-json--from-json", () {
1505 var o = buildCommitRequest(); 1547 var o = buildCommitRequest();
1506 var od = new api.CommitRequest.fromJson(o.toJson()); 1548 var od = new api.CommitRequest.fromJson(o.toJson());
1507 checkCommitRequest(od); 1549 checkCommitRequest(od);
1508 }); 1550 });
1509 }); 1551 });
1510 1552
1511
1512 unittest.group("obj-schema-CommitResponse", () { 1553 unittest.group("obj-schema-CommitResponse", () {
1513 unittest.test("to-json--from-json", () { 1554 unittest.test("to-json--from-json", () {
1514 var o = buildCommitResponse(); 1555 var o = buildCommitResponse();
1515 var od = new api.CommitResponse.fromJson(o.toJson()); 1556 var od = new api.CommitResponse.fromJson(o.toJson());
1516 checkCommitResponse(od); 1557 checkCommitResponse(od);
1517 }); 1558 });
1518 }); 1559 });
1519 1560
1520
1521 unittest.group("obj-schema-CompositeFilter", () { 1561 unittest.group("obj-schema-CompositeFilter", () {
1522 unittest.test("to-json--from-json", () { 1562 unittest.test("to-json--from-json", () {
1523 var o = buildCompositeFilter(); 1563 var o = buildCompositeFilter();
1524 var od = new api.CompositeFilter.fromJson(o.toJson()); 1564 var od = new api.CompositeFilter.fromJson(o.toJson());
1525 checkCompositeFilter(od); 1565 checkCompositeFilter(od);
1526 }); 1566 });
1527 }); 1567 });
1528 1568
1529
1530 unittest.group("obj-schema-Empty", () { 1569 unittest.group("obj-schema-Empty", () {
1531 unittest.test("to-json--from-json", () { 1570 unittest.test("to-json--from-json", () {
1532 var o = buildEmpty(); 1571 var o = buildEmpty();
1533 var od = new api.Empty.fromJson(o.toJson()); 1572 var od = new api.Empty.fromJson(o.toJson());
1534 checkEmpty(od); 1573 checkEmpty(od);
1535 }); 1574 });
1536 }); 1575 });
1537 1576
1538
1539 unittest.group("obj-schema-Entity", () { 1577 unittest.group("obj-schema-Entity", () {
1540 unittest.test("to-json--from-json", () { 1578 unittest.test("to-json--from-json", () {
1541 var o = buildEntity(); 1579 var o = buildEntity();
1542 var od = new api.Entity.fromJson(o.toJson()); 1580 var od = new api.Entity.fromJson(o.toJson());
1543 checkEntity(od); 1581 checkEntity(od);
1544 }); 1582 });
1545 }); 1583 });
1546 1584
1547
1548 unittest.group("obj-schema-EntityResult", () { 1585 unittest.group("obj-schema-EntityResult", () {
1549 unittest.test("to-json--from-json", () { 1586 unittest.test("to-json--from-json", () {
1550 var o = buildEntityResult(); 1587 var o = buildEntityResult();
1551 var od = new api.EntityResult.fromJson(o.toJson()); 1588 var od = new api.EntityResult.fromJson(o.toJson());
1552 checkEntityResult(od); 1589 checkEntityResult(od);
1553 }); 1590 });
1554 }); 1591 });
1555 1592
1556
1557 unittest.group("obj-schema-Filter", () { 1593 unittest.group("obj-schema-Filter", () {
1558 unittest.test("to-json--from-json", () { 1594 unittest.test("to-json--from-json", () {
1559 var o = buildFilter(); 1595 var o = buildFilter();
1560 var od = new api.Filter.fromJson(o.toJson()); 1596 var od = new api.Filter.fromJson(o.toJson());
1561 checkFilter(od); 1597 checkFilter(od);
1562 }); 1598 });
1563 }); 1599 });
1564 1600
1565
1566 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1CommonMetadata", () { 1601 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1CommonMetadata", () {
1567 unittest.test("to-json--from-json", () { 1602 unittest.test("to-json--from-json", () {
1568 var o = buildGoogleDatastoreAdminV1beta1CommonMetadata(); 1603 var o = buildGoogleDatastoreAdminV1beta1CommonMetadata();
1569 var od = new api.GoogleDatastoreAdminV1beta1CommonMetadata.fromJson(o.toJs on()); 1604 var od = new api.GoogleDatastoreAdminV1beta1CommonMetadata.fromJson(
1605 o.toJson());
1570 checkGoogleDatastoreAdminV1beta1CommonMetadata(od); 1606 checkGoogleDatastoreAdminV1beta1CommonMetadata(od);
1571 }); 1607 });
1572 }); 1608 });
1573 1609
1574
1575 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1EntityFilter", () { 1610 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1EntityFilter", () {
1576 unittest.test("to-json--from-json", () { 1611 unittest.test("to-json--from-json", () {
1577 var o = buildGoogleDatastoreAdminV1beta1EntityFilter(); 1612 var o = buildGoogleDatastoreAdminV1beta1EntityFilter();
1578 var od = new api.GoogleDatastoreAdminV1beta1EntityFilter.fromJson(o.toJson ()); 1613 var od =
1614 new api.GoogleDatastoreAdminV1beta1EntityFilter.fromJson(o.toJson());
1579 checkGoogleDatastoreAdminV1beta1EntityFilter(od); 1615 checkGoogleDatastoreAdminV1beta1EntityFilter(od);
1580 }); 1616 });
1581 }); 1617 });
1582 1618
1583 1619 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1ExportEntitiesMetadata",
1584 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1ExportEntitiesMetadata", () { 1620 () {
1585 unittest.test("to-json--from-json", () { 1621 unittest.test("to-json--from-json", () {
1586 var o = buildGoogleDatastoreAdminV1beta1ExportEntitiesMetadata(); 1622 var o = buildGoogleDatastoreAdminV1beta1ExportEntitiesMetadata();
1587 var od = new api.GoogleDatastoreAdminV1beta1ExportEntitiesMetadata.fromJso n(o.toJson()); 1623 var od =
1624 new api.GoogleDatastoreAdminV1beta1ExportEntitiesMetadata.fromJson(
1625 o.toJson());
1588 checkGoogleDatastoreAdminV1beta1ExportEntitiesMetadata(od); 1626 checkGoogleDatastoreAdminV1beta1ExportEntitiesMetadata(od);
1589 }); 1627 });
1590 }); 1628 });
1591 1629
1592 1630 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1ExportEntitiesResponse",
1593 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1ExportEntitiesResponse", () { 1631 () {
1594 unittest.test("to-json--from-json", () { 1632 unittest.test("to-json--from-json", () {
1595 var o = buildGoogleDatastoreAdminV1beta1ExportEntitiesResponse(); 1633 var o = buildGoogleDatastoreAdminV1beta1ExportEntitiesResponse();
1596 var od = new api.GoogleDatastoreAdminV1beta1ExportEntitiesResponse.fromJso n(o.toJson()); 1634 var od =
1635 new api.GoogleDatastoreAdminV1beta1ExportEntitiesResponse.fromJson(
1636 o.toJson());
1597 checkGoogleDatastoreAdminV1beta1ExportEntitiesResponse(od); 1637 checkGoogleDatastoreAdminV1beta1ExportEntitiesResponse(od);
1598 }); 1638 });
1599 }); 1639 });
1600 1640
1601 1641 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1ImportEntitiesMetadata",
1602 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1ImportEntitiesMetadata", () { 1642 () {
1603 unittest.test("to-json--from-json", () { 1643 unittest.test("to-json--from-json", () {
1604 var o = buildGoogleDatastoreAdminV1beta1ImportEntitiesMetadata(); 1644 var o = buildGoogleDatastoreAdminV1beta1ImportEntitiesMetadata();
1605 var od = new api.GoogleDatastoreAdminV1beta1ImportEntitiesMetadata.fromJso n(o.toJson()); 1645 var od =
1646 new api.GoogleDatastoreAdminV1beta1ImportEntitiesMetadata.fromJson(
1647 o.toJson());
1606 checkGoogleDatastoreAdminV1beta1ImportEntitiesMetadata(od); 1648 checkGoogleDatastoreAdminV1beta1ImportEntitiesMetadata(od);
1607 }); 1649 });
1608 }); 1650 });
1609 1651
1610
1611 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1Progress", () { 1652 unittest.group("obj-schema-GoogleDatastoreAdminV1beta1Progress", () {
1612 unittest.test("to-json--from-json", () { 1653 unittest.test("to-json--from-json", () {
1613 var o = buildGoogleDatastoreAdminV1beta1Progress(); 1654 var o = buildGoogleDatastoreAdminV1beta1Progress();
1614 var od = new api.GoogleDatastoreAdminV1beta1Progress.fromJson(o.toJson()); 1655 var od = new api.GoogleDatastoreAdminV1beta1Progress.fromJson(o.toJson());
1615 checkGoogleDatastoreAdminV1beta1Progress(od); 1656 checkGoogleDatastoreAdminV1beta1Progress(od);
1616 }); 1657 });
1617 }); 1658 });
1618 1659
1619
1620 unittest.group("obj-schema-GoogleLongrunningListOperationsResponse", () { 1660 unittest.group("obj-schema-GoogleLongrunningListOperationsResponse", () {
1621 unittest.test("to-json--from-json", () { 1661 unittest.test("to-json--from-json", () {
1622 var o = buildGoogleLongrunningListOperationsResponse(); 1662 var o = buildGoogleLongrunningListOperationsResponse();
1623 var od = new api.GoogleLongrunningListOperationsResponse.fromJson(o.toJson ()); 1663 var od =
1664 new api.GoogleLongrunningListOperationsResponse.fromJson(o.toJson());
1624 checkGoogleLongrunningListOperationsResponse(od); 1665 checkGoogleLongrunningListOperationsResponse(od);
1625 }); 1666 });
1626 }); 1667 });
1627 1668
1628
1629 unittest.group("obj-schema-GoogleLongrunningOperation", () { 1669 unittest.group("obj-schema-GoogleLongrunningOperation", () {
1630 unittest.test("to-json--from-json", () { 1670 unittest.test("to-json--from-json", () {
1631 var o = buildGoogleLongrunningOperation(); 1671 var o = buildGoogleLongrunningOperation();
1632 var od = new api.GoogleLongrunningOperation.fromJson(o.toJson()); 1672 var od = new api.GoogleLongrunningOperation.fromJson(o.toJson());
1633 checkGoogleLongrunningOperation(od); 1673 checkGoogleLongrunningOperation(od);
1634 }); 1674 });
1635 }); 1675 });
1636 1676
1637
1638 unittest.group("obj-schema-GqlQuery", () { 1677 unittest.group("obj-schema-GqlQuery", () {
1639 unittest.test("to-json--from-json", () { 1678 unittest.test("to-json--from-json", () {
1640 var o = buildGqlQuery(); 1679 var o = buildGqlQuery();
1641 var od = new api.GqlQuery.fromJson(o.toJson()); 1680 var od = new api.GqlQuery.fromJson(o.toJson());
1642 checkGqlQuery(od); 1681 checkGqlQuery(od);
1643 }); 1682 });
1644 }); 1683 });
1645 1684
1646
1647 unittest.group("obj-schema-GqlQueryParameter", () { 1685 unittest.group("obj-schema-GqlQueryParameter", () {
1648 unittest.test("to-json--from-json", () { 1686 unittest.test("to-json--from-json", () {
1649 var o = buildGqlQueryParameter(); 1687 var o = buildGqlQueryParameter();
1650 var od = new api.GqlQueryParameter.fromJson(o.toJson()); 1688 var od = new api.GqlQueryParameter.fromJson(o.toJson());
1651 checkGqlQueryParameter(od); 1689 checkGqlQueryParameter(od);
1652 }); 1690 });
1653 }); 1691 });
1654 1692
1655
1656 unittest.group("obj-schema-Key", () { 1693 unittest.group("obj-schema-Key", () {
1657 unittest.test("to-json--from-json", () { 1694 unittest.test("to-json--from-json", () {
1658 var o = buildKey(); 1695 var o = buildKey();
1659 var od = new api.Key.fromJson(o.toJson()); 1696 var od = new api.Key.fromJson(o.toJson());
1660 checkKey(od); 1697 checkKey(od);
1661 }); 1698 });
1662 }); 1699 });
1663 1700
1664
1665 unittest.group("obj-schema-KindExpression", () { 1701 unittest.group("obj-schema-KindExpression", () {
1666 unittest.test("to-json--from-json", () { 1702 unittest.test("to-json--from-json", () {
1667 var o = buildKindExpression(); 1703 var o = buildKindExpression();
1668 var od = new api.KindExpression.fromJson(o.toJson()); 1704 var od = new api.KindExpression.fromJson(o.toJson());
1669 checkKindExpression(od); 1705 checkKindExpression(od);
1670 }); 1706 });
1671 }); 1707 });
1672 1708
1673
1674 unittest.group("obj-schema-LatLng", () { 1709 unittest.group("obj-schema-LatLng", () {
1675 unittest.test("to-json--from-json", () { 1710 unittest.test("to-json--from-json", () {
1676 var o = buildLatLng(); 1711 var o = buildLatLng();
1677 var od = new api.LatLng.fromJson(o.toJson()); 1712 var od = new api.LatLng.fromJson(o.toJson());
1678 checkLatLng(od); 1713 checkLatLng(od);
1679 }); 1714 });
1680 }); 1715 });
1681 1716
1682
1683 unittest.group("obj-schema-LookupRequest", () { 1717 unittest.group("obj-schema-LookupRequest", () {
1684 unittest.test("to-json--from-json", () { 1718 unittest.test("to-json--from-json", () {
1685 var o = buildLookupRequest(); 1719 var o = buildLookupRequest();
1686 var od = new api.LookupRequest.fromJson(o.toJson()); 1720 var od = new api.LookupRequest.fromJson(o.toJson());
1687 checkLookupRequest(od); 1721 checkLookupRequest(od);
1688 }); 1722 });
1689 }); 1723 });
1690 1724
1691
1692 unittest.group("obj-schema-LookupResponse", () { 1725 unittest.group("obj-schema-LookupResponse", () {
1693 unittest.test("to-json--from-json", () { 1726 unittest.test("to-json--from-json", () {
1694 var o = buildLookupResponse(); 1727 var o = buildLookupResponse();
1695 var od = new api.LookupResponse.fromJson(o.toJson()); 1728 var od = new api.LookupResponse.fromJson(o.toJson());
1696 checkLookupResponse(od); 1729 checkLookupResponse(od);
1697 }); 1730 });
1698 }); 1731 });
1699 1732
1700
1701 unittest.group("obj-schema-Mutation", () { 1733 unittest.group("obj-schema-Mutation", () {
1702 unittest.test("to-json--from-json", () { 1734 unittest.test("to-json--from-json", () {
1703 var o = buildMutation(); 1735 var o = buildMutation();
1704 var od = new api.Mutation.fromJson(o.toJson()); 1736 var od = new api.Mutation.fromJson(o.toJson());
1705 checkMutation(od); 1737 checkMutation(od);
1706 }); 1738 });
1707 }); 1739 });
1708 1740
1709
1710 unittest.group("obj-schema-MutationResult", () { 1741 unittest.group("obj-schema-MutationResult", () {
1711 unittest.test("to-json--from-json", () { 1742 unittest.test("to-json--from-json", () {
1712 var o = buildMutationResult(); 1743 var o = buildMutationResult();
1713 var od = new api.MutationResult.fromJson(o.toJson()); 1744 var od = new api.MutationResult.fromJson(o.toJson());
1714 checkMutationResult(od); 1745 checkMutationResult(od);
1715 }); 1746 });
1716 }); 1747 });
1717 1748
1718
1719 unittest.group("obj-schema-PartitionId", () { 1749 unittest.group("obj-schema-PartitionId", () {
1720 unittest.test("to-json--from-json", () { 1750 unittest.test("to-json--from-json", () {
1721 var o = buildPartitionId(); 1751 var o = buildPartitionId();
1722 var od = new api.PartitionId.fromJson(o.toJson()); 1752 var od = new api.PartitionId.fromJson(o.toJson());
1723 checkPartitionId(od); 1753 checkPartitionId(od);
1724 }); 1754 });
1725 }); 1755 });
1726 1756
1727
1728 unittest.group("obj-schema-PathElement", () { 1757 unittest.group("obj-schema-PathElement", () {
1729 unittest.test("to-json--from-json", () { 1758 unittest.test("to-json--from-json", () {
1730 var o = buildPathElement(); 1759 var o = buildPathElement();
1731 var od = new api.PathElement.fromJson(o.toJson()); 1760 var od = new api.PathElement.fromJson(o.toJson());
1732 checkPathElement(od); 1761 checkPathElement(od);
1733 }); 1762 });
1734 }); 1763 });
1735 1764
1736
1737 unittest.group("obj-schema-Projection", () { 1765 unittest.group("obj-schema-Projection", () {
1738 unittest.test("to-json--from-json", () { 1766 unittest.test("to-json--from-json", () {
1739 var o = buildProjection(); 1767 var o = buildProjection();
1740 var od = new api.Projection.fromJson(o.toJson()); 1768 var od = new api.Projection.fromJson(o.toJson());
1741 checkProjection(od); 1769 checkProjection(od);
1742 }); 1770 });
1743 }); 1771 });
1744 1772
1745
1746 unittest.group("obj-schema-PropertyFilter", () { 1773 unittest.group("obj-schema-PropertyFilter", () {
1747 unittest.test("to-json--from-json", () { 1774 unittest.test("to-json--from-json", () {
1748 var o = buildPropertyFilter(); 1775 var o = buildPropertyFilter();
1749 var od = new api.PropertyFilter.fromJson(o.toJson()); 1776 var od = new api.PropertyFilter.fromJson(o.toJson());
1750 checkPropertyFilter(od); 1777 checkPropertyFilter(od);
1751 }); 1778 });
1752 }); 1779 });
1753 1780
1754
1755 unittest.group("obj-schema-PropertyOrder", () { 1781 unittest.group("obj-schema-PropertyOrder", () {
1756 unittest.test("to-json--from-json", () { 1782 unittest.test("to-json--from-json", () {
1757 var o = buildPropertyOrder(); 1783 var o = buildPropertyOrder();
1758 var od = new api.PropertyOrder.fromJson(o.toJson()); 1784 var od = new api.PropertyOrder.fromJson(o.toJson());
1759 checkPropertyOrder(od); 1785 checkPropertyOrder(od);
1760 }); 1786 });
1761 }); 1787 });
1762 1788
1763
1764 unittest.group("obj-schema-PropertyReference", () { 1789 unittest.group("obj-schema-PropertyReference", () {
1765 unittest.test("to-json--from-json", () { 1790 unittest.test("to-json--from-json", () {
1766 var o = buildPropertyReference(); 1791 var o = buildPropertyReference();
1767 var od = new api.PropertyReference.fromJson(o.toJson()); 1792 var od = new api.PropertyReference.fromJson(o.toJson());
1768 checkPropertyReference(od); 1793 checkPropertyReference(od);
1769 }); 1794 });
1770 }); 1795 });
1771 1796
1772
1773 unittest.group("obj-schema-Query", () { 1797 unittest.group("obj-schema-Query", () {
1774 unittest.test("to-json--from-json", () { 1798 unittest.test("to-json--from-json", () {
1775 var o = buildQuery(); 1799 var o = buildQuery();
1776 var od = new api.Query.fromJson(o.toJson()); 1800 var od = new api.Query.fromJson(o.toJson());
1777 checkQuery(od); 1801 checkQuery(od);
1778 }); 1802 });
1779 }); 1803 });
1780 1804
1781
1782 unittest.group("obj-schema-QueryResultBatch", () { 1805 unittest.group("obj-schema-QueryResultBatch", () {
1783 unittest.test("to-json--from-json", () { 1806 unittest.test("to-json--from-json", () {
1784 var o = buildQueryResultBatch(); 1807 var o = buildQueryResultBatch();
1785 var od = new api.QueryResultBatch.fromJson(o.toJson()); 1808 var od = new api.QueryResultBatch.fromJson(o.toJson());
1786 checkQueryResultBatch(od); 1809 checkQueryResultBatch(od);
1787 }); 1810 });
1788 }); 1811 });
1789 1812
1790
1791 unittest.group("obj-schema-ReadOnly", () { 1813 unittest.group("obj-schema-ReadOnly", () {
1792 unittest.test("to-json--from-json", () { 1814 unittest.test("to-json--from-json", () {
1793 var o = buildReadOnly(); 1815 var o = buildReadOnly();
1794 var od = new api.ReadOnly.fromJson(o.toJson()); 1816 var od = new api.ReadOnly.fromJson(o.toJson());
1795 checkReadOnly(od); 1817 checkReadOnly(od);
1796 }); 1818 });
1797 }); 1819 });
1798 1820
1799
1800 unittest.group("obj-schema-ReadOptions", () { 1821 unittest.group("obj-schema-ReadOptions", () {
1801 unittest.test("to-json--from-json", () { 1822 unittest.test("to-json--from-json", () {
1802 var o = buildReadOptions(); 1823 var o = buildReadOptions();
1803 var od = new api.ReadOptions.fromJson(o.toJson()); 1824 var od = new api.ReadOptions.fromJson(o.toJson());
1804 checkReadOptions(od); 1825 checkReadOptions(od);
1805 }); 1826 });
1806 }); 1827 });
1807 1828
1808
1809 unittest.group("obj-schema-ReadWrite", () { 1829 unittest.group("obj-schema-ReadWrite", () {
1810 unittest.test("to-json--from-json", () { 1830 unittest.test("to-json--from-json", () {
1811 var o = buildReadWrite(); 1831 var o = buildReadWrite();
1812 var od = new api.ReadWrite.fromJson(o.toJson()); 1832 var od = new api.ReadWrite.fromJson(o.toJson());
1813 checkReadWrite(od); 1833 checkReadWrite(od);
1814 }); 1834 });
1815 }); 1835 });
1816 1836
1817
1818 unittest.group("obj-schema-RollbackRequest", () { 1837 unittest.group("obj-schema-RollbackRequest", () {
1819 unittest.test("to-json--from-json", () { 1838 unittest.test("to-json--from-json", () {
1820 var o = buildRollbackRequest(); 1839 var o = buildRollbackRequest();
1821 var od = new api.RollbackRequest.fromJson(o.toJson()); 1840 var od = new api.RollbackRequest.fromJson(o.toJson());
1822 checkRollbackRequest(od); 1841 checkRollbackRequest(od);
1823 }); 1842 });
1824 }); 1843 });
1825 1844
1826
1827 unittest.group("obj-schema-RollbackResponse", () { 1845 unittest.group("obj-schema-RollbackResponse", () {
1828 unittest.test("to-json--from-json", () { 1846 unittest.test("to-json--from-json", () {
1829 var o = buildRollbackResponse(); 1847 var o = buildRollbackResponse();
1830 var od = new api.RollbackResponse.fromJson(o.toJson()); 1848 var od = new api.RollbackResponse.fromJson(o.toJson());
1831 checkRollbackResponse(od); 1849 checkRollbackResponse(od);
1832 }); 1850 });
1833 }); 1851 });
1834 1852
1835
1836 unittest.group("obj-schema-RunQueryRequest", () { 1853 unittest.group("obj-schema-RunQueryRequest", () {
1837 unittest.test("to-json--from-json", () { 1854 unittest.test("to-json--from-json", () {
1838 var o = buildRunQueryRequest(); 1855 var o = buildRunQueryRequest();
1839 var od = new api.RunQueryRequest.fromJson(o.toJson()); 1856 var od = new api.RunQueryRequest.fromJson(o.toJson());
1840 checkRunQueryRequest(od); 1857 checkRunQueryRequest(od);
1841 }); 1858 });
1842 }); 1859 });
1843 1860
1844
1845 unittest.group("obj-schema-RunQueryResponse", () { 1861 unittest.group("obj-schema-RunQueryResponse", () {
1846 unittest.test("to-json--from-json", () { 1862 unittest.test("to-json--from-json", () {
1847 var o = buildRunQueryResponse(); 1863 var o = buildRunQueryResponse();
1848 var od = new api.RunQueryResponse.fromJson(o.toJson()); 1864 var od = new api.RunQueryResponse.fromJson(o.toJson());
1849 checkRunQueryResponse(od); 1865 checkRunQueryResponse(od);
1850 }); 1866 });
1851 }); 1867 });
1852 1868
1853
1854 unittest.group("obj-schema-Status", () { 1869 unittest.group("obj-schema-Status", () {
1855 unittest.test("to-json--from-json", () { 1870 unittest.test("to-json--from-json", () {
1856 var o = buildStatus(); 1871 var o = buildStatus();
1857 var od = new api.Status.fromJson(o.toJson()); 1872 var od = new api.Status.fromJson(o.toJson());
1858 checkStatus(od); 1873 checkStatus(od);
1859 }); 1874 });
1860 }); 1875 });
1861 1876
1862
1863 unittest.group("obj-schema-TransactionOptions", () { 1877 unittest.group("obj-schema-TransactionOptions", () {
1864 unittest.test("to-json--from-json", () { 1878 unittest.test("to-json--from-json", () {
1865 var o = buildTransactionOptions(); 1879 var o = buildTransactionOptions();
1866 var od = new api.TransactionOptions.fromJson(o.toJson()); 1880 var od = new api.TransactionOptions.fromJson(o.toJson());
1867 checkTransactionOptions(od); 1881 checkTransactionOptions(od);
1868 }); 1882 });
1869 }); 1883 });
1870 1884
1871
1872 unittest.group("obj-schema-Value", () { 1885 unittest.group("obj-schema-Value", () {
1873 unittest.test("to-json--from-json", () { 1886 unittest.test("to-json--from-json", () {
1874 var o = buildValue(); 1887 var o = buildValue();
1875 var od = new api.Value.fromJson(o.toJson()); 1888 var od = new api.Value.fromJson(o.toJson());
1876 checkValue(od); 1889 checkValue(od);
1877 }); 1890 });
1878 }); 1891 });
1879 1892
1880
1881 unittest.group("resource-ProjectsResourceApi", () { 1893 unittest.group("resource-ProjectsResourceApi", () {
1882 unittest.test("method--allocateIds", () { 1894 unittest.test("method--allocateIds", () {
1883
1884 var mock = new HttpServerMock(); 1895 var mock = new HttpServerMock();
1885 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects; 1896 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects;
1886 var arg_request = buildAllocateIdsRequest(); 1897 var arg_request = buildAllocateIdsRequest();
1887 var arg_projectId = "foo"; 1898 var arg_projectId = "foo";
1888 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1899 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1889 var obj = new api.AllocateIdsRequest.fromJson(json); 1900 var obj = new api.AllocateIdsRequest.fromJson(json);
1890 checkAllocateIdsRequest(obj); 1901 checkAllocateIdsRequest(obj);
1891 1902
1892 var path = (req.url).path; 1903 var path = (req.url).path;
1893 var pathOffset = 0; 1904 var pathOffset = 0;
1894 var index; 1905 var index;
1895 var subPart; 1906 var subPart;
1896 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1907 unittest.expect(
1908 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1897 pathOffset += 1; 1909 pathOffset += 1;
1898 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 1910 unittest.expect(path.substring(pathOffset, pathOffset + 12),
1911 unittest.equals("v1/projects/"));
1899 pathOffset += 12; 1912 pathOffset += 12;
1900 index = path.indexOf(":allocateIds", pathOffset); 1913 index = path.indexOf(":allocateIds", pathOffset);
1901 unittest.expect(index >= 0, unittest.isTrue); 1914 unittest.expect(index >= 0, unittest.isTrue);
1902 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1915 subPart =
1916 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1903 pathOffset = index; 1917 pathOffset = index;
1904 unittest.expect(subPart, unittest.equals("$arg_projectId")); 1918 unittest.expect(subPart, unittest.equals("$arg_projectId"));
1905 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals(":allocateIds")); 1919 unittest.expect(path.substring(pathOffset, pathOffset + 12),
1920 unittest.equals(":allocateIds"));
1906 pathOffset += 12; 1921 pathOffset += 12;
1907 1922
1908 var query = (req.url).query; 1923 var query = (req.url).query;
1909 var queryOffset = 0; 1924 var queryOffset = 0;
1910 var queryMap = {}; 1925 var queryMap = {};
1911 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1926 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1912 parseBool(n) { 1927 parseBool(n) {
1913 if (n == "true") return true; 1928 if (n == "true") return true;
1914 if (n == "false") return false; 1929 if (n == "false") return false;
1915 if (n == null) return null; 1930 if (n == null) return null;
1916 throw new core.ArgumentError("Invalid boolean: $n"); 1931 throw new core.ArgumentError("Invalid boolean: $n");
1917 } 1932 }
1933
1918 if (query.length > 0) { 1934 if (query.length > 0) {
1919 for (var part in query.split("&")) { 1935 for (var part in query.split("&")) {
1920 var keyvalue = part.split("="); 1936 var keyvalue = part.split("=");
1921 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1937 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1938 core.Uri.decodeQueryComponent(keyvalue[1]));
1922 } 1939 }
1923 } 1940 }
1924 1941
1925
1926 var h = { 1942 var h = {
1927 "content-type" : "application/json; charset=utf-8", 1943 "content-type": "application/json; charset=utf-8",
1928 }; 1944 };
1929 var resp = convert.JSON.encode(buildAllocateIdsResponse()); 1945 var resp = convert.JSON.encode(buildAllocateIdsResponse());
1930 return new async.Future.value(stringResponse(200, h, resp)); 1946 return new async.Future.value(stringResponse(200, h, resp));
1931 }), true); 1947 }), true);
1932 res.allocateIds(arg_request, arg_projectId).then(unittest.expectAsync1(((a pi.AllocateIdsResponse response) { 1948 res
1949 .allocateIds(arg_request, arg_projectId)
1950 .then(unittest.expectAsync1(((api.AllocateIdsResponse response) {
1933 checkAllocateIdsResponse(response); 1951 checkAllocateIdsResponse(response);
1934 }))); 1952 })));
1935 }); 1953 });
1936 1954
1937 unittest.test("method--beginTransaction", () { 1955 unittest.test("method--beginTransaction", () {
1938
1939 var mock = new HttpServerMock(); 1956 var mock = new HttpServerMock();
1940 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects; 1957 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects;
1941 var arg_request = buildBeginTransactionRequest(); 1958 var arg_request = buildBeginTransactionRequest();
1942 var arg_projectId = "foo"; 1959 var arg_projectId = "foo";
1943 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 1960 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1944 var obj = new api.BeginTransactionRequest.fromJson(json); 1961 var obj = new api.BeginTransactionRequest.fromJson(json);
1945 checkBeginTransactionRequest(obj); 1962 checkBeginTransactionRequest(obj);
1946 1963
1947 var path = (req.url).path; 1964 var path = (req.url).path;
1948 var pathOffset = 0; 1965 var pathOffset = 0;
1949 var index; 1966 var index;
1950 var subPart; 1967 var subPart;
1951 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 1968 unittest.expect(
1969 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
1952 pathOffset += 1; 1970 pathOffset += 1;
1953 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 1971 unittest.expect(path.substring(pathOffset, pathOffset + 12),
1972 unittest.equals("v1/projects/"));
1954 pathOffset += 12; 1973 pathOffset += 12;
1955 index = path.indexOf(":beginTransaction", pathOffset); 1974 index = path.indexOf(":beginTransaction", pathOffset);
1956 unittest.expect(index >= 0, unittest.isTrue); 1975 unittest.expect(index >= 0, unittest.isTrue);
1957 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 1976 subPart =
1977 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
1958 pathOffset = index; 1978 pathOffset = index;
1959 unittest.expect(subPart, unittest.equals("$arg_projectId")); 1979 unittest.expect(subPart, unittest.equals("$arg_projectId"));
1960 unittest.expect(path.substring(pathOffset, pathOffset + 17), unittest.eq uals(":beginTransaction")); 1980 unittest.expect(path.substring(pathOffset, pathOffset + 17),
1981 unittest.equals(":beginTransaction"));
1961 pathOffset += 17; 1982 pathOffset += 17;
1962 1983
1963 var query = (req.url).query; 1984 var query = (req.url).query;
1964 var queryOffset = 0; 1985 var queryOffset = 0;
1965 var queryMap = {}; 1986 var queryMap = {};
1966 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 1987 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
1967 parseBool(n) { 1988 parseBool(n) {
1968 if (n == "true") return true; 1989 if (n == "true") return true;
1969 if (n == "false") return false; 1990 if (n == "false") return false;
1970 if (n == null) return null; 1991 if (n == null) return null;
1971 throw new core.ArgumentError("Invalid boolean: $n"); 1992 throw new core.ArgumentError("Invalid boolean: $n");
1972 } 1993 }
1994
1973 if (query.length > 0) { 1995 if (query.length > 0) {
1974 for (var part in query.split("&")) { 1996 for (var part in query.split("&")) {
1975 var keyvalue = part.split("="); 1997 var keyvalue = part.split("=");
1976 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 1998 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
1999 core.Uri.decodeQueryComponent(keyvalue[1]));
1977 } 2000 }
1978 } 2001 }
1979 2002
1980
1981 var h = { 2003 var h = {
1982 "content-type" : "application/json; charset=utf-8", 2004 "content-type": "application/json; charset=utf-8",
1983 }; 2005 };
1984 var resp = convert.JSON.encode(buildBeginTransactionResponse()); 2006 var resp = convert.JSON.encode(buildBeginTransactionResponse());
1985 return new async.Future.value(stringResponse(200, h, resp)); 2007 return new async.Future.value(stringResponse(200, h, resp));
1986 }), true); 2008 }), true);
1987 res.beginTransaction(arg_request, arg_projectId).then(unittest.expectAsync 1(((api.BeginTransactionResponse response) { 2009 res
2010 .beginTransaction(arg_request, arg_projectId)
2011 .then(unittest.expectAsync1(((api.BeginTransactionResponse response) {
1988 checkBeginTransactionResponse(response); 2012 checkBeginTransactionResponse(response);
1989 }))); 2013 })));
1990 }); 2014 });
1991 2015
1992 unittest.test("method--commit", () { 2016 unittest.test("method--commit", () {
1993
1994 var mock = new HttpServerMock(); 2017 var mock = new HttpServerMock();
1995 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects; 2018 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects;
1996 var arg_request = buildCommitRequest(); 2019 var arg_request = buildCommitRequest();
1997 var arg_projectId = "foo"; 2020 var arg_projectId = "foo";
1998 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2021 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
1999 var obj = new api.CommitRequest.fromJson(json); 2022 var obj = new api.CommitRequest.fromJson(json);
2000 checkCommitRequest(obj); 2023 checkCommitRequest(obj);
2001 2024
2002 var path = (req.url).path; 2025 var path = (req.url).path;
2003 var pathOffset = 0; 2026 var pathOffset = 0;
2004 var index; 2027 var index;
2005 var subPart; 2028 var subPart;
2006 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2029 unittest.expect(
2030 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2007 pathOffset += 1; 2031 pathOffset += 1;
2008 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 2032 unittest.expect(path.substring(pathOffset, pathOffset + 12),
2033 unittest.equals("v1/projects/"));
2009 pathOffset += 12; 2034 pathOffset += 12;
2010 index = path.indexOf(":commit", pathOffset); 2035 index = path.indexOf(":commit", pathOffset);
2011 unittest.expect(index >= 0, unittest.isTrue); 2036 unittest.expect(index >= 0, unittest.isTrue);
2012 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 2037 subPart =
2038 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
2013 pathOffset = index; 2039 pathOffset = index;
2014 unittest.expect(subPart, unittest.equals("$arg_projectId")); 2040 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2015 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als(":commit")); 2041 unittest.expect(path.substring(pathOffset, pathOffset + 7),
2042 unittest.equals(":commit"));
2016 pathOffset += 7; 2043 pathOffset += 7;
2017 2044
2018 var query = (req.url).query; 2045 var query = (req.url).query;
2019 var queryOffset = 0; 2046 var queryOffset = 0;
2020 var queryMap = {}; 2047 var queryMap = {};
2021 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2048 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2022 parseBool(n) { 2049 parseBool(n) {
2023 if (n == "true") return true; 2050 if (n == "true") return true;
2024 if (n == "false") return false; 2051 if (n == "false") return false;
2025 if (n == null) return null; 2052 if (n == null) return null;
2026 throw new core.ArgumentError("Invalid boolean: $n"); 2053 throw new core.ArgumentError("Invalid boolean: $n");
2027 } 2054 }
2055
2028 if (query.length > 0) { 2056 if (query.length > 0) {
2029 for (var part in query.split("&")) { 2057 for (var part in query.split("&")) {
2030 var keyvalue = part.split("="); 2058 var keyvalue = part.split("=");
2031 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2059 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2060 core.Uri.decodeQueryComponent(keyvalue[1]));
2032 } 2061 }
2033 } 2062 }
2034 2063
2035
2036 var h = { 2064 var h = {
2037 "content-type" : "application/json; charset=utf-8", 2065 "content-type": "application/json; charset=utf-8",
2038 }; 2066 };
2039 var resp = convert.JSON.encode(buildCommitResponse()); 2067 var resp = convert.JSON.encode(buildCommitResponse());
2040 return new async.Future.value(stringResponse(200, h, resp)); 2068 return new async.Future.value(stringResponse(200, h, resp));
2041 }), true); 2069 }), true);
2042 res.commit(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Co mmitResponse response) { 2070 res
2071 .commit(arg_request, arg_projectId)
2072 .then(unittest.expectAsync1(((api.CommitResponse response) {
2043 checkCommitResponse(response); 2073 checkCommitResponse(response);
2044 }))); 2074 })));
2045 }); 2075 });
2046 2076
2047 unittest.test("method--lookup", () { 2077 unittest.test("method--lookup", () {
2048
2049 var mock = new HttpServerMock(); 2078 var mock = new HttpServerMock();
2050 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects; 2079 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects;
2051 var arg_request = buildLookupRequest(); 2080 var arg_request = buildLookupRequest();
2052 var arg_projectId = "foo"; 2081 var arg_projectId = "foo";
2053 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2082 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2054 var obj = new api.LookupRequest.fromJson(json); 2083 var obj = new api.LookupRequest.fromJson(json);
2055 checkLookupRequest(obj); 2084 checkLookupRequest(obj);
2056 2085
2057 var path = (req.url).path; 2086 var path = (req.url).path;
2058 var pathOffset = 0; 2087 var pathOffset = 0;
2059 var index; 2088 var index;
2060 var subPart; 2089 var subPart;
2061 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2090 unittest.expect(
2091 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2062 pathOffset += 1; 2092 pathOffset += 1;
2063 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 2093 unittest.expect(path.substring(pathOffset, pathOffset + 12),
2094 unittest.equals("v1/projects/"));
2064 pathOffset += 12; 2095 pathOffset += 12;
2065 index = path.indexOf(":lookup", pathOffset); 2096 index = path.indexOf(":lookup", pathOffset);
2066 unittest.expect(index >= 0, unittest.isTrue); 2097 unittest.expect(index >= 0, unittest.isTrue);
2067 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 2098 subPart =
2099 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
2068 pathOffset = index; 2100 pathOffset = index;
2069 unittest.expect(subPart, unittest.equals("$arg_projectId")); 2101 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2070 unittest.expect(path.substring(pathOffset, pathOffset + 7), unittest.equ als(":lookup")); 2102 unittest.expect(path.substring(pathOffset, pathOffset + 7),
2103 unittest.equals(":lookup"));
2071 pathOffset += 7; 2104 pathOffset += 7;
2072 2105
2073 var query = (req.url).query; 2106 var query = (req.url).query;
2074 var queryOffset = 0; 2107 var queryOffset = 0;
2075 var queryMap = {}; 2108 var queryMap = {};
2076 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2109 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2077 parseBool(n) { 2110 parseBool(n) {
2078 if (n == "true") return true; 2111 if (n == "true") return true;
2079 if (n == "false") return false; 2112 if (n == "false") return false;
2080 if (n == null) return null; 2113 if (n == null) return null;
2081 throw new core.ArgumentError("Invalid boolean: $n"); 2114 throw new core.ArgumentError("Invalid boolean: $n");
2082 } 2115 }
2116
2083 if (query.length > 0) { 2117 if (query.length > 0) {
2084 for (var part in query.split("&")) { 2118 for (var part in query.split("&")) {
2085 var keyvalue = part.split("="); 2119 var keyvalue = part.split("=");
2086 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2120 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2121 core.Uri.decodeQueryComponent(keyvalue[1]));
2087 } 2122 }
2088 } 2123 }
2089 2124
2090
2091 var h = { 2125 var h = {
2092 "content-type" : "application/json; charset=utf-8", 2126 "content-type": "application/json; charset=utf-8",
2093 }; 2127 };
2094 var resp = convert.JSON.encode(buildLookupResponse()); 2128 var resp = convert.JSON.encode(buildLookupResponse());
2095 return new async.Future.value(stringResponse(200, h, resp)); 2129 return new async.Future.value(stringResponse(200, h, resp));
2096 }), true); 2130 }), true);
2097 res.lookup(arg_request, arg_projectId).then(unittest.expectAsync1(((api.Lo okupResponse response) { 2131 res
2132 .lookup(arg_request, arg_projectId)
2133 .then(unittest.expectAsync1(((api.LookupResponse response) {
2098 checkLookupResponse(response); 2134 checkLookupResponse(response);
2099 }))); 2135 })));
2100 }); 2136 });
2101 2137
2102 unittest.test("method--rollback", () { 2138 unittest.test("method--rollback", () {
2103
2104 var mock = new HttpServerMock(); 2139 var mock = new HttpServerMock();
2105 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects; 2140 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects;
2106 var arg_request = buildRollbackRequest(); 2141 var arg_request = buildRollbackRequest();
2107 var arg_projectId = "foo"; 2142 var arg_projectId = "foo";
2108 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2143 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2109 var obj = new api.RollbackRequest.fromJson(json); 2144 var obj = new api.RollbackRequest.fromJson(json);
2110 checkRollbackRequest(obj); 2145 checkRollbackRequest(obj);
2111 2146
2112 var path = (req.url).path; 2147 var path = (req.url).path;
2113 var pathOffset = 0; 2148 var pathOffset = 0;
2114 var index; 2149 var index;
2115 var subPart; 2150 var subPart;
2116 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2151 unittest.expect(
2152 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2117 pathOffset += 1; 2153 pathOffset += 1;
2118 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 2154 unittest.expect(path.substring(pathOffset, pathOffset + 12),
2155 unittest.equals("v1/projects/"));
2119 pathOffset += 12; 2156 pathOffset += 12;
2120 index = path.indexOf(":rollback", pathOffset); 2157 index = path.indexOf(":rollback", pathOffset);
2121 unittest.expect(index >= 0, unittest.isTrue); 2158 unittest.expect(index >= 0, unittest.isTrue);
2122 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 2159 subPart =
2160 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
2123 pathOffset = index; 2161 pathOffset = index;
2124 unittest.expect(subPart, unittest.equals("$arg_projectId")); 2162 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2125 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als(":rollback")); 2163 unittest.expect(path.substring(pathOffset, pathOffset + 9),
2164 unittest.equals(":rollback"));
2126 pathOffset += 9; 2165 pathOffset += 9;
2127 2166
2128 var query = (req.url).query; 2167 var query = (req.url).query;
2129 var queryOffset = 0; 2168 var queryOffset = 0;
2130 var queryMap = {}; 2169 var queryMap = {};
2131 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2170 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2132 parseBool(n) { 2171 parseBool(n) {
2133 if (n == "true") return true; 2172 if (n == "true") return true;
2134 if (n == "false") return false; 2173 if (n == "false") return false;
2135 if (n == null) return null; 2174 if (n == null) return null;
2136 throw new core.ArgumentError("Invalid boolean: $n"); 2175 throw new core.ArgumentError("Invalid boolean: $n");
2137 } 2176 }
2177
2138 if (query.length > 0) { 2178 if (query.length > 0) {
2139 for (var part in query.split("&")) { 2179 for (var part in query.split("&")) {
2140 var keyvalue = part.split("="); 2180 var keyvalue = part.split("=");
2141 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2181 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2182 core.Uri.decodeQueryComponent(keyvalue[1]));
2142 } 2183 }
2143 } 2184 }
2144 2185
2145
2146 var h = { 2186 var h = {
2147 "content-type" : "application/json; charset=utf-8", 2187 "content-type": "application/json; charset=utf-8",
2148 }; 2188 };
2149 var resp = convert.JSON.encode(buildRollbackResponse()); 2189 var resp = convert.JSON.encode(buildRollbackResponse());
2150 return new async.Future.value(stringResponse(200, h, resp)); 2190 return new async.Future.value(stringResponse(200, h, resp));
2151 }), true); 2191 }), true);
2152 res.rollback(arg_request, arg_projectId).then(unittest.expectAsync1(((api. RollbackResponse response) { 2192 res
2193 .rollback(arg_request, arg_projectId)
2194 .then(unittest.expectAsync1(((api.RollbackResponse response) {
2153 checkRollbackResponse(response); 2195 checkRollbackResponse(response);
2154 }))); 2196 })));
2155 }); 2197 });
2156 2198
2157 unittest.test("method--runQuery", () { 2199 unittest.test("method--runQuery", () {
2158
2159 var mock = new HttpServerMock(); 2200 var mock = new HttpServerMock();
2160 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects; 2201 api.ProjectsResourceApi res = new api.DatastoreApi(mock).projects;
2161 var arg_request = buildRunQueryRequest(); 2202 var arg_request = buildRunQueryRequest();
2162 var arg_projectId = "foo"; 2203 var arg_projectId = "foo";
2163 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2204 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2164 var obj = new api.RunQueryRequest.fromJson(json); 2205 var obj = new api.RunQueryRequest.fromJson(json);
2165 checkRunQueryRequest(obj); 2206 checkRunQueryRequest(obj);
2166 2207
2167 var path = (req.url).path; 2208 var path = (req.url).path;
2168 var pathOffset = 0; 2209 var pathOffset = 0;
2169 var index; 2210 var index;
2170 var subPart; 2211 var subPart;
2171 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2212 unittest.expect(
2213 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2172 pathOffset += 1; 2214 pathOffset += 1;
2173 unittest.expect(path.substring(pathOffset, pathOffset + 12), unittest.eq uals("v1/projects/")); 2215 unittest.expect(path.substring(pathOffset, pathOffset + 12),
2216 unittest.equals("v1/projects/"));
2174 pathOffset += 12; 2217 pathOffset += 12;
2175 index = path.indexOf(":runQuery", pathOffset); 2218 index = path.indexOf(":runQuery", pathOffset);
2176 unittest.expect(index >= 0, unittest.isTrue); 2219 unittest.expect(index >= 0, unittest.isTrue);
2177 subPart = core.Uri.decodeQueryComponent(path.substring(pathOffset, index )); 2220 subPart =
2221 core.Uri.decodeQueryComponent(path.substring(pathOffset, index));
2178 pathOffset = index; 2222 pathOffset = index;
2179 unittest.expect(subPart, unittest.equals("$arg_projectId")); 2223 unittest.expect(subPart, unittest.equals("$arg_projectId"));
2180 unittest.expect(path.substring(pathOffset, pathOffset + 9), unittest.equ als(":runQuery")); 2224 unittest.expect(path.substring(pathOffset, pathOffset + 9),
2225 unittest.equals(":runQuery"));
2181 pathOffset += 9; 2226 pathOffset += 9;
2182 2227
2183 var query = (req.url).query; 2228 var query = (req.url).query;
2184 var queryOffset = 0; 2229 var queryOffset = 0;
2185 var queryMap = {}; 2230 var queryMap = {};
2186 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2231 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2187 parseBool(n) { 2232 parseBool(n) {
2188 if (n == "true") return true; 2233 if (n == "true") return true;
2189 if (n == "false") return false; 2234 if (n == "false") return false;
2190 if (n == null) return null; 2235 if (n == null) return null;
2191 throw new core.ArgumentError("Invalid boolean: $n"); 2236 throw new core.ArgumentError("Invalid boolean: $n");
2192 } 2237 }
2238
2193 if (query.length > 0) { 2239 if (query.length > 0) {
2194 for (var part in query.split("&")) { 2240 for (var part in query.split("&")) {
2195 var keyvalue = part.split("="); 2241 var keyvalue = part.split("=");
2196 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2242 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2243 core.Uri.decodeQueryComponent(keyvalue[1]));
2197 } 2244 }
2198 } 2245 }
2199 2246
2200
2201 var h = { 2247 var h = {
2202 "content-type" : "application/json; charset=utf-8", 2248 "content-type": "application/json; charset=utf-8",
2203 }; 2249 };
2204 var resp = convert.JSON.encode(buildRunQueryResponse()); 2250 var resp = convert.JSON.encode(buildRunQueryResponse());
2205 return new async.Future.value(stringResponse(200, h, resp)); 2251 return new async.Future.value(stringResponse(200, h, resp));
2206 }), true); 2252 }), true);
2207 res.runQuery(arg_request, arg_projectId).then(unittest.expectAsync1(((api. RunQueryResponse response) { 2253 res
2254 .runQuery(arg_request, arg_projectId)
2255 .then(unittest.expectAsync1(((api.RunQueryResponse response) {
2208 checkRunQueryResponse(response); 2256 checkRunQueryResponse(response);
2209 }))); 2257 })));
2210 }); 2258 });
2211
2212 }); 2259 });
2213 2260
2214
2215 unittest.group("resource-ProjectsOperationsResourceApi", () { 2261 unittest.group("resource-ProjectsOperationsResourceApi", () {
2216 unittest.test("method--cancel", () { 2262 unittest.test("method--cancel", () {
2217
2218 var mock = new HttpServerMock(); 2263 var mock = new HttpServerMock();
2219 api.ProjectsOperationsResourceApi res = new api.DatastoreApi(mock).project s.operations; 2264 api.ProjectsOperationsResourceApi res =
2265 new api.DatastoreApi(mock).projects.operations;
2220 var arg_name = "foo"; 2266 var arg_name = "foo";
2221 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2267 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2222 var path = (req.url).path; 2268 var path = (req.url).path;
2223 var pathOffset = 0; 2269 var pathOffset = 0;
2224 var index; 2270 var index;
2225 var subPart; 2271 var subPart;
2226 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2272 unittest.expect(
2273 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2227 pathOffset += 1; 2274 pathOffset += 1;
2228 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2275 unittest.expect(
2276 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
2229 pathOffset += 3; 2277 pathOffset += 3;
2230 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2278 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2231 2279
2232 var query = (req.url).query; 2280 var query = (req.url).query;
2233 var queryOffset = 0; 2281 var queryOffset = 0;
2234 var queryMap = {}; 2282 var queryMap = {};
2235 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2283 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2236 parseBool(n) { 2284 parseBool(n) {
2237 if (n == "true") return true; 2285 if (n == "true") return true;
2238 if (n == "false") return false; 2286 if (n == "false") return false;
2239 if (n == null) return null; 2287 if (n == null) return null;
2240 throw new core.ArgumentError("Invalid boolean: $n"); 2288 throw new core.ArgumentError("Invalid boolean: $n");
2241 } 2289 }
2290
2242 if (query.length > 0) { 2291 if (query.length > 0) {
2243 for (var part in query.split("&")) { 2292 for (var part in query.split("&")) {
2244 var keyvalue = part.split("="); 2293 var keyvalue = part.split("=");
2245 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2294 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2295 core.Uri.decodeQueryComponent(keyvalue[1]));
2246 } 2296 }
2247 } 2297 }
2248 2298
2249
2250 var h = { 2299 var h = {
2251 "content-type" : "application/json; charset=utf-8", 2300 "content-type": "application/json; charset=utf-8",
2252 }; 2301 };
2253 var resp = convert.JSON.encode(buildEmpty()); 2302 var resp = convert.JSON.encode(buildEmpty());
2254 return new async.Future.value(stringResponse(200, h, resp)); 2303 return new async.Future.value(stringResponse(200, h, resp));
2255 }), true); 2304 }), true);
2256 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) { 2305 res.cancel(arg_name).then(unittest.expectAsync1(((api.Empty response) {
2257 checkEmpty(response); 2306 checkEmpty(response);
2258 }))); 2307 })));
2259 }); 2308 });
2260 2309
2261 unittest.test("method--delete", () { 2310 unittest.test("method--delete", () {
2262
2263 var mock = new HttpServerMock(); 2311 var mock = new HttpServerMock();
2264 api.ProjectsOperationsResourceApi res = new api.DatastoreApi(mock).project s.operations; 2312 api.ProjectsOperationsResourceApi res =
2313 new api.DatastoreApi(mock).projects.operations;
2265 var arg_name = "foo"; 2314 var arg_name = "foo";
2266 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2315 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2267 var path = (req.url).path; 2316 var path = (req.url).path;
2268 var pathOffset = 0; 2317 var pathOffset = 0;
2269 var index; 2318 var index;
2270 var subPart; 2319 var subPart;
2271 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2320 unittest.expect(
2321 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2272 pathOffset += 1; 2322 pathOffset += 1;
2273 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2323 unittest.expect(
2324 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
2274 pathOffset += 3; 2325 pathOffset += 3;
2275 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2326 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2276 2327
2277 var query = (req.url).query; 2328 var query = (req.url).query;
2278 var queryOffset = 0; 2329 var queryOffset = 0;
2279 var queryMap = {}; 2330 var queryMap = {};
2280 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2331 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2281 parseBool(n) { 2332 parseBool(n) {
2282 if (n == "true") return true; 2333 if (n == "true") return true;
2283 if (n == "false") return false; 2334 if (n == "false") return false;
2284 if (n == null) return null; 2335 if (n == null) return null;
2285 throw new core.ArgumentError("Invalid boolean: $n"); 2336 throw new core.ArgumentError("Invalid boolean: $n");
2286 } 2337 }
2338
2287 if (query.length > 0) { 2339 if (query.length > 0) {
2288 for (var part in query.split("&")) { 2340 for (var part in query.split("&")) {
2289 var keyvalue = part.split("="); 2341 var keyvalue = part.split("=");
2290 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2342 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2343 core.Uri.decodeQueryComponent(keyvalue[1]));
2291 } 2344 }
2292 } 2345 }
2293 2346
2294
2295 var h = { 2347 var h = {
2296 "content-type" : "application/json; charset=utf-8", 2348 "content-type": "application/json; charset=utf-8",
2297 }; 2349 };
2298 var resp = convert.JSON.encode(buildEmpty()); 2350 var resp = convert.JSON.encode(buildEmpty());
2299 return new async.Future.value(stringResponse(200, h, resp)); 2351 return new async.Future.value(stringResponse(200, h, resp));
2300 }), true); 2352 }), true);
2301 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) { 2353 res.delete(arg_name).then(unittest.expectAsync1(((api.Empty response) {
2302 checkEmpty(response); 2354 checkEmpty(response);
2303 }))); 2355 })));
2304 }); 2356 });
2305 2357
2306 unittest.test("method--get", () { 2358 unittest.test("method--get", () {
2307
2308 var mock = new HttpServerMock(); 2359 var mock = new HttpServerMock();
2309 api.ProjectsOperationsResourceApi res = new api.DatastoreApi(mock).project s.operations; 2360 api.ProjectsOperationsResourceApi res =
2361 new api.DatastoreApi(mock).projects.operations;
2310 var arg_name = "foo"; 2362 var arg_name = "foo";
2311 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2363 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2312 var path = (req.url).path; 2364 var path = (req.url).path;
2313 var pathOffset = 0; 2365 var pathOffset = 0;
2314 var index; 2366 var index;
2315 var subPart; 2367 var subPart;
2316 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2368 unittest.expect(
2369 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2317 pathOffset += 1; 2370 pathOffset += 1;
2318 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2371 unittest.expect(
2372 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
2319 pathOffset += 3; 2373 pathOffset += 3;
2320 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2374 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2321 2375
2322 var query = (req.url).query; 2376 var query = (req.url).query;
2323 var queryOffset = 0; 2377 var queryOffset = 0;
2324 var queryMap = {}; 2378 var queryMap = {};
2325 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2379 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2326 parseBool(n) { 2380 parseBool(n) {
2327 if (n == "true") return true; 2381 if (n == "true") return true;
2328 if (n == "false") return false; 2382 if (n == "false") return false;
2329 if (n == null) return null; 2383 if (n == null) return null;
2330 throw new core.ArgumentError("Invalid boolean: $n"); 2384 throw new core.ArgumentError("Invalid boolean: $n");
2331 } 2385 }
2386
2332 if (query.length > 0) { 2387 if (query.length > 0) {
2333 for (var part in query.split("&")) { 2388 for (var part in query.split("&")) {
2334 var keyvalue = part.split("="); 2389 var keyvalue = part.split("=");
2335 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2390 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2391 core.Uri.decodeQueryComponent(keyvalue[1]));
2336 } 2392 }
2337 } 2393 }
2338 2394
2339
2340 var h = { 2395 var h = {
2341 "content-type" : "application/json; charset=utf-8", 2396 "content-type": "application/json; charset=utf-8",
2342 }; 2397 };
2343 var resp = convert.JSON.encode(buildGoogleLongrunningOperation()); 2398 var resp = convert.JSON.encode(buildGoogleLongrunningOperation());
2344 return new async.Future.value(stringResponse(200, h, resp)); 2399 return new async.Future.value(stringResponse(200, h, resp));
2345 }), true); 2400 }), true);
2346 res.get(arg_name).then(unittest.expectAsync1(((api.GoogleLongrunningOperat ion response) { 2401 res.get(arg_name).then(
2402 unittest.expectAsync1(((api.GoogleLongrunningOperation response) {
2347 checkGoogleLongrunningOperation(response); 2403 checkGoogleLongrunningOperation(response);
2348 }))); 2404 })));
2349 }); 2405 });
2350 2406
2351 unittest.test("method--list", () { 2407 unittest.test("method--list", () {
2352
2353 var mock = new HttpServerMock(); 2408 var mock = new HttpServerMock();
2354 api.ProjectsOperationsResourceApi res = new api.DatastoreApi(mock).project s.operations; 2409 api.ProjectsOperationsResourceApi res =
2410 new api.DatastoreApi(mock).projects.operations;
2355 var arg_name = "foo"; 2411 var arg_name = "foo";
2356 var arg_pageSize = 42; 2412 var arg_pageSize = 42;
2357 var arg_filter = "foo"; 2413 var arg_filter = "foo";
2358 var arg_pageToken = "foo"; 2414 var arg_pageToken = "foo";
2359 mock.register(unittest.expectAsync2((http.BaseRequest req, json) { 2415 mock.register(unittest.expectAsync2((http.BaseRequest req, json) {
2360 var path = (req.url).path; 2416 var path = (req.url).path;
2361 var pathOffset = 0; 2417 var pathOffset = 0;
2362 var index; 2418 var index;
2363 var subPart; 2419 var subPart;
2364 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ als("/")); 2420 unittest.expect(
2421 path.substring(pathOffset, pathOffset + 1), unittest.equals("/"));
2365 pathOffset += 1; 2422 pathOffset += 1;
2366 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ als("v1/")); 2423 unittest.expect(
2424 path.substring(pathOffset, pathOffset + 3), unittest.equals("v1/"));
2367 pathOffset += 3; 2425 pathOffset += 3;
2368 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation; 2426 // NOTE: We cannot test reserved expansions due to the inability to reve rse the operation;
2369 2427
2370 var query = (req.url).query; 2428 var query = (req.url).query;
2371 var queryOffset = 0; 2429 var queryOffset = 0;
2372 var queryMap = {}; 2430 var queryMap = {};
2373 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); 2431 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v);
2374 parseBool(n) { 2432 parseBool(n) {
2375 if (n == "true") return true; 2433 if (n == "true") return true;
2376 if (n == "false") return false; 2434 if (n == "false") return false;
2377 if (n == null) return null; 2435 if (n == null) return null;
2378 throw new core.ArgumentError("Invalid boolean: $n"); 2436 throw new core.ArgumentError("Invalid boolean: $n");
2379 } 2437 }
2438
2380 if (query.length > 0) { 2439 if (query.length > 0) {
2381 for (var part in query.split("&")) { 2440 for (var part in query.split("&")) {
2382 var keyvalue = part.split("="); 2441 var keyvalue = part.split("=");
2383 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d ecodeQueryComponent(keyvalue[1])); 2442 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]),
2443 core.Uri.decodeQueryComponent(keyvalue[1]));
2384 } 2444 }
2385 } 2445 }
2386 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ als(arg_pageSize)); 2446 unittest.expect(core.int.parse(queryMap["pageSize"].first),
2447 unittest.equals(arg_pageSize));
2387 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); 2448 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter));
2388 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok en)); 2449 unittest.expect(
2389 2450 queryMap["pageToken"].first, unittest.equals(arg_pageToken));
2390 2451
2391 var h = { 2452 var h = {
2392 "content-type" : "application/json; charset=utf-8", 2453 "content-type": "application/json; charset=utf-8",
2393 }; 2454 };
2394 var resp = convert.JSON.encode(buildGoogleLongrunningListOperationsRespo nse()); 2455 var resp =
2456 convert.JSON.encode(buildGoogleLongrunningListOperationsResponse());
2395 return new async.Future.value(stringResponse(200, h, resp)); 2457 return new async.Future.value(stringResponse(200, h, resp));
2396 }), true); 2458 }), true);
2397 res.list(arg_name, pageSize: arg_pageSize, filter: arg_filter, pageToken: arg_pageToken).then(unittest.expectAsync1(((api.GoogleLongrunningListOperationsR esponse response) { 2459 res
2460 .list(arg_name,
2461 pageSize: arg_pageSize,
2462 filter: arg_filter,
2463 pageToken: arg_pageToken)
2464 .then(unittest.expectAsync1(
2465 ((api.GoogleLongrunningListOperationsResponse response) {
2398 checkGoogleLongrunningListOperationsResponse(response); 2466 checkGoogleLongrunningListOperationsResponse(response);
2399 }))); 2467 })));
2400 }); 2468 });
2401
2402 }); 2469 });
2403
2404
2405 } 2470 }
2406
OLDNEW
« no previous file with comments | « generated/googleapis/test/dataproc/v1_test.dart ('k') | generated/googleapis/test/deploymentmanager/v2_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698