OLD | NEW |
1 library googleapis.deploymentmanager.v2.test; | 1 library googleapis.deploymentmanager.v2.test; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import 'package:http/http.dart' as http; | 8 import 'package:http/http.dart' as http; |
9 import 'package:http/testing.dart' as http_testing; | 9 import 'package:http/testing.dart' as http_testing; |
10 import 'package:unittest/unittest.dart' as unittest; | 10 import 'package:unittest/unittest.dart' as unittest; |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 } | 44 } |
45 } | 45 } |
46 } | 46 } |
47 | 47 |
48 http.StreamedResponse stringResponse( | 48 http.StreamedResponse stringResponse( |
49 core.int status, core.Map headers, core.String body) { | 49 core.int status, core.Map headers, core.String body) { |
50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); | 50 var stream = new async.Stream.fromIterable([convert.UTF8.encode(body)]); |
51 return new http.StreamedResponse(stream, status, headers: headers); | 51 return new http.StreamedResponse(stream, status, headers: headers); |
52 } | 52 } |
53 | 53 |
| 54 buildUnnamed2172() { |
| 55 var o = new core.List<core.String>(); |
| 56 o.add("foo"); |
| 57 o.add("foo"); |
| 58 return o; |
| 59 } |
| 60 |
| 61 checkUnnamed2172(core.List<core.String> o) { |
| 62 unittest.expect(o, unittest.hasLength(2)); |
| 63 unittest.expect(o[0], unittest.equals('foo')); |
| 64 unittest.expect(o[1], unittest.equals('foo')); |
| 65 } |
| 66 |
| 67 core.int buildCounterAuditConfig = 0; |
| 68 buildAuditConfig() { |
| 69 var o = new api.AuditConfig(); |
| 70 buildCounterAuditConfig++; |
| 71 if (buildCounterAuditConfig < 3) { |
| 72 o.exemptedMembers = buildUnnamed2172(); |
| 73 o.service = "foo"; |
| 74 } |
| 75 buildCounterAuditConfig--; |
| 76 return o; |
| 77 } |
| 78 |
| 79 checkAuditConfig(api.AuditConfig o) { |
| 80 buildCounterAuditConfig++; |
| 81 if (buildCounterAuditConfig < 3) { |
| 82 checkUnnamed2172(o.exemptedMembers); |
| 83 unittest.expect(o.service, unittest.equals('foo')); |
| 84 } |
| 85 buildCounterAuditConfig--; |
| 86 } |
| 87 |
| 88 buildUnnamed2173() { |
| 89 var o = new core.List<core.String>(); |
| 90 o.add("foo"); |
| 91 o.add("foo"); |
| 92 return o; |
| 93 } |
| 94 |
| 95 checkUnnamed2173(core.List<core.String> o) { |
| 96 unittest.expect(o, unittest.hasLength(2)); |
| 97 unittest.expect(o[0], unittest.equals('foo')); |
| 98 unittest.expect(o[1], unittest.equals('foo')); |
| 99 } |
| 100 |
| 101 core.int buildCounterBinding = 0; |
| 102 buildBinding() { |
| 103 var o = new api.Binding(); |
| 104 buildCounterBinding++; |
| 105 if (buildCounterBinding < 3) { |
| 106 o.members = buildUnnamed2173(); |
| 107 o.role = "foo"; |
| 108 } |
| 109 buildCounterBinding--; |
| 110 return o; |
| 111 } |
| 112 |
| 113 checkBinding(api.Binding o) { |
| 114 buildCounterBinding++; |
| 115 if (buildCounterBinding < 3) { |
| 116 checkUnnamed2173(o.members); |
| 117 unittest.expect(o.role, unittest.equals('foo')); |
| 118 } |
| 119 buildCounterBinding--; |
| 120 } |
| 121 |
| 122 buildUnnamed2174() { |
| 123 var o = new core.List<core.String>(); |
| 124 o.add("foo"); |
| 125 o.add("foo"); |
| 126 return o; |
| 127 } |
| 128 |
| 129 checkUnnamed2174(core.List<core.String> o) { |
| 130 unittest.expect(o, unittest.hasLength(2)); |
| 131 unittest.expect(o[0], unittest.equals('foo')); |
| 132 unittest.expect(o[1], unittest.equals('foo')); |
| 133 } |
| 134 |
| 135 core.int buildCounterCondition = 0; |
| 136 buildCondition() { |
| 137 var o = new api.Condition(); |
| 138 buildCounterCondition++; |
| 139 if (buildCounterCondition < 3) { |
| 140 o.iam = "foo"; |
| 141 o.op = "foo"; |
| 142 o.svc = "foo"; |
| 143 o.sys = "foo"; |
| 144 o.value = "foo"; |
| 145 o.values = buildUnnamed2174(); |
| 146 } |
| 147 buildCounterCondition--; |
| 148 return o; |
| 149 } |
| 150 |
| 151 checkCondition(api.Condition o) { |
| 152 buildCounterCondition++; |
| 153 if (buildCounterCondition < 3) { |
| 154 unittest.expect(o.iam, unittest.equals('foo')); |
| 155 unittest.expect(o.op, unittest.equals('foo')); |
| 156 unittest.expect(o.svc, unittest.equals('foo')); |
| 157 unittest.expect(o.sys, unittest.equals('foo')); |
| 158 unittest.expect(o.value, unittest.equals('foo')); |
| 159 checkUnnamed2174(o.values); |
| 160 } |
| 161 buildCounterCondition--; |
| 162 } |
| 163 |
54 core.int buildCounterConfigFile = 0; | 164 core.int buildCounterConfigFile = 0; |
55 buildConfigFile() { | 165 buildConfigFile() { |
56 var o = new api.ConfigFile(); | 166 var o = new api.ConfigFile(); |
57 buildCounterConfigFile++; | 167 buildCounterConfigFile++; |
58 if (buildCounterConfigFile < 3) { | 168 if (buildCounterConfigFile < 3) { |
59 o.content = "foo"; | 169 o.content = "foo"; |
60 } | 170 } |
61 buildCounterConfigFile--; | 171 buildCounterConfigFile--; |
62 return o; | 172 return o; |
63 } | 173 } |
64 | 174 |
65 checkConfigFile(api.ConfigFile o) { | 175 checkConfigFile(api.ConfigFile o) { |
66 buildCounterConfigFile++; | 176 buildCounterConfigFile++; |
67 if (buildCounterConfigFile < 3) { | 177 if (buildCounterConfigFile < 3) { |
68 unittest.expect(o.content, unittest.equals('foo')); | 178 unittest.expect(o.content, unittest.equals('foo')); |
69 } | 179 } |
70 buildCounterConfigFile--; | 180 buildCounterConfigFile--; |
71 } | 181 } |
72 | 182 |
73 buildUnnamed2408() { | 183 buildUnnamed2175() { |
74 var o = new core.List<api.DeploymentLabelEntry>(); | 184 var o = new core.List<api.DeploymentLabelEntry>(); |
75 o.add(buildDeploymentLabelEntry()); | 185 o.add(buildDeploymentLabelEntry()); |
76 o.add(buildDeploymentLabelEntry()); | 186 o.add(buildDeploymentLabelEntry()); |
77 return o; | 187 return o; |
78 } | 188 } |
79 | 189 |
80 checkUnnamed2408(core.List<api.DeploymentLabelEntry> o) { | 190 checkUnnamed2175(core.List<api.DeploymentLabelEntry> o) { |
81 unittest.expect(o, unittest.hasLength(2)); | 191 unittest.expect(o, unittest.hasLength(2)); |
82 checkDeploymentLabelEntry(o[0]); | 192 checkDeploymentLabelEntry(o[0]); |
83 checkDeploymentLabelEntry(o[1]); | 193 checkDeploymentLabelEntry(o[1]); |
84 } | 194 } |
85 | 195 |
86 core.int buildCounterDeployment = 0; | 196 core.int buildCounterDeployment = 0; |
87 buildDeployment() { | 197 buildDeployment() { |
88 var o = new api.Deployment(); | 198 var o = new api.Deployment(); |
89 buildCounterDeployment++; | 199 buildCounterDeployment++; |
90 if (buildCounterDeployment < 3) { | 200 if (buildCounterDeployment < 3) { |
91 o.description = "foo"; | 201 o.description = "foo"; |
92 o.fingerprint = "foo"; | 202 o.fingerprint = "foo"; |
93 o.id = "foo"; | 203 o.id = "foo"; |
94 o.insertTime = "foo"; | 204 o.insertTime = "foo"; |
95 o.labels = buildUnnamed2408(); | 205 o.labels = buildUnnamed2175(); |
96 o.manifest = "foo"; | 206 o.manifest = "foo"; |
97 o.name = "foo"; | 207 o.name = "foo"; |
98 o.operation = buildOperation(); | 208 o.operation = buildOperation(); |
99 o.selfLink = "foo"; | 209 o.selfLink = "foo"; |
100 o.target = buildTargetConfiguration(); | 210 o.target = buildTargetConfiguration(); |
101 o.update = buildDeploymentUpdate(); | 211 o.update = buildDeploymentUpdate(); |
102 } | 212 } |
103 buildCounterDeployment--; | 213 buildCounterDeployment--; |
104 return o; | 214 return o; |
105 } | 215 } |
106 | 216 |
107 checkDeployment(api.Deployment o) { | 217 checkDeployment(api.Deployment o) { |
108 buildCounterDeployment++; | 218 buildCounterDeployment++; |
109 if (buildCounterDeployment < 3) { | 219 if (buildCounterDeployment < 3) { |
110 unittest.expect(o.description, unittest.equals('foo')); | 220 unittest.expect(o.description, unittest.equals('foo')); |
111 unittest.expect(o.fingerprint, unittest.equals('foo')); | 221 unittest.expect(o.fingerprint, unittest.equals('foo')); |
112 unittest.expect(o.id, unittest.equals('foo')); | 222 unittest.expect(o.id, unittest.equals('foo')); |
113 unittest.expect(o.insertTime, unittest.equals('foo')); | 223 unittest.expect(o.insertTime, unittest.equals('foo')); |
114 checkUnnamed2408(o.labels); | 224 checkUnnamed2175(o.labels); |
115 unittest.expect(o.manifest, unittest.equals('foo')); | 225 unittest.expect(o.manifest, unittest.equals('foo')); |
116 unittest.expect(o.name, unittest.equals('foo')); | 226 unittest.expect(o.name, unittest.equals('foo')); |
117 checkOperation(o.operation); | 227 checkOperation(o.operation); |
118 unittest.expect(o.selfLink, unittest.equals('foo')); | 228 unittest.expect(o.selfLink, unittest.equals('foo')); |
119 checkTargetConfiguration(o.target); | 229 checkTargetConfiguration(o.target); |
120 checkDeploymentUpdate(o.update); | 230 checkDeploymentUpdate(o.update); |
121 } | 231 } |
122 buildCounterDeployment--; | 232 buildCounterDeployment--; |
123 } | 233 } |
124 | 234 |
(...skipping 11 matching lines...) Expand all Loading... |
136 | 246 |
137 checkDeploymentLabelEntry(api.DeploymentLabelEntry o) { | 247 checkDeploymentLabelEntry(api.DeploymentLabelEntry o) { |
138 buildCounterDeploymentLabelEntry++; | 248 buildCounterDeploymentLabelEntry++; |
139 if (buildCounterDeploymentLabelEntry < 3) { | 249 if (buildCounterDeploymentLabelEntry < 3) { |
140 unittest.expect(o.key, unittest.equals('foo')); | 250 unittest.expect(o.key, unittest.equals('foo')); |
141 unittest.expect(o.value, unittest.equals('foo')); | 251 unittest.expect(o.value, unittest.equals('foo')); |
142 } | 252 } |
143 buildCounterDeploymentLabelEntry--; | 253 buildCounterDeploymentLabelEntry--; |
144 } | 254 } |
145 | 255 |
146 buildUnnamed2409() { | 256 buildUnnamed2176() { |
147 var o = new core.List<api.DeploymentUpdateLabelEntry>(); | 257 var o = new core.List<api.DeploymentUpdateLabelEntry>(); |
148 o.add(buildDeploymentUpdateLabelEntry()); | 258 o.add(buildDeploymentUpdateLabelEntry()); |
149 o.add(buildDeploymentUpdateLabelEntry()); | 259 o.add(buildDeploymentUpdateLabelEntry()); |
150 return o; | 260 return o; |
151 } | 261 } |
152 | 262 |
153 checkUnnamed2409(core.List<api.DeploymentUpdateLabelEntry> o) { | 263 checkUnnamed2176(core.List<api.DeploymentUpdateLabelEntry> o) { |
154 unittest.expect(o, unittest.hasLength(2)); | 264 unittest.expect(o, unittest.hasLength(2)); |
155 checkDeploymentUpdateLabelEntry(o[0]); | 265 checkDeploymentUpdateLabelEntry(o[0]); |
156 checkDeploymentUpdateLabelEntry(o[1]); | 266 checkDeploymentUpdateLabelEntry(o[1]); |
157 } | 267 } |
158 | 268 |
159 core.int buildCounterDeploymentUpdate = 0; | 269 core.int buildCounterDeploymentUpdate = 0; |
160 buildDeploymentUpdate() { | 270 buildDeploymentUpdate() { |
161 var o = new api.DeploymentUpdate(); | 271 var o = new api.DeploymentUpdate(); |
162 buildCounterDeploymentUpdate++; | 272 buildCounterDeploymentUpdate++; |
163 if (buildCounterDeploymentUpdate < 3) { | 273 if (buildCounterDeploymentUpdate < 3) { |
164 o.labels = buildUnnamed2409(); | 274 o.labels = buildUnnamed2176(); |
165 o.manifest = "foo"; | 275 o.manifest = "foo"; |
166 } | 276 } |
167 buildCounterDeploymentUpdate--; | 277 buildCounterDeploymentUpdate--; |
168 return o; | 278 return o; |
169 } | 279 } |
170 | 280 |
171 checkDeploymentUpdate(api.DeploymentUpdate o) { | 281 checkDeploymentUpdate(api.DeploymentUpdate o) { |
172 buildCounterDeploymentUpdate++; | 282 buildCounterDeploymentUpdate++; |
173 if (buildCounterDeploymentUpdate < 3) { | 283 if (buildCounterDeploymentUpdate < 3) { |
174 checkUnnamed2409(o.labels); | 284 checkUnnamed2176(o.labels); |
175 unittest.expect(o.manifest, unittest.equals('foo')); | 285 unittest.expect(o.manifest, unittest.equals('foo')); |
176 } | 286 } |
177 buildCounterDeploymentUpdate--; | 287 buildCounterDeploymentUpdate--; |
178 } | 288 } |
179 | 289 |
180 core.int buildCounterDeploymentUpdateLabelEntry = 0; | 290 core.int buildCounterDeploymentUpdateLabelEntry = 0; |
181 buildDeploymentUpdateLabelEntry() { | 291 buildDeploymentUpdateLabelEntry() { |
182 var o = new api.DeploymentUpdateLabelEntry(); | 292 var o = new api.DeploymentUpdateLabelEntry(); |
183 buildCounterDeploymentUpdateLabelEntry++; | 293 buildCounterDeploymentUpdateLabelEntry++; |
184 if (buildCounterDeploymentUpdateLabelEntry < 3) { | 294 if (buildCounterDeploymentUpdateLabelEntry < 3) { |
(...skipping 25 matching lines...) Expand all Loading... |
210 } | 320 } |
211 | 321 |
212 checkDeploymentsCancelPreviewRequest(api.DeploymentsCancelPreviewRequest o) { | 322 checkDeploymentsCancelPreviewRequest(api.DeploymentsCancelPreviewRequest o) { |
213 buildCounterDeploymentsCancelPreviewRequest++; | 323 buildCounterDeploymentsCancelPreviewRequest++; |
214 if (buildCounterDeploymentsCancelPreviewRequest < 3) { | 324 if (buildCounterDeploymentsCancelPreviewRequest < 3) { |
215 unittest.expect(o.fingerprint, unittest.equals('foo')); | 325 unittest.expect(o.fingerprint, unittest.equals('foo')); |
216 } | 326 } |
217 buildCounterDeploymentsCancelPreviewRequest--; | 327 buildCounterDeploymentsCancelPreviewRequest--; |
218 } | 328 } |
219 | 329 |
220 buildUnnamed2410() { | 330 buildUnnamed2177() { |
221 var o = new core.List<api.Deployment>(); | 331 var o = new core.List<api.Deployment>(); |
222 o.add(buildDeployment()); | 332 o.add(buildDeployment()); |
223 o.add(buildDeployment()); | 333 o.add(buildDeployment()); |
224 return o; | 334 return o; |
225 } | 335 } |
226 | 336 |
227 checkUnnamed2410(core.List<api.Deployment> o) { | 337 checkUnnamed2177(core.List<api.Deployment> o) { |
228 unittest.expect(o, unittest.hasLength(2)); | 338 unittest.expect(o, unittest.hasLength(2)); |
229 checkDeployment(o[0]); | 339 checkDeployment(o[0]); |
230 checkDeployment(o[1]); | 340 checkDeployment(o[1]); |
231 } | 341 } |
232 | 342 |
233 core.int buildCounterDeploymentsListResponse = 0; | 343 core.int buildCounterDeploymentsListResponse = 0; |
234 buildDeploymentsListResponse() { | 344 buildDeploymentsListResponse() { |
235 var o = new api.DeploymentsListResponse(); | 345 var o = new api.DeploymentsListResponse(); |
236 buildCounterDeploymentsListResponse++; | 346 buildCounterDeploymentsListResponse++; |
237 if (buildCounterDeploymentsListResponse < 3) { | 347 if (buildCounterDeploymentsListResponse < 3) { |
238 o.deployments = buildUnnamed2410(); | 348 o.deployments = buildUnnamed2177(); |
239 o.nextPageToken = "foo"; | 349 o.nextPageToken = "foo"; |
240 } | 350 } |
241 buildCounterDeploymentsListResponse--; | 351 buildCounterDeploymentsListResponse--; |
242 return o; | 352 return o; |
243 } | 353 } |
244 | 354 |
245 checkDeploymentsListResponse(api.DeploymentsListResponse o) { | 355 checkDeploymentsListResponse(api.DeploymentsListResponse o) { |
246 buildCounterDeploymentsListResponse++; | 356 buildCounterDeploymentsListResponse++; |
247 if (buildCounterDeploymentsListResponse < 3) { | 357 if (buildCounterDeploymentsListResponse < 3) { |
248 checkUnnamed2410(o.deployments); | 358 checkUnnamed2177(o.deployments); |
249 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 359 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
250 } | 360 } |
251 buildCounterDeploymentsListResponse--; | 361 buildCounterDeploymentsListResponse--; |
252 } | 362 } |
253 | 363 |
254 core.int buildCounterDeploymentsStopRequest = 0; | 364 core.int buildCounterDeploymentsStopRequest = 0; |
255 buildDeploymentsStopRequest() { | 365 buildDeploymentsStopRequest() { |
256 var o = new api.DeploymentsStopRequest(); | 366 var o = new api.DeploymentsStopRequest(); |
257 buildCounterDeploymentsStopRequest++; | 367 buildCounterDeploymentsStopRequest++; |
258 if (buildCounterDeploymentsStopRequest < 3) { | 368 if (buildCounterDeploymentsStopRequest < 3) { |
(...skipping 25 matching lines...) Expand all Loading... |
284 | 394 |
285 checkImportFile(api.ImportFile o) { | 395 checkImportFile(api.ImportFile o) { |
286 buildCounterImportFile++; | 396 buildCounterImportFile++; |
287 if (buildCounterImportFile < 3) { | 397 if (buildCounterImportFile < 3) { |
288 unittest.expect(o.content, unittest.equals('foo')); | 398 unittest.expect(o.content, unittest.equals('foo')); |
289 unittest.expect(o.name, unittest.equals('foo')); | 399 unittest.expect(o.name, unittest.equals('foo')); |
290 } | 400 } |
291 buildCounterImportFile--; | 401 buildCounterImportFile--; |
292 } | 402 } |
293 | 403 |
294 buildUnnamed2411() { | 404 core.int buildCounterLogConfig = 0; |
| 405 buildLogConfig() { |
| 406 var o = new api.LogConfig(); |
| 407 buildCounterLogConfig++; |
| 408 if (buildCounterLogConfig < 3) { |
| 409 o.counter = buildLogConfigCounterOptions(); |
| 410 } |
| 411 buildCounterLogConfig--; |
| 412 return o; |
| 413 } |
| 414 |
| 415 checkLogConfig(api.LogConfig o) { |
| 416 buildCounterLogConfig++; |
| 417 if (buildCounterLogConfig < 3) { |
| 418 checkLogConfigCounterOptions(o.counter); |
| 419 } |
| 420 buildCounterLogConfig--; |
| 421 } |
| 422 |
| 423 core.int buildCounterLogConfigCounterOptions = 0; |
| 424 buildLogConfigCounterOptions() { |
| 425 var o = new api.LogConfigCounterOptions(); |
| 426 buildCounterLogConfigCounterOptions++; |
| 427 if (buildCounterLogConfigCounterOptions < 3) { |
| 428 o.field = "foo"; |
| 429 o.metric = "foo"; |
| 430 } |
| 431 buildCounterLogConfigCounterOptions--; |
| 432 return o; |
| 433 } |
| 434 |
| 435 checkLogConfigCounterOptions(api.LogConfigCounterOptions o) { |
| 436 buildCounterLogConfigCounterOptions++; |
| 437 if (buildCounterLogConfigCounterOptions < 3) { |
| 438 unittest.expect(o.field, unittest.equals('foo')); |
| 439 unittest.expect(o.metric, unittest.equals('foo')); |
| 440 } |
| 441 buildCounterLogConfigCounterOptions--; |
| 442 } |
| 443 |
| 444 buildUnnamed2178() { |
295 var o = new core.List<api.ImportFile>(); | 445 var o = new core.List<api.ImportFile>(); |
296 o.add(buildImportFile()); | 446 o.add(buildImportFile()); |
297 o.add(buildImportFile()); | 447 o.add(buildImportFile()); |
298 return o; | 448 return o; |
299 } | 449 } |
300 | 450 |
301 checkUnnamed2411(core.List<api.ImportFile> o) { | 451 checkUnnamed2178(core.List<api.ImportFile> o) { |
302 unittest.expect(o, unittest.hasLength(2)); | 452 unittest.expect(o, unittest.hasLength(2)); |
303 checkImportFile(o[0]); | 453 checkImportFile(o[0]); |
304 checkImportFile(o[1]); | 454 checkImportFile(o[1]); |
305 } | 455 } |
306 | 456 |
307 core.int buildCounterManifest = 0; | 457 core.int buildCounterManifest = 0; |
308 buildManifest() { | 458 buildManifest() { |
309 var o = new api.Manifest(); | 459 var o = new api.Manifest(); |
310 buildCounterManifest++; | 460 buildCounterManifest++; |
311 if (buildCounterManifest < 3) { | 461 if (buildCounterManifest < 3) { |
312 o.config = buildConfigFile(); | 462 o.config = buildConfigFile(); |
313 o.expandedConfig = "foo"; | 463 o.expandedConfig = "foo"; |
314 o.id = "foo"; | 464 o.id = "foo"; |
315 o.imports = buildUnnamed2411(); | 465 o.imports = buildUnnamed2178(); |
316 o.insertTime = "foo"; | 466 o.insertTime = "foo"; |
317 o.layout = "foo"; | 467 o.layout = "foo"; |
318 o.name = "foo"; | 468 o.name = "foo"; |
319 o.selfLink = "foo"; | 469 o.selfLink = "foo"; |
320 } | 470 } |
321 buildCounterManifest--; | 471 buildCounterManifest--; |
322 return o; | 472 return o; |
323 } | 473 } |
324 | 474 |
325 checkManifest(api.Manifest o) { | 475 checkManifest(api.Manifest o) { |
326 buildCounterManifest++; | 476 buildCounterManifest++; |
327 if (buildCounterManifest < 3) { | 477 if (buildCounterManifest < 3) { |
328 checkConfigFile(o.config); | 478 checkConfigFile(o.config); |
329 unittest.expect(o.expandedConfig, unittest.equals('foo')); | 479 unittest.expect(o.expandedConfig, unittest.equals('foo')); |
330 unittest.expect(o.id, unittest.equals('foo')); | 480 unittest.expect(o.id, unittest.equals('foo')); |
331 checkUnnamed2411(o.imports); | 481 checkUnnamed2178(o.imports); |
332 unittest.expect(o.insertTime, unittest.equals('foo')); | 482 unittest.expect(o.insertTime, unittest.equals('foo')); |
333 unittest.expect(o.layout, unittest.equals('foo')); | 483 unittest.expect(o.layout, unittest.equals('foo')); |
334 unittest.expect(o.name, unittest.equals('foo')); | 484 unittest.expect(o.name, unittest.equals('foo')); |
335 unittest.expect(o.selfLink, unittest.equals('foo')); | 485 unittest.expect(o.selfLink, unittest.equals('foo')); |
336 } | 486 } |
337 buildCounterManifest--; | 487 buildCounterManifest--; |
338 } | 488 } |
339 | 489 |
340 buildUnnamed2412() { | 490 buildUnnamed2179() { |
341 var o = new core.List<api.Manifest>(); | 491 var o = new core.List<api.Manifest>(); |
342 o.add(buildManifest()); | 492 o.add(buildManifest()); |
343 o.add(buildManifest()); | 493 o.add(buildManifest()); |
344 return o; | 494 return o; |
345 } | 495 } |
346 | 496 |
347 checkUnnamed2412(core.List<api.Manifest> o) { | 497 checkUnnamed2179(core.List<api.Manifest> o) { |
348 unittest.expect(o, unittest.hasLength(2)); | 498 unittest.expect(o, unittest.hasLength(2)); |
349 checkManifest(o[0]); | 499 checkManifest(o[0]); |
350 checkManifest(o[1]); | 500 checkManifest(o[1]); |
351 } | 501 } |
352 | 502 |
353 core.int buildCounterManifestsListResponse = 0; | 503 core.int buildCounterManifestsListResponse = 0; |
354 buildManifestsListResponse() { | 504 buildManifestsListResponse() { |
355 var o = new api.ManifestsListResponse(); | 505 var o = new api.ManifestsListResponse(); |
356 buildCounterManifestsListResponse++; | 506 buildCounterManifestsListResponse++; |
357 if (buildCounterManifestsListResponse < 3) { | 507 if (buildCounterManifestsListResponse < 3) { |
358 o.manifests = buildUnnamed2412(); | 508 o.manifests = buildUnnamed2179(); |
359 o.nextPageToken = "foo"; | 509 o.nextPageToken = "foo"; |
360 } | 510 } |
361 buildCounterManifestsListResponse--; | 511 buildCounterManifestsListResponse--; |
362 return o; | 512 return o; |
363 } | 513 } |
364 | 514 |
365 checkManifestsListResponse(api.ManifestsListResponse o) { | 515 checkManifestsListResponse(api.ManifestsListResponse o) { |
366 buildCounterManifestsListResponse++; | 516 buildCounterManifestsListResponse++; |
367 if (buildCounterManifestsListResponse < 3) { | 517 if (buildCounterManifestsListResponse < 3) { |
368 checkUnnamed2412(o.manifests); | 518 checkUnnamed2179(o.manifests); |
369 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 519 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
370 } | 520 } |
371 buildCounterManifestsListResponse--; | 521 buildCounterManifestsListResponse--; |
372 } | 522 } |
373 | 523 |
374 core.int buildCounterOperationErrorErrors = 0; | 524 core.int buildCounterOperationErrorErrors = 0; |
375 buildOperationErrorErrors() { | 525 buildOperationErrorErrors() { |
376 var o = new api.OperationErrorErrors(); | 526 var o = new api.OperationErrorErrors(); |
377 buildCounterOperationErrorErrors++; | 527 buildCounterOperationErrorErrors++; |
378 if (buildCounterOperationErrorErrors < 3) { | 528 if (buildCounterOperationErrorErrors < 3) { |
379 o.code = "foo"; | 529 o.code = "foo"; |
380 o.location = "foo"; | 530 o.location = "foo"; |
381 o.message = "foo"; | 531 o.message = "foo"; |
382 } | 532 } |
383 buildCounterOperationErrorErrors--; | 533 buildCounterOperationErrorErrors--; |
384 return o; | 534 return o; |
385 } | 535 } |
386 | 536 |
387 checkOperationErrorErrors(api.OperationErrorErrors o) { | 537 checkOperationErrorErrors(api.OperationErrorErrors o) { |
388 buildCounterOperationErrorErrors++; | 538 buildCounterOperationErrorErrors++; |
389 if (buildCounterOperationErrorErrors < 3) { | 539 if (buildCounterOperationErrorErrors < 3) { |
390 unittest.expect(o.code, unittest.equals('foo')); | 540 unittest.expect(o.code, unittest.equals('foo')); |
391 unittest.expect(o.location, unittest.equals('foo')); | 541 unittest.expect(o.location, unittest.equals('foo')); |
392 unittest.expect(o.message, unittest.equals('foo')); | 542 unittest.expect(o.message, unittest.equals('foo')); |
393 } | 543 } |
394 buildCounterOperationErrorErrors--; | 544 buildCounterOperationErrorErrors--; |
395 } | 545 } |
396 | 546 |
397 buildUnnamed2413() { | 547 buildUnnamed2180() { |
398 var o = new core.List<api.OperationErrorErrors>(); | 548 var o = new core.List<api.OperationErrorErrors>(); |
399 o.add(buildOperationErrorErrors()); | 549 o.add(buildOperationErrorErrors()); |
400 o.add(buildOperationErrorErrors()); | 550 o.add(buildOperationErrorErrors()); |
401 return o; | 551 return o; |
402 } | 552 } |
403 | 553 |
404 checkUnnamed2413(core.List<api.OperationErrorErrors> o) { | 554 checkUnnamed2180(core.List<api.OperationErrorErrors> o) { |
405 unittest.expect(o, unittest.hasLength(2)); | 555 unittest.expect(o, unittest.hasLength(2)); |
406 checkOperationErrorErrors(o[0]); | 556 checkOperationErrorErrors(o[0]); |
407 checkOperationErrorErrors(o[1]); | 557 checkOperationErrorErrors(o[1]); |
408 } | 558 } |
409 | 559 |
410 core.int buildCounterOperationError = 0; | 560 core.int buildCounterOperationError = 0; |
411 buildOperationError() { | 561 buildOperationError() { |
412 var o = new api.OperationError(); | 562 var o = new api.OperationError(); |
413 buildCounterOperationError++; | 563 buildCounterOperationError++; |
414 if (buildCounterOperationError < 3) { | 564 if (buildCounterOperationError < 3) { |
415 o.errors = buildUnnamed2413(); | 565 o.errors = buildUnnamed2180(); |
416 } | 566 } |
417 buildCounterOperationError--; | 567 buildCounterOperationError--; |
418 return o; | 568 return o; |
419 } | 569 } |
420 | 570 |
421 checkOperationError(api.OperationError o) { | 571 checkOperationError(api.OperationError o) { |
422 buildCounterOperationError++; | 572 buildCounterOperationError++; |
423 if (buildCounterOperationError < 3) { | 573 if (buildCounterOperationError < 3) { |
424 checkUnnamed2413(o.errors); | 574 checkUnnamed2180(o.errors); |
425 } | 575 } |
426 buildCounterOperationError--; | 576 buildCounterOperationError--; |
427 } | 577 } |
428 | 578 |
429 core.int buildCounterOperationWarningsData = 0; | 579 core.int buildCounterOperationWarningsData = 0; |
430 buildOperationWarningsData() { | 580 buildOperationWarningsData() { |
431 var o = new api.OperationWarningsData(); | 581 var o = new api.OperationWarningsData(); |
432 buildCounterOperationWarningsData++; | 582 buildCounterOperationWarningsData++; |
433 if (buildCounterOperationWarningsData < 3) { | 583 if (buildCounterOperationWarningsData < 3) { |
434 o.key = "foo"; | 584 o.key = "foo"; |
435 o.value = "foo"; | 585 o.value = "foo"; |
436 } | 586 } |
437 buildCounterOperationWarningsData--; | 587 buildCounterOperationWarningsData--; |
438 return o; | 588 return o; |
439 } | 589 } |
440 | 590 |
441 checkOperationWarningsData(api.OperationWarningsData o) { | 591 checkOperationWarningsData(api.OperationWarningsData o) { |
442 buildCounterOperationWarningsData++; | 592 buildCounterOperationWarningsData++; |
443 if (buildCounterOperationWarningsData < 3) { | 593 if (buildCounterOperationWarningsData < 3) { |
444 unittest.expect(o.key, unittest.equals('foo')); | 594 unittest.expect(o.key, unittest.equals('foo')); |
445 unittest.expect(o.value, unittest.equals('foo')); | 595 unittest.expect(o.value, unittest.equals('foo')); |
446 } | 596 } |
447 buildCounterOperationWarningsData--; | 597 buildCounterOperationWarningsData--; |
448 } | 598 } |
449 | 599 |
450 buildUnnamed2414() { | 600 buildUnnamed2181() { |
451 var o = new core.List<api.OperationWarningsData>(); | 601 var o = new core.List<api.OperationWarningsData>(); |
452 o.add(buildOperationWarningsData()); | 602 o.add(buildOperationWarningsData()); |
453 o.add(buildOperationWarningsData()); | 603 o.add(buildOperationWarningsData()); |
454 return o; | 604 return o; |
455 } | 605 } |
456 | 606 |
457 checkUnnamed2414(core.List<api.OperationWarningsData> o) { | 607 checkUnnamed2181(core.List<api.OperationWarningsData> o) { |
458 unittest.expect(o, unittest.hasLength(2)); | 608 unittest.expect(o, unittest.hasLength(2)); |
459 checkOperationWarningsData(o[0]); | 609 checkOperationWarningsData(o[0]); |
460 checkOperationWarningsData(o[1]); | 610 checkOperationWarningsData(o[1]); |
461 } | 611 } |
462 | 612 |
463 core.int buildCounterOperationWarnings = 0; | 613 core.int buildCounterOperationWarnings = 0; |
464 buildOperationWarnings() { | 614 buildOperationWarnings() { |
465 var o = new api.OperationWarnings(); | 615 var o = new api.OperationWarnings(); |
466 buildCounterOperationWarnings++; | 616 buildCounterOperationWarnings++; |
467 if (buildCounterOperationWarnings < 3) { | 617 if (buildCounterOperationWarnings < 3) { |
468 o.code = "foo"; | 618 o.code = "foo"; |
469 o.data = buildUnnamed2414(); | 619 o.data = buildUnnamed2181(); |
470 o.message = "foo"; | 620 o.message = "foo"; |
471 } | 621 } |
472 buildCounterOperationWarnings--; | 622 buildCounterOperationWarnings--; |
473 return o; | 623 return o; |
474 } | 624 } |
475 | 625 |
476 checkOperationWarnings(api.OperationWarnings o) { | 626 checkOperationWarnings(api.OperationWarnings o) { |
477 buildCounterOperationWarnings++; | 627 buildCounterOperationWarnings++; |
478 if (buildCounterOperationWarnings < 3) { | 628 if (buildCounterOperationWarnings < 3) { |
479 unittest.expect(o.code, unittest.equals('foo')); | 629 unittest.expect(o.code, unittest.equals('foo')); |
480 checkUnnamed2414(o.data); | 630 checkUnnamed2181(o.data); |
481 unittest.expect(o.message, unittest.equals('foo')); | 631 unittest.expect(o.message, unittest.equals('foo')); |
482 } | 632 } |
483 buildCounterOperationWarnings--; | 633 buildCounterOperationWarnings--; |
484 } | 634 } |
485 | 635 |
486 buildUnnamed2415() { | 636 buildUnnamed2182() { |
487 var o = new core.List<api.OperationWarnings>(); | 637 var o = new core.List<api.OperationWarnings>(); |
488 o.add(buildOperationWarnings()); | 638 o.add(buildOperationWarnings()); |
489 o.add(buildOperationWarnings()); | 639 o.add(buildOperationWarnings()); |
490 return o; | 640 return o; |
491 } | 641 } |
492 | 642 |
493 checkUnnamed2415(core.List<api.OperationWarnings> o) { | 643 checkUnnamed2182(core.List<api.OperationWarnings> o) { |
494 unittest.expect(o, unittest.hasLength(2)); | 644 unittest.expect(o, unittest.hasLength(2)); |
495 checkOperationWarnings(o[0]); | 645 checkOperationWarnings(o[0]); |
496 checkOperationWarnings(o[1]); | 646 checkOperationWarnings(o[1]); |
497 } | 647 } |
498 | 648 |
499 core.int buildCounterOperation = 0; | 649 core.int buildCounterOperation = 0; |
500 buildOperation() { | 650 buildOperation() { |
501 var o = new api.Operation(); | 651 var o = new api.Operation(); |
502 buildCounterOperation++; | 652 buildCounterOperation++; |
503 if (buildCounterOperation < 3) { | 653 if (buildCounterOperation < 3) { |
(...skipping 11 matching lines...) Expand all Loading... |
515 o.operationType = "foo"; | 665 o.operationType = "foo"; |
516 o.progress = 42; | 666 o.progress = 42; |
517 o.region = "foo"; | 667 o.region = "foo"; |
518 o.selfLink = "foo"; | 668 o.selfLink = "foo"; |
519 o.startTime = "foo"; | 669 o.startTime = "foo"; |
520 o.status = "foo"; | 670 o.status = "foo"; |
521 o.statusMessage = "foo"; | 671 o.statusMessage = "foo"; |
522 o.targetId = "foo"; | 672 o.targetId = "foo"; |
523 o.targetLink = "foo"; | 673 o.targetLink = "foo"; |
524 o.user = "foo"; | 674 o.user = "foo"; |
525 o.warnings = buildUnnamed2415(); | 675 o.warnings = buildUnnamed2182(); |
526 o.zone = "foo"; | 676 o.zone = "foo"; |
527 } | 677 } |
528 buildCounterOperation--; | 678 buildCounterOperation--; |
529 return o; | 679 return o; |
530 } | 680 } |
531 | 681 |
532 checkOperation(api.Operation o) { | 682 checkOperation(api.Operation o) { |
533 buildCounterOperation++; | 683 buildCounterOperation++; |
534 if (buildCounterOperation < 3) { | 684 if (buildCounterOperation < 3) { |
535 unittest.expect(o.clientOperationId, unittest.equals('foo')); | 685 unittest.expect(o.clientOperationId, unittest.equals('foo')); |
(...skipping 10 matching lines...) Expand all Loading... |
546 unittest.expect(o.operationType, unittest.equals('foo')); | 696 unittest.expect(o.operationType, unittest.equals('foo')); |
547 unittest.expect(o.progress, unittest.equals(42)); | 697 unittest.expect(o.progress, unittest.equals(42)); |
548 unittest.expect(o.region, unittest.equals('foo')); | 698 unittest.expect(o.region, unittest.equals('foo')); |
549 unittest.expect(o.selfLink, unittest.equals('foo')); | 699 unittest.expect(o.selfLink, unittest.equals('foo')); |
550 unittest.expect(o.startTime, unittest.equals('foo')); | 700 unittest.expect(o.startTime, unittest.equals('foo')); |
551 unittest.expect(o.status, unittest.equals('foo')); | 701 unittest.expect(o.status, unittest.equals('foo')); |
552 unittest.expect(o.statusMessage, unittest.equals('foo')); | 702 unittest.expect(o.statusMessage, unittest.equals('foo')); |
553 unittest.expect(o.targetId, unittest.equals('foo')); | 703 unittest.expect(o.targetId, unittest.equals('foo')); |
554 unittest.expect(o.targetLink, unittest.equals('foo')); | 704 unittest.expect(o.targetLink, unittest.equals('foo')); |
555 unittest.expect(o.user, unittest.equals('foo')); | 705 unittest.expect(o.user, unittest.equals('foo')); |
556 checkUnnamed2415(o.warnings); | 706 checkUnnamed2182(o.warnings); |
557 unittest.expect(o.zone, unittest.equals('foo')); | 707 unittest.expect(o.zone, unittest.equals('foo')); |
558 } | 708 } |
559 buildCounterOperation--; | 709 buildCounterOperation--; |
560 } | 710 } |
561 | 711 |
562 buildUnnamed2416() { | 712 buildUnnamed2183() { |
563 var o = new core.List<api.Operation>(); | 713 var o = new core.List<api.Operation>(); |
564 o.add(buildOperation()); | 714 o.add(buildOperation()); |
565 o.add(buildOperation()); | 715 o.add(buildOperation()); |
566 return o; | 716 return o; |
567 } | 717 } |
568 | 718 |
569 checkUnnamed2416(core.List<api.Operation> o) { | 719 checkUnnamed2183(core.List<api.Operation> o) { |
570 unittest.expect(o, unittest.hasLength(2)); | 720 unittest.expect(o, unittest.hasLength(2)); |
571 checkOperation(o[0]); | 721 checkOperation(o[0]); |
572 checkOperation(o[1]); | 722 checkOperation(o[1]); |
573 } | 723 } |
574 | 724 |
575 core.int buildCounterOperationsListResponse = 0; | 725 core.int buildCounterOperationsListResponse = 0; |
576 buildOperationsListResponse() { | 726 buildOperationsListResponse() { |
577 var o = new api.OperationsListResponse(); | 727 var o = new api.OperationsListResponse(); |
578 buildCounterOperationsListResponse++; | 728 buildCounterOperationsListResponse++; |
579 if (buildCounterOperationsListResponse < 3) { | 729 if (buildCounterOperationsListResponse < 3) { |
580 o.nextPageToken = "foo"; | 730 o.nextPageToken = "foo"; |
581 o.operations = buildUnnamed2416(); | 731 o.operations = buildUnnamed2183(); |
582 } | 732 } |
583 buildCounterOperationsListResponse--; | 733 buildCounterOperationsListResponse--; |
584 return o; | 734 return o; |
585 } | 735 } |
586 | 736 |
587 checkOperationsListResponse(api.OperationsListResponse o) { | 737 checkOperationsListResponse(api.OperationsListResponse o) { |
588 buildCounterOperationsListResponse++; | 738 buildCounterOperationsListResponse++; |
589 if (buildCounterOperationsListResponse < 3) { | 739 if (buildCounterOperationsListResponse < 3) { |
590 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 740 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
591 checkUnnamed2416(o.operations); | 741 checkUnnamed2183(o.operations); |
592 } | 742 } |
593 buildCounterOperationsListResponse--; | 743 buildCounterOperationsListResponse--; |
594 } | 744 } |
595 | 745 |
| 746 buildUnnamed2184() { |
| 747 var o = new core.List<api.AuditConfig>(); |
| 748 o.add(buildAuditConfig()); |
| 749 o.add(buildAuditConfig()); |
| 750 return o; |
| 751 } |
| 752 |
| 753 checkUnnamed2184(core.List<api.AuditConfig> o) { |
| 754 unittest.expect(o, unittest.hasLength(2)); |
| 755 checkAuditConfig(o[0]); |
| 756 checkAuditConfig(o[1]); |
| 757 } |
| 758 |
| 759 buildUnnamed2185() { |
| 760 var o = new core.List<api.Binding>(); |
| 761 o.add(buildBinding()); |
| 762 o.add(buildBinding()); |
| 763 return o; |
| 764 } |
| 765 |
| 766 checkUnnamed2185(core.List<api.Binding> o) { |
| 767 unittest.expect(o, unittest.hasLength(2)); |
| 768 checkBinding(o[0]); |
| 769 checkBinding(o[1]); |
| 770 } |
| 771 |
| 772 buildUnnamed2186() { |
| 773 var o = new core.List<api.Rule>(); |
| 774 o.add(buildRule()); |
| 775 o.add(buildRule()); |
| 776 return o; |
| 777 } |
| 778 |
| 779 checkUnnamed2186(core.List<api.Rule> o) { |
| 780 unittest.expect(o, unittest.hasLength(2)); |
| 781 checkRule(o[0]); |
| 782 checkRule(o[1]); |
| 783 } |
| 784 |
| 785 core.int buildCounterPolicy = 0; |
| 786 buildPolicy() { |
| 787 var o = new api.Policy(); |
| 788 buildCounterPolicy++; |
| 789 if (buildCounterPolicy < 3) { |
| 790 o.auditConfigs = buildUnnamed2184(); |
| 791 o.bindings = buildUnnamed2185(); |
| 792 o.etag = "foo"; |
| 793 o.iamOwned = true; |
| 794 o.rules = buildUnnamed2186(); |
| 795 o.version = 42; |
| 796 } |
| 797 buildCounterPolicy--; |
| 798 return o; |
| 799 } |
| 800 |
| 801 checkPolicy(api.Policy o) { |
| 802 buildCounterPolicy++; |
| 803 if (buildCounterPolicy < 3) { |
| 804 checkUnnamed2184(o.auditConfigs); |
| 805 checkUnnamed2185(o.bindings); |
| 806 unittest.expect(o.etag, unittest.equals('foo')); |
| 807 unittest.expect(o.iamOwned, unittest.isTrue); |
| 808 checkUnnamed2186(o.rules); |
| 809 unittest.expect(o.version, unittest.equals(42)); |
| 810 } |
| 811 buildCounterPolicy--; |
| 812 } |
| 813 |
596 core.int buildCounterResourceWarningsData = 0; | 814 core.int buildCounterResourceWarningsData = 0; |
597 buildResourceWarningsData() { | 815 buildResourceWarningsData() { |
598 var o = new api.ResourceWarningsData(); | 816 var o = new api.ResourceWarningsData(); |
599 buildCounterResourceWarningsData++; | 817 buildCounterResourceWarningsData++; |
600 if (buildCounterResourceWarningsData < 3) { | 818 if (buildCounterResourceWarningsData < 3) { |
601 o.key = "foo"; | 819 o.key = "foo"; |
602 o.value = "foo"; | 820 o.value = "foo"; |
603 } | 821 } |
604 buildCounterResourceWarningsData--; | 822 buildCounterResourceWarningsData--; |
605 return o; | 823 return o; |
606 } | 824 } |
607 | 825 |
608 checkResourceWarningsData(api.ResourceWarningsData o) { | 826 checkResourceWarningsData(api.ResourceWarningsData o) { |
609 buildCounterResourceWarningsData++; | 827 buildCounterResourceWarningsData++; |
610 if (buildCounterResourceWarningsData < 3) { | 828 if (buildCounterResourceWarningsData < 3) { |
611 unittest.expect(o.key, unittest.equals('foo')); | 829 unittest.expect(o.key, unittest.equals('foo')); |
612 unittest.expect(o.value, unittest.equals('foo')); | 830 unittest.expect(o.value, unittest.equals('foo')); |
613 } | 831 } |
614 buildCounterResourceWarningsData--; | 832 buildCounterResourceWarningsData--; |
615 } | 833 } |
616 | 834 |
617 buildUnnamed2417() { | 835 buildUnnamed2187() { |
618 var o = new core.List<api.ResourceWarningsData>(); | 836 var o = new core.List<api.ResourceWarningsData>(); |
619 o.add(buildResourceWarningsData()); | 837 o.add(buildResourceWarningsData()); |
620 o.add(buildResourceWarningsData()); | 838 o.add(buildResourceWarningsData()); |
621 return o; | 839 return o; |
622 } | 840 } |
623 | 841 |
624 checkUnnamed2417(core.List<api.ResourceWarningsData> o) { | 842 checkUnnamed2187(core.List<api.ResourceWarningsData> o) { |
625 unittest.expect(o, unittest.hasLength(2)); | 843 unittest.expect(o, unittest.hasLength(2)); |
626 checkResourceWarningsData(o[0]); | 844 checkResourceWarningsData(o[0]); |
627 checkResourceWarningsData(o[1]); | 845 checkResourceWarningsData(o[1]); |
628 } | 846 } |
629 | 847 |
630 core.int buildCounterResourceWarnings = 0; | 848 core.int buildCounterResourceWarnings = 0; |
631 buildResourceWarnings() { | 849 buildResourceWarnings() { |
632 var o = new api.ResourceWarnings(); | 850 var o = new api.ResourceWarnings(); |
633 buildCounterResourceWarnings++; | 851 buildCounterResourceWarnings++; |
634 if (buildCounterResourceWarnings < 3) { | 852 if (buildCounterResourceWarnings < 3) { |
635 o.code = "foo"; | 853 o.code = "foo"; |
636 o.data = buildUnnamed2417(); | 854 o.data = buildUnnamed2187(); |
637 o.message = "foo"; | 855 o.message = "foo"; |
638 } | 856 } |
639 buildCounterResourceWarnings--; | 857 buildCounterResourceWarnings--; |
640 return o; | 858 return o; |
641 } | 859 } |
642 | 860 |
643 checkResourceWarnings(api.ResourceWarnings o) { | 861 checkResourceWarnings(api.ResourceWarnings o) { |
644 buildCounterResourceWarnings++; | 862 buildCounterResourceWarnings++; |
645 if (buildCounterResourceWarnings < 3) { | 863 if (buildCounterResourceWarnings < 3) { |
646 unittest.expect(o.code, unittest.equals('foo')); | 864 unittest.expect(o.code, unittest.equals('foo')); |
647 checkUnnamed2417(o.data); | 865 checkUnnamed2187(o.data); |
648 unittest.expect(o.message, unittest.equals('foo')); | 866 unittest.expect(o.message, unittest.equals('foo')); |
649 } | 867 } |
650 buildCounterResourceWarnings--; | 868 buildCounterResourceWarnings--; |
651 } | 869 } |
652 | 870 |
653 buildUnnamed2418() { | 871 buildUnnamed2188() { |
654 var o = new core.List<api.ResourceWarnings>(); | 872 var o = new core.List<api.ResourceWarnings>(); |
655 o.add(buildResourceWarnings()); | 873 o.add(buildResourceWarnings()); |
656 o.add(buildResourceWarnings()); | 874 o.add(buildResourceWarnings()); |
657 return o; | 875 return o; |
658 } | 876 } |
659 | 877 |
660 checkUnnamed2418(core.List<api.ResourceWarnings> o) { | 878 checkUnnamed2188(core.List<api.ResourceWarnings> o) { |
661 unittest.expect(o, unittest.hasLength(2)); | 879 unittest.expect(o, unittest.hasLength(2)); |
662 checkResourceWarnings(o[0]); | 880 checkResourceWarnings(o[0]); |
663 checkResourceWarnings(o[1]); | 881 checkResourceWarnings(o[1]); |
664 } | 882 } |
665 | 883 |
666 core.int buildCounterResource = 0; | 884 core.int buildCounterResource = 0; |
667 buildResource() { | 885 buildResource() { |
668 var o = new api.Resource(); | 886 var o = new api.Resource(); |
669 buildCounterResource++; | 887 buildCounterResource++; |
670 if (buildCounterResource < 3) { | 888 if (buildCounterResource < 3) { |
| 889 o.accessControl = buildResourceAccessControl(); |
671 o.finalProperties = "foo"; | 890 o.finalProperties = "foo"; |
672 o.id = "foo"; | 891 o.id = "foo"; |
673 o.insertTime = "foo"; | 892 o.insertTime = "foo"; |
674 o.manifest = "foo"; | 893 o.manifest = "foo"; |
675 o.name = "foo"; | 894 o.name = "foo"; |
676 o.properties = "foo"; | 895 o.properties = "foo"; |
677 o.type = "foo"; | 896 o.type = "foo"; |
678 o.update = buildResourceUpdate(); | 897 o.update = buildResourceUpdate(); |
679 o.updateTime = "foo"; | 898 o.updateTime = "foo"; |
680 o.url = "foo"; | 899 o.url = "foo"; |
681 o.warnings = buildUnnamed2418(); | 900 o.warnings = buildUnnamed2188(); |
682 } | 901 } |
683 buildCounterResource--; | 902 buildCounterResource--; |
684 return o; | 903 return o; |
685 } | 904 } |
686 | 905 |
687 checkResource(api.Resource o) { | 906 checkResource(api.Resource o) { |
688 buildCounterResource++; | 907 buildCounterResource++; |
689 if (buildCounterResource < 3) { | 908 if (buildCounterResource < 3) { |
| 909 checkResourceAccessControl(o.accessControl); |
690 unittest.expect(o.finalProperties, unittest.equals('foo')); | 910 unittest.expect(o.finalProperties, unittest.equals('foo')); |
691 unittest.expect(o.id, unittest.equals('foo')); | 911 unittest.expect(o.id, unittest.equals('foo')); |
692 unittest.expect(o.insertTime, unittest.equals('foo')); | 912 unittest.expect(o.insertTime, unittest.equals('foo')); |
693 unittest.expect(o.manifest, unittest.equals('foo')); | 913 unittest.expect(o.manifest, unittest.equals('foo')); |
694 unittest.expect(o.name, unittest.equals('foo')); | 914 unittest.expect(o.name, unittest.equals('foo')); |
695 unittest.expect(o.properties, unittest.equals('foo')); | 915 unittest.expect(o.properties, unittest.equals('foo')); |
696 unittest.expect(o.type, unittest.equals('foo')); | 916 unittest.expect(o.type, unittest.equals('foo')); |
697 checkResourceUpdate(o.update); | 917 checkResourceUpdate(o.update); |
698 unittest.expect(o.updateTime, unittest.equals('foo')); | 918 unittest.expect(o.updateTime, unittest.equals('foo')); |
699 unittest.expect(o.url, unittest.equals('foo')); | 919 unittest.expect(o.url, unittest.equals('foo')); |
700 checkUnnamed2418(o.warnings); | 920 checkUnnamed2188(o.warnings); |
701 } | 921 } |
702 buildCounterResource--; | 922 buildCounterResource--; |
703 } | 923 } |
704 | 924 |
| 925 core.int buildCounterResourceAccessControl = 0; |
| 926 buildResourceAccessControl() { |
| 927 var o = new api.ResourceAccessControl(); |
| 928 buildCounterResourceAccessControl++; |
| 929 if (buildCounterResourceAccessControl < 3) { |
| 930 o.gcpIamPolicy = "foo"; |
| 931 } |
| 932 buildCounterResourceAccessControl--; |
| 933 return o; |
| 934 } |
| 935 |
| 936 checkResourceAccessControl(api.ResourceAccessControl o) { |
| 937 buildCounterResourceAccessControl++; |
| 938 if (buildCounterResourceAccessControl < 3) { |
| 939 unittest.expect(o.gcpIamPolicy, unittest.equals('foo')); |
| 940 } |
| 941 buildCounterResourceAccessControl--; |
| 942 } |
| 943 |
705 core.int buildCounterResourceUpdateErrorErrors = 0; | 944 core.int buildCounterResourceUpdateErrorErrors = 0; |
706 buildResourceUpdateErrorErrors() { | 945 buildResourceUpdateErrorErrors() { |
707 var o = new api.ResourceUpdateErrorErrors(); | 946 var o = new api.ResourceUpdateErrorErrors(); |
708 buildCounterResourceUpdateErrorErrors++; | 947 buildCounterResourceUpdateErrorErrors++; |
709 if (buildCounterResourceUpdateErrorErrors < 3) { | 948 if (buildCounterResourceUpdateErrorErrors < 3) { |
710 o.code = "foo"; | 949 o.code = "foo"; |
711 o.location = "foo"; | 950 o.location = "foo"; |
712 o.message = "foo"; | 951 o.message = "foo"; |
713 } | 952 } |
714 buildCounterResourceUpdateErrorErrors--; | 953 buildCounterResourceUpdateErrorErrors--; |
715 return o; | 954 return o; |
716 } | 955 } |
717 | 956 |
718 checkResourceUpdateErrorErrors(api.ResourceUpdateErrorErrors o) { | 957 checkResourceUpdateErrorErrors(api.ResourceUpdateErrorErrors o) { |
719 buildCounterResourceUpdateErrorErrors++; | 958 buildCounterResourceUpdateErrorErrors++; |
720 if (buildCounterResourceUpdateErrorErrors < 3) { | 959 if (buildCounterResourceUpdateErrorErrors < 3) { |
721 unittest.expect(o.code, unittest.equals('foo')); | 960 unittest.expect(o.code, unittest.equals('foo')); |
722 unittest.expect(o.location, unittest.equals('foo')); | 961 unittest.expect(o.location, unittest.equals('foo')); |
723 unittest.expect(o.message, unittest.equals('foo')); | 962 unittest.expect(o.message, unittest.equals('foo')); |
724 } | 963 } |
725 buildCounterResourceUpdateErrorErrors--; | 964 buildCounterResourceUpdateErrorErrors--; |
726 } | 965 } |
727 | 966 |
728 buildUnnamed2419() { | 967 buildUnnamed2189() { |
729 var o = new core.List<api.ResourceUpdateErrorErrors>(); | 968 var o = new core.List<api.ResourceUpdateErrorErrors>(); |
730 o.add(buildResourceUpdateErrorErrors()); | 969 o.add(buildResourceUpdateErrorErrors()); |
731 o.add(buildResourceUpdateErrorErrors()); | 970 o.add(buildResourceUpdateErrorErrors()); |
732 return o; | 971 return o; |
733 } | 972 } |
734 | 973 |
735 checkUnnamed2419(core.List<api.ResourceUpdateErrorErrors> o) { | 974 checkUnnamed2189(core.List<api.ResourceUpdateErrorErrors> o) { |
736 unittest.expect(o, unittest.hasLength(2)); | 975 unittest.expect(o, unittest.hasLength(2)); |
737 checkResourceUpdateErrorErrors(o[0]); | 976 checkResourceUpdateErrorErrors(o[0]); |
738 checkResourceUpdateErrorErrors(o[1]); | 977 checkResourceUpdateErrorErrors(o[1]); |
739 } | 978 } |
740 | 979 |
741 core.int buildCounterResourceUpdateError = 0; | 980 core.int buildCounterResourceUpdateError = 0; |
742 buildResourceUpdateError() { | 981 buildResourceUpdateError() { |
743 var o = new api.ResourceUpdateError(); | 982 var o = new api.ResourceUpdateError(); |
744 buildCounterResourceUpdateError++; | 983 buildCounterResourceUpdateError++; |
745 if (buildCounterResourceUpdateError < 3) { | 984 if (buildCounterResourceUpdateError < 3) { |
746 o.errors = buildUnnamed2419(); | 985 o.errors = buildUnnamed2189(); |
747 } | 986 } |
748 buildCounterResourceUpdateError--; | 987 buildCounterResourceUpdateError--; |
749 return o; | 988 return o; |
750 } | 989 } |
751 | 990 |
752 checkResourceUpdateError(api.ResourceUpdateError o) { | 991 checkResourceUpdateError(api.ResourceUpdateError o) { |
753 buildCounterResourceUpdateError++; | 992 buildCounterResourceUpdateError++; |
754 if (buildCounterResourceUpdateError < 3) { | 993 if (buildCounterResourceUpdateError < 3) { |
755 checkUnnamed2419(o.errors); | 994 checkUnnamed2189(o.errors); |
756 } | 995 } |
757 buildCounterResourceUpdateError--; | 996 buildCounterResourceUpdateError--; |
758 } | 997 } |
759 | 998 |
760 core.int buildCounterResourceUpdateWarningsData = 0; | 999 core.int buildCounterResourceUpdateWarningsData = 0; |
761 buildResourceUpdateWarningsData() { | 1000 buildResourceUpdateWarningsData() { |
762 var o = new api.ResourceUpdateWarningsData(); | 1001 var o = new api.ResourceUpdateWarningsData(); |
763 buildCounterResourceUpdateWarningsData++; | 1002 buildCounterResourceUpdateWarningsData++; |
764 if (buildCounterResourceUpdateWarningsData < 3) { | 1003 if (buildCounterResourceUpdateWarningsData < 3) { |
765 o.key = "foo"; | 1004 o.key = "foo"; |
766 o.value = "foo"; | 1005 o.value = "foo"; |
767 } | 1006 } |
768 buildCounterResourceUpdateWarningsData--; | 1007 buildCounterResourceUpdateWarningsData--; |
769 return o; | 1008 return o; |
770 } | 1009 } |
771 | 1010 |
772 checkResourceUpdateWarningsData(api.ResourceUpdateWarningsData o) { | 1011 checkResourceUpdateWarningsData(api.ResourceUpdateWarningsData o) { |
773 buildCounterResourceUpdateWarningsData++; | 1012 buildCounterResourceUpdateWarningsData++; |
774 if (buildCounterResourceUpdateWarningsData < 3) { | 1013 if (buildCounterResourceUpdateWarningsData < 3) { |
775 unittest.expect(o.key, unittest.equals('foo')); | 1014 unittest.expect(o.key, unittest.equals('foo')); |
776 unittest.expect(o.value, unittest.equals('foo')); | 1015 unittest.expect(o.value, unittest.equals('foo')); |
777 } | 1016 } |
778 buildCounterResourceUpdateWarningsData--; | 1017 buildCounterResourceUpdateWarningsData--; |
779 } | 1018 } |
780 | 1019 |
781 buildUnnamed2420() { | 1020 buildUnnamed2190() { |
782 var o = new core.List<api.ResourceUpdateWarningsData>(); | 1021 var o = new core.List<api.ResourceUpdateWarningsData>(); |
783 o.add(buildResourceUpdateWarningsData()); | 1022 o.add(buildResourceUpdateWarningsData()); |
784 o.add(buildResourceUpdateWarningsData()); | 1023 o.add(buildResourceUpdateWarningsData()); |
785 return o; | 1024 return o; |
786 } | 1025 } |
787 | 1026 |
788 checkUnnamed2420(core.List<api.ResourceUpdateWarningsData> o) { | 1027 checkUnnamed2190(core.List<api.ResourceUpdateWarningsData> o) { |
789 unittest.expect(o, unittest.hasLength(2)); | 1028 unittest.expect(o, unittest.hasLength(2)); |
790 checkResourceUpdateWarningsData(o[0]); | 1029 checkResourceUpdateWarningsData(o[0]); |
791 checkResourceUpdateWarningsData(o[1]); | 1030 checkResourceUpdateWarningsData(o[1]); |
792 } | 1031 } |
793 | 1032 |
794 core.int buildCounterResourceUpdateWarnings = 0; | 1033 core.int buildCounterResourceUpdateWarnings = 0; |
795 buildResourceUpdateWarnings() { | 1034 buildResourceUpdateWarnings() { |
796 var o = new api.ResourceUpdateWarnings(); | 1035 var o = new api.ResourceUpdateWarnings(); |
797 buildCounterResourceUpdateWarnings++; | 1036 buildCounterResourceUpdateWarnings++; |
798 if (buildCounterResourceUpdateWarnings < 3) { | 1037 if (buildCounterResourceUpdateWarnings < 3) { |
799 o.code = "foo"; | 1038 o.code = "foo"; |
800 o.data = buildUnnamed2420(); | 1039 o.data = buildUnnamed2190(); |
801 o.message = "foo"; | 1040 o.message = "foo"; |
802 } | 1041 } |
803 buildCounterResourceUpdateWarnings--; | 1042 buildCounterResourceUpdateWarnings--; |
804 return o; | 1043 return o; |
805 } | 1044 } |
806 | 1045 |
807 checkResourceUpdateWarnings(api.ResourceUpdateWarnings o) { | 1046 checkResourceUpdateWarnings(api.ResourceUpdateWarnings o) { |
808 buildCounterResourceUpdateWarnings++; | 1047 buildCounterResourceUpdateWarnings++; |
809 if (buildCounterResourceUpdateWarnings < 3) { | 1048 if (buildCounterResourceUpdateWarnings < 3) { |
810 unittest.expect(o.code, unittest.equals('foo')); | 1049 unittest.expect(o.code, unittest.equals('foo')); |
811 checkUnnamed2420(o.data); | 1050 checkUnnamed2190(o.data); |
812 unittest.expect(o.message, unittest.equals('foo')); | 1051 unittest.expect(o.message, unittest.equals('foo')); |
813 } | 1052 } |
814 buildCounterResourceUpdateWarnings--; | 1053 buildCounterResourceUpdateWarnings--; |
815 } | 1054 } |
816 | 1055 |
817 buildUnnamed2421() { | 1056 buildUnnamed2191() { |
818 var o = new core.List<api.ResourceUpdateWarnings>(); | 1057 var o = new core.List<api.ResourceUpdateWarnings>(); |
819 o.add(buildResourceUpdateWarnings()); | 1058 o.add(buildResourceUpdateWarnings()); |
820 o.add(buildResourceUpdateWarnings()); | 1059 o.add(buildResourceUpdateWarnings()); |
821 return o; | 1060 return o; |
822 } | 1061 } |
823 | 1062 |
824 checkUnnamed2421(core.List<api.ResourceUpdateWarnings> o) { | 1063 checkUnnamed2191(core.List<api.ResourceUpdateWarnings> o) { |
825 unittest.expect(o, unittest.hasLength(2)); | 1064 unittest.expect(o, unittest.hasLength(2)); |
826 checkResourceUpdateWarnings(o[0]); | 1065 checkResourceUpdateWarnings(o[0]); |
827 checkResourceUpdateWarnings(o[1]); | 1066 checkResourceUpdateWarnings(o[1]); |
828 } | 1067 } |
829 | 1068 |
830 core.int buildCounterResourceUpdate = 0; | 1069 core.int buildCounterResourceUpdate = 0; |
831 buildResourceUpdate() { | 1070 buildResourceUpdate() { |
832 var o = new api.ResourceUpdate(); | 1071 var o = new api.ResourceUpdate(); |
833 buildCounterResourceUpdate++; | 1072 buildCounterResourceUpdate++; |
834 if (buildCounterResourceUpdate < 3) { | 1073 if (buildCounterResourceUpdate < 3) { |
| 1074 o.accessControl = buildResourceAccessControl(); |
835 o.error = buildResourceUpdateError(); | 1075 o.error = buildResourceUpdateError(); |
836 o.finalProperties = "foo"; | 1076 o.finalProperties = "foo"; |
837 o.intent = "foo"; | 1077 o.intent = "foo"; |
838 o.manifest = "foo"; | 1078 o.manifest = "foo"; |
839 o.properties = "foo"; | 1079 o.properties = "foo"; |
840 o.state = "foo"; | 1080 o.state = "foo"; |
841 o.warnings = buildUnnamed2421(); | 1081 o.warnings = buildUnnamed2191(); |
842 } | 1082 } |
843 buildCounterResourceUpdate--; | 1083 buildCounterResourceUpdate--; |
844 return o; | 1084 return o; |
845 } | 1085 } |
846 | 1086 |
847 checkResourceUpdate(api.ResourceUpdate o) { | 1087 checkResourceUpdate(api.ResourceUpdate o) { |
848 buildCounterResourceUpdate++; | 1088 buildCounterResourceUpdate++; |
849 if (buildCounterResourceUpdate < 3) { | 1089 if (buildCounterResourceUpdate < 3) { |
| 1090 checkResourceAccessControl(o.accessControl); |
850 checkResourceUpdateError(o.error); | 1091 checkResourceUpdateError(o.error); |
851 unittest.expect(o.finalProperties, unittest.equals('foo')); | 1092 unittest.expect(o.finalProperties, unittest.equals('foo')); |
852 unittest.expect(o.intent, unittest.equals('foo')); | 1093 unittest.expect(o.intent, unittest.equals('foo')); |
853 unittest.expect(o.manifest, unittest.equals('foo')); | 1094 unittest.expect(o.manifest, unittest.equals('foo')); |
854 unittest.expect(o.properties, unittest.equals('foo')); | 1095 unittest.expect(o.properties, unittest.equals('foo')); |
855 unittest.expect(o.state, unittest.equals('foo')); | 1096 unittest.expect(o.state, unittest.equals('foo')); |
856 checkUnnamed2421(o.warnings); | 1097 checkUnnamed2191(o.warnings); |
857 } | 1098 } |
858 buildCounterResourceUpdate--; | 1099 buildCounterResourceUpdate--; |
859 } | 1100 } |
860 | 1101 |
861 buildUnnamed2422() { | 1102 buildUnnamed2192() { |
862 var o = new core.List<api.Resource>(); | 1103 var o = new core.List<api.Resource>(); |
863 o.add(buildResource()); | 1104 o.add(buildResource()); |
864 o.add(buildResource()); | 1105 o.add(buildResource()); |
865 return o; | 1106 return o; |
866 } | 1107 } |
867 | 1108 |
868 checkUnnamed2422(core.List<api.Resource> o) { | 1109 checkUnnamed2192(core.List<api.Resource> o) { |
869 unittest.expect(o, unittest.hasLength(2)); | 1110 unittest.expect(o, unittest.hasLength(2)); |
870 checkResource(o[0]); | 1111 checkResource(o[0]); |
871 checkResource(o[1]); | 1112 checkResource(o[1]); |
872 } | 1113 } |
873 | 1114 |
874 core.int buildCounterResourcesListResponse = 0; | 1115 core.int buildCounterResourcesListResponse = 0; |
875 buildResourcesListResponse() { | 1116 buildResourcesListResponse() { |
876 var o = new api.ResourcesListResponse(); | 1117 var o = new api.ResourcesListResponse(); |
877 buildCounterResourcesListResponse++; | 1118 buildCounterResourcesListResponse++; |
878 if (buildCounterResourcesListResponse < 3) { | 1119 if (buildCounterResourcesListResponse < 3) { |
879 o.nextPageToken = "foo"; | 1120 o.nextPageToken = "foo"; |
880 o.resources = buildUnnamed2422(); | 1121 o.resources = buildUnnamed2192(); |
881 } | 1122 } |
882 buildCounterResourcesListResponse--; | 1123 buildCounterResourcesListResponse--; |
883 return o; | 1124 return o; |
884 } | 1125 } |
885 | 1126 |
886 checkResourcesListResponse(api.ResourcesListResponse o) { | 1127 checkResourcesListResponse(api.ResourcesListResponse o) { |
887 buildCounterResourcesListResponse++; | 1128 buildCounterResourcesListResponse++; |
888 if (buildCounterResourcesListResponse < 3) { | 1129 if (buildCounterResourcesListResponse < 3) { |
889 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1130 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
890 checkUnnamed2422(o.resources); | 1131 checkUnnamed2192(o.resources); |
891 } | 1132 } |
892 buildCounterResourcesListResponse--; | 1133 buildCounterResourcesListResponse--; |
893 } | 1134 } |
894 | 1135 |
895 buildUnnamed2423() { | 1136 buildUnnamed2193() { |
| 1137 var o = new core.List<api.Condition>(); |
| 1138 o.add(buildCondition()); |
| 1139 o.add(buildCondition()); |
| 1140 return o; |
| 1141 } |
| 1142 |
| 1143 checkUnnamed2193(core.List<api.Condition> o) { |
| 1144 unittest.expect(o, unittest.hasLength(2)); |
| 1145 checkCondition(o[0]); |
| 1146 checkCondition(o[1]); |
| 1147 } |
| 1148 |
| 1149 buildUnnamed2194() { |
| 1150 var o = new core.List<core.String>(); |
| 1151 o.add("foo"); |
| 1152 o.add("foo"); |
| 1153 return o; |
| 1154 } |
| 1155 |
| 1156 checkUnnamed2194(core.List<core.String> o) { |
| 1157 unittest.expect(o, unittest.hasLength(2)); |
| 1158 unittest.expect(o[0], unittest.equals('foo')); |
| 1159 unittest.expect(o[1], unittest.equals('foo')); |
| 1160 } |
| 1161 |
| 1162 buildUnnamed2195() { |
| 1163 var o = new core.List<api.LogConfig>(); |
| 1164 o.add(buildLogConfig()); |
| 1165 o.add(buildLogConfig()); |
| 1166 return o; |
| 1167 } |
| 1168 |
| 1169 checkUnnamed2195(core.List<api.LogConfig> o) { |
| 1170 unittest.expect(o, unittest.hasLength(2)); |
| 1171 checkLogConfig(o[0]); |
| 1172 checkLogConfig(o[1]); |
| 1173 } |
| 1174 |
| 1175 buildUnnamed2196() { |
| 1176 var o = new core.List<core.String>(); |
| 1177 o.add("foo"); |
| 1178 o.add("foo"); |
| 1179 return o; |
| 1180 } |
| 1181 |
| 1182 checkUnnamed2196(core.List<core.String> o) { |
| 1183 unittest.expect(o, unittest.hasLength(2)); |
| 1184 unittest.expect(o[0], unittest.equals('foo')); |
| 1185 unittest.expect(o[1], unittest.equals('foo')); |
| 1186 } |
| 1187 |
| 1188 buildUnnamed2197() { |
| 1189 var o = new core.List<core.String>(); |
| 1190 o.add("foo"); |
| 1191 o.add("foo"); |
| 1192 return o; |
| 1193 } |
| 1194 |
| 1195 checkUnnamed2197(core.List<core.String> o) { |
| 1196 unittest.expect(o, unittest.hasLength(2)); |
| 1197 unittest.expect(o[0], unittest.equals('foo')); |
| 1198 unittest.expect(o[1], unittest.equals('foo')); |
| 1199 } |
| 1200 |
| 1201 core.int buildCounterRule = 0; |
| 1202 buildRule() { |
| 1203 var o = new api.Rule(); |
| 1204 buildCounterRule++; |
| 1205 if (buildCounterRule < 3) { |
| 1206 o.action = "foo"; |
| 1207 o.conditions = buildUnnamed2193(); |
| 1208 o.description = "foo"; |
| 1209 o.ins = buildUnnamed2194(); |
| 1210 o.logConfigs = buildUnnamed2195(); |
| 1211 o.notIns = buildUnnamed2196(); |
| 1212 o.permissions = buildUnnamed2197(); |
| 1213 } |
| 1214 buildCounterRule--; |
| 1215 return o; |
| 1216 } |
| 1217 |
| 1218 checkRule(api.Rule o) { |
| 1219 buildCounterRule++; |
| 1220 if (buildCounterRule < 3) { |
| 1221 unittest.expect(o.action, unittest.equals('foo')); |
| 1222 checkUnnamed2193(o.conditions); |
| 1223 unittest.expect(o.description, unittest.equals('foo')); |
| 1224 checkUnnamed2194(o.ins); |
| 1225 checkUnnamed2195(o.logConfigs); |
| 1226 checkUnnamed2196(o.notIns); |
| 1227 checkUnnamed2197(o.permissions); |
| 1228 } |
| 1229 buildCounterRule--; |
| 1230 } |
| 1231 |
| 1232 buildUnnamed2198() { |
896 var o = new core.List<api.ImportFile>(); | 1233 var o = new core.List<api.ImportFile>(); |
897 o.add(buildImportFile()); | 1234 o.add(buildImportFile()); |
898 o.add(buildImportFile()); | 1235 o.add(buildImportFile()); |
899 return o; | 1236 return o; |
900 } | 1237 } |
901 | 1238 |
902 checkUnnamed2423(core.List<api.ImportFile> o) { | 1239 checkUnnamed2198(core.List<api.ImportFile> o) { |
903 unittest.expect(o, unittest.hasLength(2)); | 1240 unittest.expect(o, unittest.hasLength(2)); |
904 checkImportFile(o[0]); | 1241 checkImportFile(o[0]); |
905 checkImportFile(o[1]); | 1242 checkImportFile(o[1]); |
906 } | 1243 } |
907 | 1244 |
908 core.int buildCounterTargetConfiguration = 0; | 1245 core.int buildCounterTargetConfiguration = 0; |
909 buildTargetConfiguration() { | 1246 buildTargetConfiguration() { |
910 var o = new api.TargetConfiguration(); | 1247 var o = new api.TargetConfiguration(); |
911 buildCounterTargetConfiguration++; | 1248 buildCounterTargetConfiguration++; |
912 if (buildCounterTargetConfiguration < 3) { | 1249 if (buildCounterTargetConfiguration < 3) { |
913 o.config = buildConfigFile(); | 1250 o.config = buildConfigFile(); |
914 o.imports = buildUnnamed2423(); | 1251 o.imports = buildUnnamed2198(); |
915 } | 1252 } |
916 buildCounterTargetConfiguration--; | 1253 buildCounterTargetConfiguration--; |
917 return o; | 1254 return o; |
918 } | 1255 } |
919 | 1256 |
920 checkTargetConfiguration(api.TargetConfiguration o) { | 1257 checkTargetConfiguration(api.TargetConfiguration o) { |
921 buildCounterTargetConfiguration++; | 1258 buildCounterTargetConfiguration++; |
922 if (buildCounterTargetConfiguration < 3) { | 1259 if (buildCounterTargetConfiguration < 3) { |
923 checkConfigFile(o.config); | 1260 checkConfigFile(o.config); |
924 checkUnnamed2423(o.imports); | 1261 checkUnnamed2198(o.imports); |
925 } | 1262 } |
926 buildCounterTargetConfiguration--; | 1263 buildCounterTargetConfiguration--; |
927 } | 1264 } |
928 | 1265 |
| 1266 buildUnnamed2199() { |
| 1267 var o = new core.List<core.String>(); |
| 1268 o.add("foo"); |
| 1269 o.add("foo"); |
| 1270 return o; |
| 1271 } |
| 1272 |
| 1273 checkUnnamed2199(core.List<core.String> o) { |
| 1274 unittest.expect(o, unittest.hasLength(2)); |
| 1275 unittest.expect(o[0], unittest.equals('foo')); |
| 1276 unittest.expect(o[1], unittest.equals('foo')); |
| 1277 } |
| 1278 |
| 1279 core.int buildCounterTestPermissionsRequest = 0; |
| 1280 buildTestPermissionsRequest() { |
| 1281 var o = new api.TestPermissionsRequest(); |
| 1282 buildCounterTestPermissionsRequest++; |
| 1283 if (buildCounterTestPermissionsRequest < 3) { |
| 1284 o.permissions = buildUnnamed2199(); |
| 1285 } |
| 1286 buildCounterTestPermissionsRequest--; |
| 1287 return o; |
| 1288 } |
| 1289 |
| 1290 checkTestPermissionsRequest(api.TestPermissionsRequest o) { |
| 1291 buildCounterTestPermissionsRequest++; |
| 1292 if (buildCounterTestPermissionsRequest < 3) { |
| 1293 checkUnnamed2199(o.permissions); |
| 1294 } |
| 1295 buildCounterTestPermissionsRequest--; |
| 1296 } |
| 1297 |
| 1298 buildUnnamed2200() { |
| 1299 var o = new core.List<core.String>(); |
| 1300 o.add("foo"); |
| 1301 o.add("foo"); |
| 1302 return o; |
| 1303 } |
| 1304 |
| 1305 checkUnnamed2200(core.List<core.String> o) { |
| 1306 unittest.expect(o, unittest.hasLength(2)); |
| 1307 unittest.expect(o[0], unittest.equals('foo')); |
| 1308 unittest.expect(o[1], unittest.equals('foo')); |
| 1309 } |
| 1310 |
| 1311 core.int buildCounterTestPermissionsResponse = 0; |
| 1312 buildTestPermissionsResponse() { |
| 1313 var o = new api.TestPermissionsResponse(); |
| 1314 buildCounterTestPermissionsResponse++; |
| 1315 if (buildCounterTestPermissionsResponse < 3) { |
| 1316 o.permissions = buildUnnamed2200(); |
| 1317 } |
| 1318 buildCounterTestPermissionsResponse--; |
| 1319 return o; |
| 1320 } |
| 1321 |
| 1322 checkTestPermissionsResponse(api.TestPermissionsResponse o) { |
| 1323 buildCounterTestPermissionsResponse++; |
| 1324 if (buildCounterTestPermissionsResponse < 3) { |
| 1325 checkUnnamed2200(o.permissions); |
| 1326 } |
| 1327 buildCounterTestPermissionsResponse--; |
| 1328 } |
| 1329 |
929 core.int buildCounterType = 0; | 1330 core.int buildCounterType = 0; |
930 buildType() { | 1331 buildType() { |
931 var o = new api.Type(); | 1332 var o = new api.Type(); |
932 buildCounterType++; | 1333 buildCounterType++; |
933 if (buildCounterType < 3) { | 1334 if (buildCounterType < 3) { |
934 o.id = "foo"; | 1335 o.id = "foo"; |
935 o.insertTime = "foo"; | 1336 o.insertTime = "foo"; |
936 o.name = "foo"; | 1337 o.name = "foo"; |
937 o.operation = buildOperation(); | 1338 o.operation = buildOperation(); |
938 o.selfLink = "foo"; | 1339 o.selfLink = "foo"; |
939 } | 1340 } |
940 buildCounterType--; | 1341 buildCounterType--; |
941 return o; | 1342 return o; |
942 } | 1343 } |
943 | 1344 |
944 checkType(api.Type o) { | 1345 checkType(api.Type o) { |
945 buildCounterType++; | 1346 buildCounterType++; |
946 if (buildCounterType < 3) { | 1347 if (buildCounterType < 3) { |
947 unittest.expect(o.id, unittest.equals('foo')); | 1348 unittest.expect(o.id, unittest.equals('foo')); |
948 unittest.expect(o.insertTime, unittest.equals('foo')); | 1349 unittest.expect(o.insertTime, unittest.equals('foo')); |
949 unittest.expect(o.name, unittest.equals('foo')); | 1350 unittest.expect(o.name, unittest.equals('foo')); |
950 checkOperation(o.operation); | 1351 checkOperation(o.operation); |
951 unittest.expect(o.selfLink, unittest.equals('foo')); | 1352 unittest.expect(o.selfLink, unittest.equals('foo')); |
952 } | 1353 } |
953 buildCounterType--; | 1354 buildCounterType--; |
954 } | 1355 } |
955 | 1356 |
956 buildUnnamed2424() { | 1357 buildUnnamed2201() { |
957 var o = new core.List<api.Type>(); | 1358 var o = new core.List<api.Type>(); |
958 o.add(buildType()); | 1359 o.add(buildType()); |
959 o.add(buildType()); | 1360 o.add(buildType()); |
960 return o; | 1361 return o; |
961 } | 1362 } |
962 | 1363 |
963 checkUnnamed2424(core.List<api.Type> o) { | 1364 checkUnnamed2201(core.List<api.Type> o) { |
964 unittest.expect(o, unittest.hasLength(2)); | 1365 unittest.expect(o, unittest.hasLength(2)); |
965 checkType(o[0]); | 1366 checkType(o[0]); |
966 checkType(o[1]); | 1367 checkType(o[1]); |
967 } | 1368 } |
968 | 1369 |
969 core.int buildCounterTypesListResponse = 0; | 1370 core.int buildCounterTypesListResponse = 0; |
970 buildTypesListResponse() { | 1371 buildTypesListResponse() { |
971 var o = new api.TypesListResponse(); | 1372 var o = new api.TypesListResponse(); |
972 buildCounterTypesListResponse++; | 1373 buildCounterTypesListResponse++; |
973 if (buildCounterTypesListResponse < 3) { | 1374 if (buildCounterTypesListResponse < 3) { |
974 o.nextPageToken = "foo"; | 1375 o.nextPageToken = "foo"; |
975 o.types = buildUnnamed2424(); | 1376 o.types = buildUnnamed2201(); |
976 } | 1377 } |
977 buildCounterTypesListResponse--; | 1378 buildCounterTypesListResponse--; |
978 return o; | 1379 return o; |
979 } | 1380 } |
980 | 1381 |
981 checkTypesListResponse(api.TypesListResponse o) { | 1382 checkTypesListResponse(api.TypesListResponse o) { |
982 buildCounterTypesListResponse++; | 1383 buildCounterTypesListResponse++; |
983 if (buildCounterTypesListResponse < 3) { | 1384 if (buildCounterTypesListResponse < 3) { |
984 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 1385 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
985 checkUnnamed2424(o.types); | 1386 checkUnnamed2201(o.types); |
986 } | 1387 } |
987 buildCounterTypesListResponse--; | 1388 buildCounterTypesListResponse--; |
988 } | 1389 } |
989 | 1390 |
990 | 1391 |
991 main() { | 1392 main() { |
| 1393 unittest.group("obj-schema-AuditConfig", () { |
| 1394 unittest.test("to-json--from-json", () { |
| 1395 var o = buildAuditConfig(); |
| 1396 var od = new api.AuditConfig.fromJson(o.toJson()); |
| 1397 checkAuditConfig(od); |
| 1398 }); |
| 1399 }); |
| 1400 |
| 1401 |
| 1402 unittest.group("obj-schema-Binding", () { |
| 1403 unittest.test("to-json--from-json", () { |
| 1404 var o = buildBinding(); |
| 1405 var od = new api.Binding.fromJson(o.toJson()); |
| 1406 checkBinding(od); |
| 1407 }); |
| 1408 }); |
| 1409 |
| 1410 |
| 1411 unittest.group("obj-schema-Condition", () { |
| 1412 unittest.test("to-json--from-json", () { |
| 1413 var o = buildCondition(); |
| 1414 var od = new api.Condition.fromJson(o.toJson()); |
| 1415 checkCondition(od); |
| 1416 }); |
| 1417 }); |
| 1418 |
| 1419 |
992 unittest.group("obj-schema-ConfigFile", () { | 1420 unittest.group("obj-schema-ConfigFile", () { |
993 unittest.test("to-json--from-json", () { | 1421 unittest.test("to-json--from-json", () { |
994 var o = buildConfigFile(); | 1422 var o = buildConfigFile(); |
995 var od = new api.ConfigFile.fromJson(o.toJson()); | 1423 var od = new api.ConfigFile.fromJson(o.toJson()); |
996 checkConfigFile(od); | 1424 checkConfigFile(od); |
997 }); | 1425 }); |
998 }); | 1426 }); |
999 | 1427 |
1000 | 1428 |
1001 unittest.group("obj-schema-Deployment", () { | 1429 unittest.group("obj-schema-Deployment", () { |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1063 | 1491 |
1064 unittest.group("obj-schema-ImportFile", () { | 1492 unittest.group("obj-schema-ImportFile", () { |
1065 unittest.test("to-json--from-json", () { | 1493 unittest.test("to-json--from-json", () { |
1066 var o = buildImportFile(); | 1494 var o = buildImportFile(); |
1067 var od = new api.ImportFile.fromJson(o.toJson()); | 1495 var od = new api.ImportFile.fromJson(o.toJson()); |
1068 checkImportFile(od); | 1496 checkImportFile(od); |
1069 }); | 1497 }); |
1070 }); | 1498 }); |
1071 | 1499 |
1072 | 1500 |
| 1501 unittest.group("obj-schema-LogConfig", () { |
| 1502 unittest.test("to-json--from-json", () { |
| 1503 var o = buildLogConfig(); |
| 1504 var od = new api.LogConfig.fromJson(o.toJson()); |
| 1505 checkLogConfig(od); |
| 1506 }); |
| 1507 }); |
| 1508 |
| 1509 |
| 1510 unittest.group("obj-schema-LogConfigCounterOptions", () { |
| 1511 unittest.test("to-json--from-json", () { |
| 1512 var o = buildLogConfigCounterOptions(); |
| 1513 var od = new api.LogConfigCounterOptions.fromJson(o.toJson()); |
| 1514 checkLogConfigCounterOptions(od); |
| 1515 }); |
| 1516 }); |
| 1517 |
| 1518 |
1073 unittest.group("obj-schema-Manifest", () { | 1519 unittest.group("obj-schema-Manifest", () { |
1074 unittest.test("to-json--from-json", () { | 1520 unittest.test("to-json--from-json", () { |
1075 var o = buildManifest(); | 1521 var o = buildManifest(); |
1076 var od = new api.Manifest.fromJson(o.toJson()); | 1522 var od = new api.Manifest.fromJson(o.toJson()); |
1077 checkManifest(od); | 1523 checkManifest(od); |
1078 }); | 1524 }); |
1079 }); | 1525 }); |
1080 | 1526 |
1081 | 1527 |
1082 unittest.group("obj-schema-ManifestsListResponse", () { | 1528 unittest.group("obj-schema-ManifestsListResponse", () { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 | 1581 |
1136 unittest.group("obj-schema-OperationsListResponse", () { | 1582 unittest.group("obj-schema-OperationsListResponse", () { |
1137 unittest.test("to-json--from-json", () { | 1583 unittest.test("to-json--from-json", () { |
1138 var o = buildOperationsListResponse(); | 1584 var o = buildOperationsListResponse(); |
1139 var od = new api.OperationsListResponse.fromJson(o.toJson()); | 1585 var od = new api.OperationsListResponse.fromJson(o.toJson()); |
1140 checkOperationsListResponse(od); | 1586 checkOperationsListResponse(od); |
1141 }); | 1587 }); |
1142 }); | 1588 }); |
1143 | 1589 |
1144 | 1590 |
| 1591 unittest.group("obj-schema-Policy", () { |
| 1592 unittest.test("to-json--from-json", () { |
| 1593 var o = buildPolicy(); |
| 1594 var od = new api.Policy.fromJson(o.toJson()); |
| 1595 checkPolicy(od); |
| 1596 }); |
| 1597 }); |
| 1598 |
| 1599 |
1145 unittest.group("obj-schema-ResourceWarningsData", () { | 1600 unittest.group("obj-schema-ResourceWarningsData", () { |
1146 unittest.test("to-json--from-json", () { | 1601 unittest.test("to-json--from-json", () { |
1147 var o = buildResourceWarningsData(); | 1602 var o = buildResourceWarningsData(); |
1148 var od = new api.ResourceWarningsData.fromJson(o.toJson()); | 1603 var od = new api.ResourceWarningsData.fromJson(o.toJson()); |
1149 checkResourceWarningsData(od); | 1604 checkResourceWarningsData(od); |
1150 }); | 1605 }); |
1151 }); | 1606 }); |
1152 | 1607 |
1153 | 1608 |
1154 unittest.group("obj-schema-ResourceWarnings", () { | 1609 unittest.group("obj-schema-ResourceWarnings", () { |
1155 unittest.test("to-json--from-json", () { | 1610 unittest.test("to-json--from-json", () { |
1156 var o = buildResourceWarnings(); | 1611 var o = buildResourceWarnings(); |
1157 var od = new api.ResourceWarnings.fromJson(o.toJson()); | 1612 var od = new api.ResourceWarnings.fromJson(o.toJson()); |
1158 checkResourceWarnings(od); | 1613 checkResourceWarnings(od); |
1159 }); | 1614 }); |
1160 }); | 1615 }); |
1161 | 1616 |
1162 | 1617 |
1163 unittest.group("obj-schema-Resource", () { | 1618 unittest.group("obj-schema-Resource", () { |
1164 unittest.test("to-json--from-json", () { | 1619 unittest.test("to-json--from-json", () { |
1165 var o = buildResource(); | 1620 var o = buildResource(); |
1166 var od = new api.Resource.fromJson(o.toJson()); | 1621 var od = new api.Resource.fromJson(o.toJson()); |
1167 checkResource(od); | 1622 checkResource(od); |
1168 }); | 1623 }); |
1169 }); | 1624 }); |
1170 | 1625 |
1171 | 1626 |
| 1627 unittest.group("obj-schema-ResourceAccessControl", () { |
| 1628 unittest.test("to-json--from-json", () { |
| 1629 var o = buildResourceAccessControl(); |
| 1630 var od = new api.ResourceAccessControl.fromJson(o.toJson()); |
| 1631 checkResourceAccessControl(od); |
| 1632 }); |
| 1633 }); |
| 1634 |
| 1635 |
1172 unittest.group("obj-schema-ResourceUpdateErrorErrors", () { | 1636 unittest.group("obj-schema-ResourceUpdateErrorErrors", () { |
1173 unittest.test("to-json--from-json", () { | 1637 unittest.test("to-json--from-json", () { |
1174 var o = buildResourceUpdateErrorErrors(); | 1638 var o = buildResourceUpdateErrorErrors(); |
1175 var od = new api.ResourceUpdateErrorErrors.fromJson(o.toJson()); | 1639 var od = new api.ResourceUpdateErrorErrors.fromJson(o.toJson()); |
1176 checkResourceUpdateErrorErrors(od); | 1640 checkResourceUpdateErrorErrors(od); |
1177 }); | 1641 }); |
1178 }); | 1642 }); |
1179 | 1643 |
1180 | 1644 |
1181 unittest.group("obj-schema-ResourceUpdateError", () { | 1645 unittest.group("obj-schema-ResourceUpdateError", () { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1216 | 1680 |
1217 unittest.group("obj-schema-ResourcesListResponse", () { | 1681 unittest.group("obj-schema-ResourcesListResponse", () { |
1218 unittest.test("to-json--from-json", () { | 1682 unittest.test("to-json--from-json", () { |
1219 var o = buildResourcesListResponse(); | 1683 var o = buildResourcesListResponse(); |
1220 var od = new api.ResourcesListResponse.fromJson(o.toJson()); | 1684 var od = new api.ResourcesListResponse.fromJson(o.toJson()); |
1221 checkResourcesListResponse(od); | 1685 checkResourcesListResponse(od); |
1222 }); | 1686 }); |
1223 }); | 1687 }); |
1224 | 1688 |
1225 | 1689 |
| 1690 unittest.group("obj-schema-Rule", () { |
| 1691 unittest.test("to-json--from-json", () { |
| 1692 var o = buildRule(); |
| 1693 var od = new api.Rule.fromJson(o.toJson()); |
| 1694 checkRule(od); |
| 1695 }); |
| 1696 }); |
| 1697 |
| 1698 |
1226 unittest.group("obj-schema-TargetConfiguration", () { | 1699 unittest.group("obj-schema-TargetConfiguration", () { |
1227 unittest.test("to-json--from-json", () { | 1700 unittest.test("to-json--from-json", () { |
1228 var o = buildTargetConfiguration(); | 1701 var o = buildTargetConfiguration(); |
1229 var od = new api.TargetConfiguration.fromJson(o.toJson()); | 1702 var od = new api.TargetConfiguration.fromJson(o.toJson()); |
1230 checkTargetConfiguration(od); | 1703 checkTargetConfiguration(od); |
1231 }); | 1704 }); |
1232 }); | 1705 }); |
1233 | 1706 |
1234 | 1707 |
| 1708 unittest.group("obj-schema-TestPermissionsRequest", () { |
| 1709 unittest.test("to-json--from-json", () { |
| 1710 var o = buildTestPermissionsRequest(); |
| 1711 var od = new api.TestPermissionsRequest.fromJson(o.toJson()); |
| 1712 checkTestPermissionsRequest(od); |
| 1713 }); |
| 1714 }); |
| 1715 |
| 1716 |
| 1717 unittest.group("obj-schema-TestPermissionsResponse", () { |
| 1718 unittest.test("to-json--from-json", () { |
| 1719 var o = buildTestPermissionsResponse(); |
| 1720 var od = new api.TestPermissionsResponse.fromJson(o.toJson()); |
| 1721 checkTestPermissionsResponse(od); |
| 1722 }); |
| 1723 }); |
| 1724 |
| 1725 |
1235 unittest.group("obj-schema-Type", () { | 1726 unittest.group("obj-schema-Type", () { |
1236 unittest.test("to-json--from-json", () { | 1727 unittest.test("to-json--from-json", () { |
1237 var o = buildType(); | 1728 var o = buildType(); |
1238 var od = new api.Type.fromJson(o.toJson()); | 1729 var od = new api.Type.fromJson(o.toJson()); |
1239 checkType(od); | 1730 checkType(od); |
1240 }); | 1731 }); |
1241 }); | 1732 }); |
1242 | 1733 |
1243 | 1734 |
1244 unittest.group("obj-schema-TypesListResponse", () { | 1735 unittest.group("obj-schema-TypesListResponse", () { |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 "content-type" : "application/json; charset=utf-8", | 1868 "content-type" : "application/json; charset=utf-8", |
1378 }; | 1869 }; |
1379 var resp = convert.JSON.encode(buildDeployment()); | 1870 var resp = convert.JSON.encode(buildDeployment()); |
1380 return new async.Future.value(stringResponse(200, h, resp)); | 1871 return new async.Future.value(stringResponse(200, h, resp)); |
1381 }), true); | 1872 }), true); |
1382 res.get(arg_project, arg_deployment).then(unittest.expectAsync(((api.Deplo
yment response) { | 1873 res.get(arg_project, arg_deployment).then(unittest.expectAsync(((api.Deplo
yment response) { |
1383 checkDeployment(response); | 1874 checkDeployment(response); |
1384 }))); | 1875 }))); |
1385 }); | 1876 }); |
1386 | 1877 |
| 1878 unittest.test("method--getIamPolicy", () { |
| 1879 |
| 1880 var mock = new HttpServerMock(); |
| 1881 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
| 1882 var arg_project = "foo"; |
| 1883 var arg_resource = "foo"; |
| 1884 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1885 var path = (req.url).path; |
| 1886 var pathOffset = 0; |
| 1887 var index; |
| 1888 var subPart; |
| 1889 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1890 pathOffset += 1; |
| 1891 |
| 1892 var query = (req.url).query; |
| 1893 var queryOffset = 0; |
| 1894 var queryMap = {}; |
| 1895 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1896 parseBool(n) { |
| 1897 if (n == "true") return true; |
| 1898 if (n == "false") return false; |
| 1899 if (n == null) return null; |
| 1900 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1901 } |
| 1902 if (query.length > 0) { |
| 1903 for (var part in query.split("&")) { |
| 1904 var keyvalue = part.split("="); |
| 1905 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1906 } |
| 1907 } |
| 1908 |
| 1909 |
| 1910 var h = { |
| 1911 "content-type" : "application/json; charset=utf-8", |
| 1912 }; |
| 1913 var resp = convert.JSON.encode(buildPolicy()); |
| 1914 return new async.Future.value(stringResponse(200, h, resp)); |
| 1915 }), true); |
| 1916 res.getIamPolicy(arg_project, arg_resource).then(unittest.expectAsync(((ap
i.Policy response) { |
| 1917 checkPolicy(response); |
| 1918 }))); |
| 1919 }); |
| 1920 |
1387 unittest.test("method--insert", () { | 1921 unittest.test("method--insert", () { |
1388 | 1922 |
1389 var mock = new HttpServerMock(); | 1923 var mock = new HttpServerMock(); |
1390 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; | 1924 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
1391 var arg_request = buildDeployment(); | 1925 var arg_request = buildDeployment(); |
1392 var arg_project = "foo"; | 1926 var arg_project = "foo"; |
1393 var arg_preview = true; | 1927 var arg_preview = true; |
1394 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1928 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1395 var obj = new api.Deployment.fromJson(json); | 1929 var obj = new api.Deployment.fromJson(json); |
1396 checkDeployment(obj); | 1930 checkDeployment(obj); |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1432 }))); | 1966 }))); |
1433 }); | 1967 }); |
1434 | 1968 |
1435 unittest.test("method--list", () { | 1969 unittest.test("method--list", () { |
1436 | 1970 |
1437 var mock = new HttpServerMock(); | 1971 var mock = new HttpServerMock(); |
1438 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; | 1972 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
1439 var arg_project = "foo"; | 1973 var arg_project = "foo"; |
1440 var arg_filter = "foo"; | 1974 var arg_filter = "foo"; |
1441 var arg_maxResults = 42; | 1975 var arg_maxResults = 42; |
| 1976 var arg_orderBy = "foo"; |
1442 var arg_pageToken = "foo"; | 1977 var arg_pageToken = "foo"; |
1443 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1978 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1444 var path = (req.url).path; | 1979 var path = (req.url).path; |
1445 var pathOffset = 0; | 1980 var pathOffset = 0; |
1446 var index; | 1981 var index; |
1447 var subPart; | 1982 var subPart; |
1448 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1983 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1449 pathOffset += 1; | 1984 pathOffset += 1; |
1450 | 1985 |
1451 var query = (req.url).query; | 1986 var query = (req.url).query; |
1452 var queryOffset = 0; | 1987 var queryOffset = 0; |
1453 var queryMap = {}; | 1988 var queryMap = {}; |
1454 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1989 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1455 parseBool(n) { | 1990 parseBool(n) { |
1456 if (n == "true") return true; | 1991 if (n == "true") return true; |
1457 if (n == "false") return false; | 1992 if (n == "false") return false; |
1458 if (n == null) return null; | 1993 if (n == null) return null; |
1459 throw new core.ArgumentError("Invalid boolean: $n"); | 1994 throw new core.ArgumentError("Invalid boolean: $n"); |
1460 } | 1995 } |
1461 if (query.length > 0) { | 1996 if (query.length > 0) { |
1462 for (var part in query.split("&")) { | 1997 for (var part in query.split("&")) { |
1463 var keyvalue = part.split("="); | 1998 var keyvalue = part.split("="); |
1464 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1999 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1465 } | 2000 } |
1466 } | 2001 } |
1467 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2002 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1468 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2003 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2004 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
1469 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2005 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1470 | 2006 |
1471 | 2007 |
1472 var h = { | 2008 var h = { |
1473 "content-type" : "application/json; charset=utf-8", | 2009 "content-type" : "application/json; charset=utf-8", |
1474 }; | 2010 }; |
1475 var resp = convert.JSON.encode(buildDeploymentsListResponse()); | 2011 var resp = convert.JSON.encode(buildDeploymentsListResponse()); |
1476 return new async.Future.value(stringResponse(200, h, resp)); | 2012 return new async.Future.value(stringResponse(200, h, resp)); |
1477 }), true); | 2013 }), true); |
1478 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, page
Token: arg_pageToken).then(unittest.expectAsync(((api.DeploymentsListResponse re
sponse) { | 2014 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, orde
rBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.Depl
oymentsListResponse response) { |
1479 checkDeploymentsListResponse(response); | 2015 checkDeploymentsListResponse(response); |
1480 }))); | 2016 }))); |
1481 }); | 2017 }); |
1482 | 2018 |
1483 unittest.test("method--patch", () { | 2019 unittest.test("method--patch", () { |
1484 | 2020 |
1485 var mock = new HttpServerMock(); | 2021 var mock = new HttpServerMock(); |
1486 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; | 2022 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
1487 var arg_request = buildDeployment(); | 2023 var arg_request = buildDeployment(); |
1488 var arg_project = "foo"; | 2024 var arg_project = "foo"; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1526 "content-type" : "application/json; charset=utf-8", | 2062 "content-type" : "application/json; charset=utf-8", |
1527 }; | 2063 }; |
1528 var resp = convert.JSON.encode(buildOperation()); | 2064 var resp = convert.JSON.encode(buildOperation()); |
1529 return new async.Future.value(stringResponse(200, h, resp)); | 2065 return new async.Future.value(stringResponse(200, h, resp)); |
1530 }), true); | 2066 }), true); |
1531 res.patch(arg_request, arg_project, arg_deployment, createPolicy: arg_crea
tePolicy, deletePolicy: arg_deletePolicy, preview: arg_preview).then(unittest.ex
pectAsync(((api.Operation response) { | 2067 res.patch(arg_request, arg_project, arg_deployment, createPolicy: arg_crea
tePolicy, deletePolicy: arg_deletePolicy, preview: arg_preview).then(unittest.ex
pectAsync(((api.Operation response) { |
1532 checkOperation(response); | 2068 checkOperation(response); |
1533 }))); | 2069 }))); |
1534 }); | 2070 }); |
1535 | 2071 |
| 2072 unittest.test("method--setIamPolicy", () { |
| 2073 |
| 2074 var mock = new HttpServerMock(); |
| 2075 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
| 2076 var arg_request = buildPolicy(); |
| 2077 var arg_project = "foo"; |
| 2078 var arg_resource = "foo"; |
| 2079 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2080 var obj = new api.Policy.fromJson(json); |
| 2081 checkPolicy(obj); |
| 2082 |
| 2083 var path = (req.url).path; |
| 2084 var pathOffset = 0; |
| 2085 var index; |
| 2086 var subPart; |
| 2087 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2088 pathOffset += 1; |
| 2089 |
| 2090 var query = (req.url).query; |
| 2091 var queryOffset = 0; |
| 2092 var queryMap = {}; |
| 2093 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2094 parseBool(n) { |
| 2095 if (n == "true") return true; |
| 2096 if (n == "false") return false; |
| 2097 if (n == null) return null; |
| 2098 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2099 } |
| 2100 if (query.length > 0) { |
| 2101 for (var part in query.split("&")) { |
| 2102 var keyvalue = part.split("="); |
| 2103 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2104 } |
| 2105 } |
| 2106 |
| 2107 |
| 2108 var h = { |
| 2109 "content-type" : "application/json; charset=utf-8", |
| 2110 }; |
| 2111 var resp = convert.JSON.encode(buildPolicy()); |
| 2112 return new async.Future.value(stringResponse(200, h, resp)); |
| 2113 }), true); |
| 2114 res.setIamPolicy(arg_request, arg_project, arg_resource).then(unittest.exp
ectAsync(((api.Policy response) { |
| 2115 checkPolicy(response); |
| 2116 }))); |
| 2117 }); |
| 2118 |
1536 unittest.test("method--stop", () { | 2119 unittest.test("method--stop", () { |
1537 | 2120 |
1538 var mock = new HttpServerMock(); | 2121 var mock = new HttpServerMock(); |
1539 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; | 2122 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
1540 var arg_request = buildDeploymentsStopRequest(); | 2123 var arg_request = buildDeploymentsStopRequest(); |
1541 var arg_project = "foo"; | 2124 var arg_project = "foo"; |
1542 var arg_deployment = "foo"; | 2125 var arg_deployment = "foo"; |
1543 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2126 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1544 var obj = new api.DeploymentsStopRequest.fromJson(json); | 2127 var obj = new api.DeploymentsStopRequest.fromJson(json); |
1545 checkDeploymentsStopRequest(obj); | 2128 checkDeploymentsStopRequest(obj); |
(...skipping 27 matching lines...) Expand all Loading... |
1573 "content-type" : "application/json; charset=utf-8", | 2156 "content-type" : "application/json; charset=utf-8", |
1574 }; | 2157 }; |
1575 var resp = convert.JSON.encode(buildOperation()); | 2158 var resp = convert.JSON.encode(buildOperation()); |
1576 return new async.Future.value(stringResponse(200, h, resp)); | 2159 return new async.Future.value(stringResponse(200, h, resp)); |
1577 }), true); | 2160 }), true); |
1578 res.stop(arg_request, arg_project, arg_deployment).then(unittest.expectAsy
nc(((api.Operation response) { | 2161 res.stop(arg_request, arg_project, arg_deployment).then(unittest.expectAsy
nc(((api.Operation response) { |
1579 checkOperation(response); | 2162 checkOperation(response); |
1580 }))); | 2163 }))); |
1581 }); | 2164 }); |
1582 | 2165 |
| 2166 unittest.test("method--testIamPermissions", () { |
| 2167 |
| 2168 var mock = new HttpServerMock(); |
| 2169 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
| 2170 var arg_request = buildTestPermissionsRequest(); |
| 2171 var arg_project = "foo"; |
| 2172 var arg_resource = "foo"; |
| 2173 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 2174 var obj = new api.TestPermissionsRequest.fromJson(json); |
| 2175 checkTestPermissionsRequest(obj); |
| 2176 |
| 2177 var path = (req.url).path; |
| 2178 var pathOffset = 0; |
| 2179 var index; |
| 2180 var subPart; |
| 2181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 2182 pathOffset += 1; |
| 2183 |
| 2184 var query = (req.url).query; |
| 2185 var queryOffset = 0; |
| 2186 var queryMap = {}; |
| 2187 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 2188 parseBool(n) { |
| 2189 if (n == "true") return true; |
| 2190 if (n == "false") return false; |
| 2191 if (n == null) return null; |
| 2192 throw new core.ArgumentError("Invalid boolean: $n"); |
| 2193 } |
| 2194 if (query.length > 0) { |
| 2195 for (var part in query.split("&")) { |
| 2196 var keyvalue = part.split("="); |
| 2197 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 2198 } |
| 2199 } |
| 2200 |
| 2201 |
| 2202 var h = { |
| 2203 "content-type" : "application/json; charset=utf-8", |
| 2204 }; |
| 2205 var resp = convert.JSON.encode(buildTestPermissionsResponse()); |
| 2206 return new async.Future.value(stringResponse(200, h, resp)); |
| 2207 }), true); |
| 2208 res.testIamPermissions(arg_request, arg_project, arg_resource).then(unitte
st.expectAsync(((api.TestPermissionsResponse response) { |
| 2209 checkTestPermissionsResponse(response); |
| 2210 }))); |
| 2211 }); |
| 2212 |
1583 unittest.test("method--update", () { | 2213 unittest.test("method--update", () { |
1584 | 2214 |
1585 var mock = new HttpServerMock(); | 2215 var mock = new HttpServerMock(); |
1586 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; | 2216 api.DeploymentsResourceApi res = new api.DeploymentmanagerApi(mock).deploy
ments; |
1587 var arg_request = buildDeployment(); | 2217 var arg_request = buildDeployment(); |
1588 var arg_project = "foo"; | 2218 var arg_project = "foo"; |
1589 var arg_deployment = "foo"; | 2219 var arg_deployment = "foo"; |
1590 var arg_createPolicy = "foo"; | 2220 var arg_createPolicy = "foo"; |
1591 var arg_deletePolicy = "foo"; | 2221 var arg_deletePolicy = "foo"; |
1592 var arg_preview = true; | 2222 var arg_preview = true; |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 }); | 2312 }); |
1683 | 2313 |
1684 unittest.test("method--list", () { | 2314 unittest.test("method--list", () { |
1685 | 2315 |
1686 var mock = new HttpServerMock(); | 2316 var mock = new HttpServerMock(); |
1687 api.ManifestsResourceApi res = new api.DeploymentmanagerApi(mock).manifest
s; | 2317 api.ManifestsResourceApi res = new api.DeploymentmanagerApi(mock).manifest
s; |
1688 var arg_project = "foo"; | 2318 var arg_project = "foo"; |
1689 var arg_deployment = "foo"; | 2319 var arg_deployment = "foo"; |
1690 var arg_filter = "foo"; | 2320 var arg_filter = "foo"; |
1691 var arg_maxResults = 42; | 2321 var arg_maxResults = 42; |
| 2322 var arg_orderBy = "foo"; |
1692 var arg_pageToken = "foo"; | 2323 var arg_pageToken = "foo"; |
1693 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2324 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1694 var path = (req.url).path; | 2325 var path = (req.url).path; |
1695 var pathOffset = 0; | 2326 var pathOffset = 0; |
1696 var index; | 2327 var index; |
1697 var subPart; | 2328 var subPart; |
1698 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2329 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1699 pathOffset += 1; | 2330 pathOffset += 1; |
1700 | 2331 |
1701 var query = (req.url).query; | 2332 var query = (req.url).query; |
1702 var queryOffset = 0; | 2333 var queryOffset = 0; |
1703 var queryMap = {}; | 2334 var queryMap = {}; |
1704 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2335 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1705 parseBool(n) { | 2336 parseBool(n) { |
1706 if (n == "true") return true; | 2337 if (n == "true") return true; |
1707 if (n == "false") return false; | 2338 if (n == "false") return false; |
1708 if (n == null) return null; | 2339 if (n == null) return null; |
1709 throw new core.ArgumentError("Invalid boolean: $n"); | 2340 throw new core.ArgumentError("Invalid boolean: $n"); |
1710 } | 2341 } |
1711 if (query.length > 0) { | 2342 if (query.length > 0) { |
1712 for (var part in query.split("&")) { | 2343 for (var part in query.split("&")) { |
1713 var keyvalue = part.split("="); | 2344 var keyvalue = part.split("="); |
1714 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2345 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1715 } | 2346 } |
1716 } | 2347 } |
1717 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2348 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1718 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2349 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2350 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
1719 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2351 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1720 | 2352 |
1721 | 2353 |
1722 var h = { | 2354 var h = { |
1723 "content-type" : "application/json; charset=utf-8", | 2355 "content-type" : "application/json; charset=utf-8", |
1724 }; | 2356 }; |
1725 var resp = convert.JSON.encode(buildManifestsListResponse()); | 2357 var resp = convert.JSON.encode(buildManifestsListResponse()); |
1726 return new async.Future.value(stringResponse(200, h, resp)); | 2358 return new async.Future.value(stringResponse(200, h, resp)); |
1727 }), true); | 2359 }), true); |
1728 res.list(arg_project, arg_deployment, filter: arg_filter, maxResults: arg_
maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ManifestsL
istResponse response) { | 2360 res.list(arg_project, arg_deployment, filter: arg_filter, maxResults: arg_
maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expect
Async(((api.ManifestsListResponse response) { |
1729 checkManifestsListResponse(response); | 2361 checkManifestsListResponse(response); |
1730 }))); | 2362 }))); |
1731 }); | 2363 }); |
1732 | 2364 |
1733 }); | 2365 }); |
1734 | 2366 |
1735 | 2367 |
1736 unittest.group("resource-OperationsResourceApi", () { | 2368 unittest.group("resource-OperationsResourceApi", () { |
1737 unittest.test("method--get", () { | 2369 unittest.test("method--get", () { |
1738 | 2370 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1777 }))); | 2409 }))); |
1778 }); | 2410 }); |
1779 | 2411 |
1780 unittest.test("method--list", () { | 2412 unittest.test("method--list", () { |
1781 | 2413 |
1782 var mock = new HttpServerMock(); | 2414 var mock = new HttpServerMock(); |
1783 api.OperationsResourceApi res = new api.DeploymentmanagerApi(mock).operati
ons; | 2415 api.OperationsResourceApi res = new api.DeploymentmanagerApi(mock).operati
ons; |
1784 var arg_project = "foo"; | 2416 var arg_project = "foo"; |
1785 var arg_filter = "foo"; | 2417 var arg_filter = "foo"; |
1786 var arg_maxResults = 42; | 2418 var arg_maxResults = 42; |
| 2419 var arg_orderBy = "foo"; |
1787 var arg_pageToken = "foo"; | 2420 var arg_pageToken = "foo"; |
1788 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2421 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1789 var path = (req.url).path; | 2422 var path = (req.url).path; |
1790 var pathOffset = 0; | 2423 var pathOffset = 0; |
1791 var index; | 2424 var index; |
1792 var subPart; | 2425 var subPart; |
1793 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2426 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1794 pathOffset += 1; | 2427 pathOffset += 1; |
1795 | 2428 |
1796 var query = (req.url).query; | 2429 var query = (req.url).query; |
1797 var queryOffset = 0; | 2430 var queryOffset = 0; |
1798 var queryMap = {}; | 2431 var queryMap = {}; |
1799 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2432 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1800 parseBool(n) { | 2433 parseBool(n) { |
1801 if (n == "true") return true; | 2434 if (n == "true") return true; |
1802 if (n == "false") return false; | 2435 if (n == "false") return false; |
1803 if (n == null) return null; | 2436 if (n == null) return null; |
1804 throw new core.ArgumentError("Invalid boolean: $n"); | 2437 throw new core.ArgumentError("Invalid boolean: $n"); |
1805 } | 2438 } |
1806 if (query.length > 0) { | 2439 if (query.length > 0) { |
1807 for (var part in query.split("&")) { | 2440 for (var part in query.split("&")) { |
1808 var keyvalue = part.split("="); | 2441 var keyvalue = part.split("="); |
1809 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2442 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1810 } | 2443 } |
1811 } | 2444 } |
1812 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2445 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1813 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2446 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2447 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
1814 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2448 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1815 | 2449 |
1816 | 2450 |
1817 var h = { | 2451 var h = { |
1818 "content-type" : "application/json; charset=utf-8", | 2452 "content-type" : "application/json; charset=utf-8", |
1819 }; | 2453 }; |
1820 var resp = convert.JSON.encode(buildOperationsListResponse()); | 2454 var resp = convert.JSON.encode(buildOperationsListResponse()); |
1821 return new async.Future.value(stringResponse(200, h, resp)); | 2455 return new async.Future.value(stringResponse(200, h, resp)); |
1822 }), true); | 2456 }), true); |
1823 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, page
Token: arg_pageToken).then(unittest.expectAsync(((api.OperationsListResponse res
ponse) { | 2457 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, orde
rBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.Oper
ationsListResponse response) { |
1824 checkOperationsListResponse(response); | 2458 checkOperationsListResponse(response); |
1825 }))); | 2459 }))); |
1826 }); | 2460 }); |
1827 | 2461 |
1828 }); | 2462 }); |
1829 | 2463 |
1830 | 2464 |
1831 unittest.group("resource-ResourcesResourceApi", () { | 2465 unittest.group("resource-ResourcesResourceApi", () { |
1832 unittest.test("method--get", () { | 2466 unittest.test("method--get", () { |
1833 | 2467 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1874 }); | 2508 }); |
1875 | 2509 |
1876 unittest.test("method--list", () { | 2510 unittest.test("method--list", () { |
1877 | 2511 |
1878 var mock = new HttpServerMock(); | 2512 var mock = new HttpServerMock(); |
1879 api.ResourcesResourceApi res = new api.DeploymentmanagerApi(mock).resource
s; | 2513 api.ResourcesResourceApi res = new api.DeploymentmanagerApi(mock).resource
s; |
1880 var arg_project = "foo"; | 2514 var arg_project = "foo"; |
1881 var arg_deployment = "foo"; | 2515 var arg_deployment = "foo"; |
1882 var arg_filter = "foo"; | 2516 var arg_filter = "foo"; |
1883 var arg_maxResults = 42; | 2517 var arg_maxResults = 42; |
| 2518 var arg_orderBy = "foo"; |
1884 var arg_pageToken = "foo"; | 2519 var arg_pageToken = "foo"; |
1885 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2520 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1886 var path = (req.url).path; | 2521 var path = (req.url).path; |
1887 var pathOffset = 0; | 2522 var pathOffset = 0; |
1888 var index; | 2523 var index; |
1889 var subPart; | 2524 var subPart; |
1890 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2525 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1891 pathOffset += 1; | 2526 pathOffset += 1; |
1892 | 2527 |
1893 var query = (req.url).query; | 2528 var query = (req.url).query; |
1894 var queryOffset = 0; | 2529 var queryOffset = 0; |
1895 var queryMap = {}; | 2530 var queryMap = {}; |
1896 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2531 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1897 parseBool(n) { | 2532 parseBool(n) { |
1898 if (n == "true") return true; | 2533 if (n == "true") return true; |
1899 if (n == "false") return false; | 2534 if (n == "false") return false; |
1900 if (n == null) return null; | 2535 if (n == null) return null; |
1901 throw new core.ArgumentError("Invalid boolean: $n"); | 2536 throw new core.ArgumentError("Invalid boolean: $n"); |
1902 } | 2537 } |
1903 if (query.length > 0) { | 2538 if (query.length > 0) { |
1904 for (var part in query.split("&")) { | 2539 for (var part in query.split("&")) { |
1905 var keyvalue = part.split("="); | 2540 var keyvalue = part.split("="); |
1906 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2541 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1907 } | 2542 } |
1908 } | 2543 } |
1909 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2544 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1910 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2545 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2546 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
1911 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2547 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1912 | 2548 |
1913 | 2549 |
1914 var h = { | 2550 var h = { |
1915 "content-type" : "application/json; charset=utf-8", | 2551 "content-type" : "application/json; charset=utf-8", |
1916 }; | 2552 }; |
1917 var resp = convert.JSON.encode(buildResourcesListResponse()); | 2553 var resp = convert.JSON.encode(buildResourcesListResponse()); |
1918 return new async.Future.value(stringResponse(200, h, resp)); | 2554 return new async.Future.value(stringResponse(200, h, resp)); |
1919 }), true); | 2555 }), true); |
1920 res.list(arg_project, arg_deployment, filter: arg_filter, maxResults: arg_
maxResults, pageToken: arg_pageToken).then(unittest.expectAsync(((api.ResourcesL
istResponse response) { | 2556 res.list(arg_project, arg_deployment, filter: arg_filter, maxResults: arg_
maxResults, orderBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expect
Async(((api.ResourcesListResponse response) { |
1921 checkResourcesListResponse(response); | 2557 checkResourcesListResponse(response); |
1922 }))); | 2558 }))); |
1923 }); | 2559 }); |
1924 | 2560 |
1925 }); | 2561 }); |
1926 | 2562 |
1927 | 2563 |
1928 unittest.group("resource-TypesResourceApi", () { | 2564 unittest.group("resource-TypesResourceApi", () { |
1929 unittest.test("method--list", () { | 2565 unittest.test("method--list", () { |
1930 | 2566 |
1931 var mock = new HttpServerMock(); | 2567 var mock = new HttpServerMock(); |
1932 api.TypesResourceApi res = new api.DeploymentmanagerApi(mock).types; | 2568 api.TypesResourceApi res = new api.DeploymentmanagerApi(mock).types; |
1933 var arg_project = "foo"; | 2569 var arg_project = "foo"; |
1934 var arg_filter = "foo"; | 2570 var arg_filter = "foo"; |
1935 var arg_maxResults = 42; | 2571 var arg_maxResults = 42; |
| 2572 var arg_orderBy = "foo"; |
1936 var arg_pageToken = "foo"; | 2573 var arg_pageToken = "foo"; |
1937 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 2574 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
1938 var path = (req.url).path; | 2575 var path = (req.url).path; |
1939 var pathOffset = 0; | 2576 var pathOffset = 0; |
1940 var index; | 2577 var index; |
1941 var subPart; | 2578 var subPart; |
1942 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 2579 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
1943 pathOffset += 1; | 2580 pathOffset += 1; |
1944 | 2581 |
1945 var query = (req.url).query; | 2582 var query = (req.url).query; |
1946 var queryOffset = 0; | 2583 var queryOffset = 0; |
1947 var queryMap = {}; | 2584 var queryMap = {}; |
1948 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 2585 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
1949 parseBool(n) { | 2586 parseBool(n) { |
1950 if (n == "true") return true; | 2587 if (n == "true") return true; |
1951 if (n == "false") return false; | 2588 if (n == "false") return false; |
1952 if (n == null) return null; | 2589 if (n == null) return null; |
1953 throw new core.ArgumentError("Invalid boolean: $n"); | 2590 throw new core.ArgumentError("Invalid boolean: $n"); |
1954 } | 2591 } |
1955 if (query.length > 0) { | 2592 if (query.length > 0) { |
1956 for (var part in query.split("&")) { | 2593 for (var part in query.split("&")) { |
1957 var keyvalue = part.split("="); | 2594 var keyvalue = part.split("="); |
1958 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 2595 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
1959 } | 2596 } |
1960 } | 2597 } |
1961 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); | 2598 unittest.expect(queryMap["filter"].first, unittest.equals(arg_filter)); |
1962 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); | 2599 unittest.expect(core.int.parse(queryMap["maxResults"].first), unittest.e
quals(arg_maxResults)); |
| 2600 unittest.expect(queryMap["orderBy"].first, unittest.equals(arg_orderBy))
; |
1963 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | 2601 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
1964 | 2602 |
1965 | 2603 |
1966 var h = { | 2604 var h = { |
1967 "content-type" : "application/json; charset=utf-8", | 2605 "content-type" : "application/json; charset=utf-8", |
1968 }; | 2606 }; |
1969 var resp = convert.JSON.encode(buildTypesListResponse()); | 2607 var resp = convert.JSON.encode(buildTypesListResponse()); |
1970 return new async.Future.value(stringResponse(200, h, resp)); | 2608 return new async.Future.value(stringResponse(200, h, resp)); |
1971 }), true); | 2609 }), true); |
1972 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, page
Token: arg_pageToken).then(unittest.expectAsync(((api.TypesListResponse response
) { | 2610 res.list(arg_project, filter: arg_filter, maxResults: arg_maxResults, orde
rBy: arg_orderBy, pageToken: arg_pageToken).then(unittest.expectAsync(((api.Type
sListResponse response) { |
1973 checkTypesListResponse(response); | 2611 checkTypesListResponse(response); |
1974 }))); | 2612 }))); |
1975 }); | 2613 }); |
1976 | 2614 |
1977 }); | 2615 }); |
1978 | 2616 |
1979 | 2617 |
1980 } | 2618 } |
1981 | 2619 |
OLD | NEW |