| OLD | NEW |
| 1 library googleapis.iam.v1.test; | 1 library googleapis.iam.v1.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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 checkAuditData(api.AuditData o) { | 65 checkAuditData(api.AuditData o) { |
| 66 buildCounterAuditData++; | 66 buildCounterAuditData++; |
| 67 if (buildCounterAuditData < 3) { | 67 if (buildCounterAuditData < 3) { |
| 68 checkPolicyDelta(o.policyDelta); | 68 checkPolicyDelta(o.policyDelta); |
| 69 } | 69 } |
| 70 buildCounterAuditData--; | 70 buildCounterAuditData--; |
| 71 } | 71 } |
| 72 | 72 |
| 73 buildUnnamed1080() { | 73 buildUnnamed1089() { |
| 74 var o = new core.List<core.String>(); | 74 var o = new core.List<core.String>(); |
| 75 o.add("foo"); | 75 o.add("foo"); |
| 76 o.add("foo"); | 76 o.add("foo"); |
| 77 return o; | 77 return o; |
| 78 } | 78 } |
| 79 | 79 |
| 80 checkUnnamed1080(core.List<core.String> o) { | 80 checkUnnamed1089(core.List<core.String> o) { |
| 81 unittest.expect(o, unittest.hasLength(2)); | 81 unittest.expect(o, unittest.hasLength(2)); |
| 82 unittest.expect(o[0], unittest.equals('foo')); | 82 unittest.expect(o[0], unittest.equals('foo')); |
| 83 unittest.expect(o[1], unittest.equals('foo')); | 83 unittest.expect(o[1], unittest.equals('foo')); |
| 84 } | 84 } |
| 85 | 85 |
| 86 core.int buildCounterBinding = 0; | 86 core.int buildCounterBinding = 0; |
| 87 buildBinding() { | 87 buildBinding() { |
| 88 var o = new api.Binding(); | 88 var o = new api.Binding(); |
| 89 buildCounterBinding++; | 89 buildCounterBinding++; |
| 90 if (buildCounterBinding < 3) { | 90 if (buildCounterBinding < 3) { |
| 91 o.members = buildUnnamed1080(); | 91 o.members = buildUnnamed1089(); |
| 92 o.role = "foo"; | 92 o.role = "foo"; |
| 93 } | 93 } |
| 94 buildCounterBinding--; | 94 buildCounterBinding--; |
| 95 return o; | 95 return o; |
| 96 } | 96 } |
| 97 | 97 |
| 98 checkBinding(api.Binding o) { | 98 checkBinding(api.Binding o) { |
| 99 buildCounterBinding++; | 99 buildCounterBinding++; |
| 100 if (buildCounterBinding < 3) { | 100 if (buildCounterBinding < 3) { |
| 101 checkUnnamed1080(o.members); | 101 checkUnnamed1089(o.members); |
| 102 unittest.expect(o.role, unittest.equals('foo')); | 102 unittest.expect(o.role, unittest.equals('foo')); |
| 103 } | 103 } |
| 104 buildCounterBinding--; | 104 buildCounterBinding--; |
| 105 } | 105 } |
| 106 | 106 |
| 107 core.int buildCounterBindingDelta = 0; | 107 core.int buildCounterBindingDelta = 0; |
| 108 buildBindingDelta() { | 108 buildBindingDelta() { |
| 109 var o = new api.BindingDelta(); | 109 var o = new api.BindingDelta(); |
| 110 buildCounterBindingDelta++; | 110 buildCounterBindingDelta++; |
| 111 if (buildCounterBindingDelta < 3) { | 111 if (buildCounterBindingDelta < 3) { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 return o; | 179 return o; |
| 180 } | 180 } |
| 181 | 181 |
| 182 checkEmpty(api.Empty o) { | 182 checkEmpty(api.Empty o) { |
| 183 buildCounterEmpty++; | 183 buildCounterEmpty++; |
| 184 if (buildCounterEmpty < 3) { | 184 if (buildCounterEmpty < 3) { |
| 185 } | 185 } |
| 186 buildCounterEmpty--; | 186 buildCounterEmpty--; |
| 187 } | 187 } |
| 188 | 188 |
| 189 buildUnnamed1081() { | 189 buildUnnamed1090() { |
| 190 var o = new core.List<api.ServiceAccountKey>(); | 190 var o = new core.List<api.ServiceAccountKey>(); |
| 191 o.add(buildServiceAccountKey()); | 191 o.add(buildServiceAccountKey()); |
| 192 o.add(buildServiceAccountKey()); | 192 o.add(buildServiceAccountKey()); |
| 193 return o; | 193 return o; |
| 194 } | 194 } |
| 195 | 195 |
| 196 checkUnnamed1081(core.List<api.ServiceAccountKey> o) { | 196 checkUnnamed1090(core.List<api.ServiceAccountKey> o) { |
| 197 unittest.expect(o, unittest.hasLength(2)); | 197 unittest.expect(o, unittest.hasLength(2)); |
| 198 checkServiceAccountKey(o[0]); | 198 checkServiceAccountKey(o[0]); |
| 199 checkServiceAccountKey(o[1]); | 199 checkServiceAccountKey(o[1]); |
| 200 } | 200 } |
| 201 | 201 |
| 202 core.int buildCounterListServiceAccountKeysResponse = 0; | 202 core.int buildCounterListServiceAccountKeysResponse = 0; |
| 203 buildListServiceAccountKeysResponse() { | 203 buildListServiceAccountKeysResponse() { |
| 204 var o = new api.ListServiceAccountKeysResponse(); | 204 var o = new api.ListServiceAccountKeysResponse(); |
| 205 buildCounterListServiceAccountKeysResponse++; | 205 buildCounterListServiceAccountKeysResponse++; |
| 206 if (buildCounterListServiceAccountKeysResponse < 3) { | 206 if (buildCounterListServiceAccountKeysResponse < 3) { |
| 207 o.keys = buildUnnamed1081(); | 207 o.keys = buildUnnamed1090(); |
| 208 } | 208 } |
| 209 buildCounterListServiceAccountKeysResponse--; | 209 buildCounterListServiceAccountKeysResponse--; |
| 210 return o; | 210 return o; |
| 211 } | 211 } |
| 212 | 212 |
| 213 checkListServiceAccountKeysResponse(api.ListServiceAccountKeysResponse o) { | 213 checkListServiceAccountKeysResponse(api.ListServiceAccountKeysResponse o) { |
| 214 buildCounterListServiceAccountKeysResponse++; | 214 buildCounterListServiceAccountKeysResponse++; |
| 215 if (buildCounterListServiceAccountKeysResponse < 3) { | 215 if (buildCounterListServiceAccountKeysResponse < 3) { |
| 216 checkUnnamed1081(o.keys); | 216 checkUnnamed1090(o.keys); |
| 217 } | 217 } |
| 218 buildCounterListServiceAccountKeysResponse--; | 218 buildCounterListServiceAccountKeysResponse--; |
| 219 } | 219 } |
| 220 | 220 |
| 221 buildUnnamed1082() { | 221 buildUnnamed1091() { |
| 222 var o = new core.List<api.ServiceAccount>(); | 222 var o = new core.List<api.ServiceAccount>(); |
| 223 o.add(buildServiceAccount()); | 223 o.add(buildServiceAccount()); |
| 224 o.add(buildServiceAccount()); | 224 o.add(buildServiceAccount()); |
| 225 return o; | 225 return o; |
| 226 } | 226 } |
| 227 | 227 |
| 228 checkUnnamed1082(core.List<api.ServiceAccount> o) { | 228 checkUnnamed1091(core.List<api.ServiceAccount> o) { |
| 229 unittest.expect(o, unittest.hasLength(2)); | 229 unittest.expect(o, unittest.hasLength(2)); |
| 230 checkServiceAccount(o[0]); | 230 checkServiceAccount(o[0]); |
| 231 checkServiceAccount(o[1]); | 231 checkServiceAccount(o[1]); |
| 232 } | 232 } |
| 233 | 233 |
| 234 core.int buildCounterListServiceAccountsResponse = 0; | 234 core.int buildCounterListServiceAccountsResponse = 0; |
| 235 buildListServiceAccountsResponse() { | 235 buildListServiceAccountsResponse() { |
| 236 var o = new api.ListServiceAccountsResponse(); | 236 var o = new api.ListServiceAccountsResponse(); |
| 237 buildCounterListServiceAccountsResponse++; | 237 buildCounterListServiceAccountsResponse++; |
| 238 if (buildCounterListServiceAccountsResponse < 3) { | 238 if (buildCounterListServiceAccountsResponse < 3) { |
| 239 o.accounts = buildUnnamed1082(); | 239 o.accounts = buildUnnamed1091(); |
| 240 o.nextPageToken = "foo"; | 240 o.nextPageToken = "foo"; |
| 241 } | 241 } |
| 242 buildCounterListServiceAccountsResponse--; | 242 buildCounterListServiceAccountsResponse--; |
| 243 return o; | 243 return o; |
| 244 } | 244 } |
| 245 | 245 |
| 246 checkListServiceAccountsResponse(api.ListServiceAccountsResponse o) { | 246 checkListServiceAccountsResponse(api.ListServiceAccountsResponse o) { |
| 247 buildCounterListServiceAccountsResponse++; | 247 buildCounterListServiceAccountsResponse++; |
| 248 if (buildCounterListServiceAccountsResponse < 3) { | 248 if (buildCounterListServiceAccountsResponse < 3) { |
| 249 checkUnnamed1082(o.accounts); | 249 checkUnnamed1091(o.accounts); |
| 250 unittest.expect(o.nextPageToken, unittest.equals('foo')); | 250 unittest.expect(o.nextPageToken, unittest.equals('foo')); |
| 251 } | 251 } |
| 252 buildCounterListServiceAccountsResponse--; | 252 buildCounterListServiceAccountsResponse--; |
| 253 } | 253 } |
| 254 | 254 |
| 255 buildUnnamed1083() { | 255 buildUnnamed1092() { |
| 256 var o = new core.List<api.Binding>(); | 256 var o = new core.List<api.Binding>(); |
| 257 o.add(buildBinding()); | 257 o.add(buildBinding()); |
| 258 o.add(buildBinding()); | 258 o.add(buildBinding()); |
| 259 return o; | 259 return o; |
| 260 } | 260 } |
| 261 | 261 |
| 262 checkUnnamed1083(core.List<api.Binding> o) { | 262 checkUnnamed1092(core.List<api.Binding> o) { |
| 263 unittest.expect(o, unittest.hasLength(2)); | 263 unittest.expect(o, unittest.hasLength(2)); |
| 264 checkBinding(o[0]); | 264 checkBinding(o[0]); |
| 265 checkBinding(o[1]); | 265 checkBinding(o[1]); |
| 266 } | 266 } |
| 267 | 267 |
| 268 core.int buildCounterPolicy = 0; | 268 core.int buildCounterPolicy = 0; |
| 269 buildPolicy() { | 269 buildPolicy() { |
| 270 var o = new api.Policy(); | 270 var o = new api.Policy(); |
| 271 buildCounterPolicy++; | 271 buildCounterPolicy++; |
| 272 if (buildCounterPolicy < 3) { | 272 if (buildCounterPolicy < 3) { |
| 273 o.bindings = buildUnnamed1083(); | 273 o.bindings = buildUnnamed1092(); |
| 274 o.etag = "foo"; | 274 o.etag = "foo"; |
| 275 o.version = 42; | 275 o.version = 42; |
| 276 } | 276 } |
| 277 buildCounterPolicy--; | 277 buildCounterPolicy--; |
| 278 return o; | 278 return o; |
| 279 } | 279 } |
| 280 | 280 |
| 281 checkPolicy(api.Policy o) { | 281 checkPolicy(api.Policy o) { |
| 282 buildCounterPolicy++; | 282 buildCounterPolicy++; |
| 283 if (buildCounterPolicy < 3) { | 283 if (buildCounterPolicy < 3) { |
| 284 checkUnnamed1083(o.bindings); | 284 checkUnnamed1092(o.bindings); |
| 285 unittest.expect(o.etag, unittest.equals('foo')); | 285 unittest.expect(o.etag, unittest.equals('foo')); |
| 286 unittest.expect(o.version, unittest.equals(42)); | 286 unittest.expect(o.version, unittest.equals(42)); |
| 287 } | 287 } |
| 288 buildCounterPolicy--; | 288 buildCounterPolicy--; |
| 289 } | 289 } |
| 290 | 290 |
| 291 buildUnnamed1084() { | 291 buildUnnamed1093() { |
| 292 var o = new core.List<api.BindingDelta>(); | 292 var o = new core.List<api.BindingDelta>(); |
| 293 o.add(buildBindingDelta()); | 293 o.add(buildBindingDelta()); |
| 294 o.add(buildBindingDelta()); | 294 o.add(buildBindingDelta()); |
| 295 return o; | 295 return o; |
| 296 } | 296 } |
| 297 | 297 |
| 298 checkUnnamed1084(core.List<api.BindingDelta> o) { | 298 checkUnnamed1093(core.List<api.BindingDelta> o) { |
| 299 unittest.expect(o, unittest.hasLength(2)); | 299 unittest.expect(o, unittest.hasLength(2)); |
| 300 checkBindingDelta(o[0]); | 300 checkBindingDelta(o[0]); |
| 301 checkBindingDelta(o[1]); | 301 checkBindingDelta(o[1]); |
| 302 } | 302 } |
| 303 | 303 |
| 304 core.int buildCounterPolicyDelta = 0; | 304 core.int buildCounterPolicyDelta = 0; |
| 305 buildPolicyDelta() { | 305 buildPolicyDelta() { |
| 306 var o = new api.PolicyDelta(); | 306 var o = new api.PolicyDelta(); |
| 307 buildCounterPolicyDelta++; | 307 buildCounterPolicyDelta++; |
| 308 if (buildCounterPolicyDelta < 3) { | 308 if (buildCounterPolicyDelta < 3) { |
| 309 o.bindingDeltas = buildUnnamed1084(); | 309 o.bindingDeltas = buildUnnamed1093(); |
| 310 } | 310 } |
| 311 buildCounterPolicyDelta--; | 311 buildCounterPolicyDelta--; |
| 312 return o; | 312 return o; |
| 313 } | 313 } |
| 314 | 314 |
| 315 checkPolicyDelta(api.PolicyDelta o) { | 315 checkPolicyDelta(api.PolicyDelta o) { |
| 316 buildCounterPolicyDelta++; | 316 buildCounterPolicyDelta++; |
| 317 if (buildCounterPolicyDelta < 3) { | 317 if (buildCounterPolicyDelta < 3) { |
| 318 checkUnnamed1084(o.bindingDeltas); | 318 checkUnnamed1093(o.bindingDeltas); |
| 319 } | 319 } |
| 320 buildCounterPolicyDelta--; | 320 buildCounterPolicyDelta--; |
| 321 } | 321 } |
| 322 | 322 |
| 323 core.int buildCounterQueryGrantableRolesRequest = 0; | 323 core.int buildCounterQueryGrantableRolesRequest = 0; |
| 324 buildQueryGrantableRolesRequest() { | 324 buildQueryGrantableRolesRequest() { |
| 325 var o = new api.QueryGrantableRolesRequest(); | 325 var o = new api.QueryGrantableRolesRequest(); |
| 326 buildCounterQueryGrantableRolesRequest++; | 326 buildCounterQueryGrantableRolesRequest++; |
| 327 if (buildCounterQueryGrantableRolesRequest < 3) { | 327 if (buildCounterQueryGrantableRolesRequest < 3) { |
| 328 o.fullResourceName = "foo"; | 328 o.fullResourceName = "foo"; |
| 329 } | 329 } |
| 330 buildCounterQueryGrantableRolesRequest--; | 330 buildCounterQueryGrantableRolesRequest--; |
| 331 return o; | 331 return o; |
| 332 } | 332 } |
| 333 | 333 |
| 334 checkQueryGrantableRolesRequest(api.QueryGrantableRolesRequest o) { | 334 checkQueryGrantableRolesRequest(api.QueryGrantableRolesRequest o) { |
| 335 buildCounterQueryGrantableRolesRequest++; | 335 buildCounterQueryGrantableRolesRequest++; |
| 336 if (buildCounterQueryGrantableRolesRequest < 3) { | 336 if (buildCounterQueryGrantableRolesRequest < 3) { |
| 337 unittest.expect(o.fullResourceName, unittest.equals('foo')); | 337 unittest.expect(o.fullResourceName, unittest.equals('foo')); |
| 338 } | 338 } |
| 339 buildCounterQueryGrantableRolesRequest--; | 339 buildCounterQueryGrantableRolesRequest--; |
| 340 } | 340 } |
| 341 | 341 |
| 342 buildUnnamed1085() { | 342 buildUnnamed1094() { |
| 343 var o = new core.List<api.Role>(); | 343 var o = new core.List<api.Role>(); |
| 344 o.add(buildRole()); | 344 o.add(buildRole()); |
| 345 o.add(buildRole()); | 345 o.add(buildRole()); |
| 346 return o; | 346 return o; |
| 347 } | 347 } |
| 348 | 348 |
| 349 checkUnnamed1085(core.List<api.Role> o) { | 349 checkUnnamed1094(core.List<api.Role> o) { |
| 350 unittest.expect(o, unittest.hasLength(2)); | 350 unittest.expect(o, unittest.hasLength(2)); |
| 351 checkRole(o[0]); | 351 checkRole(o[0]); |
| 352 checkRole(o[1]); | 352 checkRole(o[1]); |
| 353 } | 353 } |
| 354 | 354 |
| 355 core.int buildCounterQueryGrantableRolesResponse = 0; | 355 core.int buildCounterQueryGrantableRolesResponse = 0; |
| 356 buildQueryGrantableRolesResponse() { | 356 buildQueryGrantableRolesResponse() { |
| 357 var o = new api.QueryGrantableRolesResponse(); | 357 var o = new api.QueryGrantableRolesResponse(); |
| 358 buildCounterQueryGrantableRolesResponse++; | 358 buildCounterQueryGrantableRolesResponse++; |
| 359 if (buildCounterQueryGrantableRolesResponse < 3) { | 359 if (buildCounterQueryGrantableRolesResponse < 3) { |
| 360 o.roles = buildUnnamed1085(); | 360 o.roles = buildUnnamed1094(); |
| 361 } | 361 } |
| 362 buildCounterQueryGrantableRolesResponse--; | 362 buildCounterQueryGrantableRolesResponse--; |
| 363 return o; | 363 return o; |
| 364 } | 364 } |
| 365 | 365 |
| 366 checkQueryGrantableRolesResponse(api.QueryGrantableRolesResponse o) { | 366 checkQueryGrantableRolesResponse(api.QueryGrantableRolesResponse o) { |
| 367 buildCounterQueryGrantableRolesResponse++; | 367 buildCounterQueryGrantableRolesResponse++; |
| 368 if (buildCounterQueryGrantableRolesResponse < 3) { | 368 if (buildCounterQueryGrantableRolesResponse < 3) { |
| 369 checkUnnamed1085(o.roles); | 369 checkUnnamed1094(o.roles); |
| 370 } | 370 } |
| 371 buildCounterQueryGrantableRolesResponse--; | 371 buildCounterQueryGrantableRolesResponse--; |
| 372 } | 372 } |
| 373 | 373 |
| 374 core.int buildCounterRole = 0; | 374 core.int buildCounterRole = 0; |
| 375 buildRole() { | 375 buildRole() { |
| 376 var o = new api.Role(); | 376 var o = new api.Role(); |
| 377 buildCounterRole++; | 377 buildCounterRole++; |
| 378 if (buildCounterRole < 3) { | 378 if (buildCounterRole < 3) { |
| 379 o.description = "foo"; | 379 o.description = "foo"; |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 508 | 508 |
| 509 checkSignBlobResponse(api.SignBlobResponse o) { | 509 checkSignBlobResponse(api.SignBlobResponse o) { |
| 510 buildCounterSignBlobResponse++; | 510 buildCounterSignBlobResponse++; |
| 511 if (buildCounterSignBlobResponse < 3) { | 511 if (buildCounterSignBlobResponse < 3) { |
| 512 unittest.expect(o.keyId, unittest.equals('foo')); | 512 unittest.expect(o.keyId, unittest.equals('foo')); |
| 513 unittest.expect(o.signature, unittest.equals('foo')); | 513 unittest.expect(o.signature, unittest.equals('foo')); |
| 514 } | 514 } |
| 515 buildCounterSignBlobResponse--; | 515 buildCounterSignBlobResponse--; |
| 516 } | 516 } |
| 517 | 517 |
| 518 buildUnnamed1086() { | 518 core.int buildCounterSignJwtRequest = 0; |
| 519 buildSignJwtRequest() { |
| 520 var o = new api.SignJwtRequest(); |
| 521 buildCounterSignJwtRequest++; |
| 522 if (buildCounterSignJwtRequest < 3) { |
| 523 o.payload = "foo"; |
| 524 } |
| 525 buildCounterSignJwtRequest--; |
| 526 return o; |
| 527 } |
| 528 |
| 529 checkSignJwtRequest(api.SignJwtRequest o) { |
| 530 buildCounterSignJwtRequest++; |
| 531 if (buildCounterSignJwtRequest < 3) { |
| 532 unittest.expect(o.payload, unittest.equals('foo')); |
| 533 } |
| 534 buildCounterSignJwtRequest--; |
| 535 } |
| 536 |
| 537 core.int buildCounterSignJwtResponse = 0; |
| 538 buildSignJwtResponse() { |
| 539 var o = new api.SignJwtResponse(); |
| 540 buildCounterSignJwtResponse++; |
| 541 if (buildCounterSignJwtResponse < 3) { |
| 542 o.keyId = "foo"; |
| 543 o.signedJwt = "foo"; |
| 544 } |
| 545 buildCounterSignJwtResponse--; |
| 546 return o; |
| 547 } |
| 548 |
| 549 checkSignJwtResponse(api.SignJwtResponse o) { |
| 550 buildCounterSignJwtResponse++; |
| 551 if (buildCounterSignJwtResponse < 3) { |
| 552 unittest.expect(o.keyId, unittest.equals('foo')); |
| 553 unittest.expect(o.signedJwt, unittest.equals('foo')); |
| 554 } |
| 555 buildCounterSignJwtResponse--; |
| 556 } |
| 557 |
| 558 buildUnnamed1095() { |
| 519 var o = new core.List<core.String>(); | 559 var o = new core.List<core.String>(); |
| 520 o.add("foo"); | 560 o.add("foo"); |
| 521 o.add("foo"); | 561 o.add("foo"); |
| 522 return o; | 562 return o; |
| 523 } | 563 } |
| 524 | 564 |
| 525 checkUnnamed1086(core.List<core.String> o) { | 565 checkUnnamed1095(core.List<core.String> o) { |
| 526 unittest.expect(o, unittest.hasLength(2)); | 566 unittest.expect(o, unittest.hasLength(2)); |
| 527 unittest.expect(o[0], unittest.equals('foo')); | 567 unittest.expect(o[0], unittest.equals('foo')); |
| 528 unittest.expect(o[1], unittest.equals('foo')); | 568 unittest.expect(o[1], unittest.equals('foo')); |
| 529 } | 569 } |
| 530 | 570 |
| 531 core.int buildCounterTestIamPermissionsRequest = 0; | 571 core.int buildCounterTestIamPermissionsRequest = 0; |
| 532 buildTestIamPermissionsRequest() { | 572 buildTestIamPermissionsRequest() { |
| 533 var o = new api.TestIamPermissionsRequest(); | 573 var o = new api.TestIamPermissionsRequest(); |
| 534 buildCounterTestIamPermissionsRequest++; | 574 buildCounterTestIamPermissionsRequest++; |
| 535 if (buildCounterTestIamPermissionsRequest < 3) { | 575 if (buildCounterTestIamPermissionsRequest < 3) { |
| 536 o.permissions = buildUnnamed1086(); | 576 o.permissions = buildUnnamed1095(); |
| 537 } | 577 } |
| 538 buildCounterTestIamPermissionsRequest--; | 578 buildCounterTestIamPermissionsRequest--; |
| 539 return o; | 579 return o; |
| 540 } | 580 } |
| 541 | 581 |
| 542 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { | 582 checkTestIamPermissionsRequest(api.TestIamPermissionsRequest o) { |
| 543 buildCounterTestIamPermissionsRequest++; | 583 buildCounterTestIamPermissionsRequest++; |
| 544 if (buildCounterTestIamPermissionsRequest < 3) { | 584 if (buildCounterTestIamPermissionsRequest < 3) { |
| 545 checkUnnamed1086(o.permissions); | 585 checkUnnamed1095(o.permissions); |
| 546 } | 586 } |
| 547 buildCounterTestIamPermissionsRequest--; | 587 buildCounterTestIamPermissionsRequest--; |
| 548 } | 588 } |
| 549 | 589 |
| 550 buildUnnamed1087() { | 590 buildUnnamed1096() { |
| 551 var o = new core.List<core.String>(); | 591 var o = new core.List<core.String>(); |
| 552 o.add("foo"); | 592 o.add("foo"); |
| 553 o.add("foo"); | 593 o.add("foo"); |
| 554 return o; | 594 return o; |
| 555 } | 595 } |
| 556 | 596 |
| 557 checkUnnamed1087(core.List<core.String> o) { | 597 checkUnnamed1096(core.List<core.String> o) { |
| 558 unittest.expect(o, unittest.hasLength(2)); | 598 unittest.expect(o, unittest.hasLength(2)); |
| 559 unittest.expect(o[0], unittest.equals('foo')); | 599 unittest.expect(o[0], unittest.equals('foo')); |
| 560 unittest.expect(o[1], unittest.equals('foo')); | 600 unittest.expect(o[1], unittest.equals('foo')); |
| 561 } | 601 } |
| 562 | 602 |
| 563 core.int buildCounterTestIamPermissionsResponse = 0; | 603 core.int buildCounterTestIamPermissionsResponse = 0; |
| 564 buildTestIamPermissionsResponse() { | 604 buildTestIamPermissionsResponse() { |
| 565 var o = new api.TestIamPermissionsResponse(); | 605 var o = new api.TestIamPermissionsResponse(); |
| 566 buildCounterTestIamPermissionsResponse++; | 606 buildCounterTestIamPermissionsResponse++; |
| 567 if (buildCounterTestIamPermissionsResponse < 3) { | 607 if (buildCounterTestIamPermissionsResponse < 3) { |
| 568 o.permissions = buildUnnamed1087(); | 608 o.permissions = buildUnnamed1096(); |
| 569 } | 609 } |
| 570 buildCounterTestIamPermissionsResponse--; | 610 buildCounterTestIamPermissionsResponse--; |
| 571 return o; | 611 return o; |
| 572 } | 612 } |
| 573 | 613 |
| 574 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { | 614 checkTestIamPermissionsResponse(api.TestIamPermissionsResponse o) { |
| 575 buildCounterTestIamPermissionsResponse++; | 615 buildCounterTestIamPermissionsResponse++; |
| 576 if (buildCounterTestIamPermissionsResponse < 3) { | 616 if (buildCounterTestIamPermissionsResponse < 3) { |
| 577 checkUnnamed1087(o.permissions); | 617 checkUnnamed1096(o.permissions); |
| 578 } | 618 } |
| 579 buildCounterTestIamPermissionsResponse--; | 619 buildCounterTestIamPermissionsResponse--; |
| 580 } | 620 } |
| 581 | 621 |
| 582 buildUnnamed1088() { | 622 buildUnnamed1097() { |
| 583 var o = new core.List<core.String>(); | 623 var o = new core.List<core.String>(); |
| 584 o.add("foo"); | 624 o.add("foo"); |
| 585 o.add("foo"); | 625 o.add("foo"); |
| 586 return o; | 626 return o; |
| 587 } | 627 } |
| 588 | 628 |
| 589 checkUnnamed1088(core.List<core.String> o) { | 629 checkUnnamed1097(core.List<core.String> o) { |
| 590 unittest.expect(o, unittest.hasLength(2)); | 630 unittest.expect(o, unittest.hasLength(2)); |
| 591 unittest.expect(o[0], unittest.equals('foo')); | 631 unittest.expect(o[0], unittest.equals('foo')); |
| 592 unittest.expect(o[1], unittest.equals('foo')); | 632 unittest.expect(o[1], unittest.equals('foo')); |
| 593 } | 633 } |
| 594 | 634 |
| 595 | 635 |
| 596 main() { | 636 main() { |
| 597 unittest.group("obj-schema-AuditData", () { | 637 unittest.group("obj-schema-AuditData", () { |
| 598 unittest.test("to-json--from-json", () { | 638 unittest.test("to-json--from-json", () { |
| 599 var o = buildAuditData(); | 639 var o = buildAuditData(); |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 | 789 |
| 750 unittest.group("obj-schema-SignBlobResponse", () { | 790 unittest.group("obj-schema-SignBlobResponse", () { |
| 751 unittest.test("to-json--from-json", () { | 791 unittest.test("to-json--from-json", () { |
| 752 var o = buildSignBlobResponse(); | 792 var o = buildSignBlobResponse(); |
| 753 var od = new api.SignBlobResponse.fromJson(o.toJson()); | 793 var od = new api.SignBlobResponse.fromJson(o.toJson()); |
| 754 checkSignBlobResponse(od); | 794 checkSignBlobResponse(od); |
| 755 }); | 795 }); |
| 756 }); | 796 }); |
| 757 | 797 |
| 758 | 798 |
| 799 unittest.group("obj-schema-SignJwtRequest", () { |
| 800 unittest.test("to-json--from-json", () { |
| 801 var o = buildSignJwtRequest(); |
| 802 var od = new api.SignJwtRequest.fromJson(o.toJson()); |
| 803 checkSignJwtRequest(od); |
| 804 }); |
| 805 }); |
| 806 |
| 807 |
| 808 unittest.group("obj-schema-SignJwtResponse", () { |
| 809 unittest.test("to-json--from-json", () { |
| 810 var o = buildSignJwtResponse(); |
| 811 var od = new api.SignJwtResponse.fromJson(o.toJson()); |
| 812 checkSignJwtResponse(od); |
| 813 }); |
| 814 }); |
| 815 |
| 816 |
| 759 unittest.group("obj-schema-TestIamPermissionsRequest", () { | 817 unittest.group("obj-schema-TestIamPermissionsRequest", () { |
| 760 unittest.test("to-json--from-json", () { | 818 unittest.test("to-json--from-json", () { |
| 761 var o = buildTestIamPermissionsRequest(); | 819 var o = buildTestIamPermissionsRequest(); |
| 762 var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); | 820 var od = new api.TestIamPermissionsRequest.fromJson(o.toJson()); |
| 763 checkTestIamPermissionsRequest(od); | 821 checkTestIamPermissionsRequest(od); |
| 764 }); | 822 }); |
| 765 }); | 823 }); |
| 766 | 824 |
| 767 | 825 |
| 768 unittest.group("obj-schema-TestIamPermissionsResponse", () { | 826 unittest.group("obj-schema-TestIamPermissionsResponse", () { |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { | 1015 res.getIamPolicy(arg_resource).then(unittest.expectAsync(((api.Policy resp
onse) { |
| 958 checkPolicy(response); | 1016 checkPolicy(response); |
| 959 }))); | 1017 }))); |
| 960 }); | 1018 }); |
| 961 | 1019 |
| 962 unittest.test("method--list", () { | 1020 unittest.test("method--list", () { |
| 963 | 1021 |
| 964 var mock = new HttpServerMock(); | 1022 var mock = new HttpServerMock(); |
| 965 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; | 1023 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; |
| 966 var arg_name = "foo"; | 1024 var arg_name = "foo"; |
| 1025 var arg_pageToken = "foo"; |
| 967 var arg_pageSize = 42; | 1026 var arg_pageSize = 42; |
| 968 var arg_pageToken = "foo"; | |
| 969 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1027 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 970 var path = (req.url).path; | 1028 var path = (req.url).path; |
| 971 var pathOffset = 0; | 1029 var pathOffset = 0; |
| 972 var index; | 1030 var index; |
| 973 var subPart; | 1031 var subPart; |
| 974 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1032 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 975 pathOffset += 1; | 1033 pathOffset += 1; |
| 976 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1034 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 977 pathOffset += 3; | 1035 pathOffset += 3; |
| 978 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1036 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 979 | 1037 |
| 980 var query = (req.url).query; | 1038 var query = (req.url).query; |
| 981 var queryOffset = 0; | 1039 var queryOffset = 0; |
| 982 var queryMap = {}; | 1040 var queryMap = {}; |
| 983 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); | 1041 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 984 parseBool(n) { | 1042 parseBool(n) { |
| 985 if (n == "true") return true; | 1043 if (n == "true") return true; |
| 986 if (n == "false") return false; | 1044 if (n == "false") return false; |
| 987 if (n == null) return null; | 1045 if (n == null) return null; |
| 988 throw new core.ArgumentError("Invalid boolean: $n"); | 1046 throw new core.ArgumentError("Invalid boolean: $n"); |
| 989 } | 1047 } |
| 990 if (query.length > 0) { | 1048 if (query.length > 0) { |
| 991 for (var part in query.split("&")) { | 1049 for (var part in query.split("&")) { |
| 992 var keyvalue = part.split("="); | 1050 var keyvalue = part.split("="); |
| 993 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); | 1051 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 994 } | 1052 } |
| 995 } | 1053 } |
| 1054 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); |
| 996 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); | 1055 unittest.expect(core.int.parse(queryMap["pageSize"].first), unittest.equ
als(arg_pageSize)); |
| 997 unittest.expect(queryMap["pageToken"].first, unittest.equals(arg_pageTok
en)); | |
| 998 | 1056 |
| 999 | 1057 |
| 1000 var h = { | 1058 var h = { |
| 1001 "content-type" : "application/json; charset=utf-8", | 1059 "content-type" : "application/json; charset=utf-8", |
| 1002 }; | 1060 }; |
| 1003 var resp = convert.JSON.encode(buildListServiceAccountsResponse()); | 1061 var resp = convert.JSON.encode(buildListServiceAccountsResponse()); |
| 1004 return new async.Future.value(stringResponse(200, h, resp)); | 1062 return new async.Future.value(stringResponse(200, h, resp)); |
| 1005 }), true); | 1063 }), true); |
| 1006 res.list(arg_name, pageSize: arg_pageSize, pageToken: arg_pageToken).then(
unittest.expectAsync(((api.ListServiceAccountsResponse response) { | 1064 res.list(arg_name, pageToken: arg_pageToken, pageSize: arg_pageSize).then(
unittest.expectAsync(((api.ListServiceAccountsResponse response) { |
| 1007 checkListServiceAccountsResponse(response); | 1065 checkListServiceAccountsResponse(response); |
| 1008 }))); | 1066 }))); |
| 1009 }); | 1067 }); |
| 1010 | 1068 |
| 1011 unittest.test("method--setIamPolicy", () { | 1069 unittest.test("method--setIamPolicy", () { |
| 1012 | 1070 |
| 1013 var mock = new HttpServerMock(); | 1071 var mock = new HttpServerMock(); |
| 1014 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; | 1072 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; |
| 1015 var arg_request = buildSetIamPolicyRequest(); | 1073 var arg_request = buildSetIamPolicyRequest(); |
| 1016 var arg_resource = "foo"; | 1074 var arg_resource = "foo"; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 "content-type" : "application/json; charset=utf-8", | 1157 "content-type" : "application/json; charset=utf-8", |
| 1100 }; | 1158 }; |
| 1101 var resp = convert.JSON.encode(buildSignBlobResponse()); | 1159 var resp = convert.JSON.encode(buildSignBlobResponse()); |
| 1102 return new async.Future.value(stringResponse(200, h, resp)); | 1160 return new async.Future.value(stringResponse(200, h, resp)); |
| 1103 }), true); | 1161 }), true); |
| 1104 res.signBlob(arg_request, arg_name).then(unittest.expectAsync(((api.SignBl
obResponse response) { | 1162 res.signBlob(arg_request, arg_name).then(unittest.expectAsync(((api.SignBl
obResponse response) { |
| 1105 checkSignBlobResponse(response); | 1163 checkSignBlobResponse(response); |
| 1106 }))); | 1164 }))); |
| 1107 }); | 1165 }); |
| 1108 | 1166 |
| 1167 unittest.test("method--signJwt", () { |
| 1168 |
| 1169 var mock = new HttpServerMock(); |
| 1170 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; |
| 1171 var arg_request = buildSignJwtRequest(); |
| 1172 var arg_name = "foo"; |
| 1173 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1174 var obj = new api.SignJwtRequest.fromJson(json); |
| 1175 checkSignJwtRequest(obj); |
| 1176 |
| 1177 var path = (req.url).path; |
| 1178 var pathOffset = 0; |
| 1179 var index; |
| 1180 var subPart; |
| 1181 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1182 pathOffset += 1; |
| 1183 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1184 pathOffset += 3; |
| 1185 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| 1186 |
| 1187 var query = (req.url).query; |
| 1188 var queryOffset = 0; |
| 1189 var queryMap = {}; |
| 1190 addQueryParam(n, v) => queryMap.putIfAbsent(n, () => []).add(v); |
| 1191 parseBool(n) { |
| 1192 if (n == "true") return true; |
| 1193 if (n == "false") return false; |
| 1194 if (n == null) return null; |
| 1195 throw new core.ArgumentError("Invalid boolean: $n"); |
| 1196 } |
| 1197 if (query.length > 0) { |
| 1198 for (var part in query.split("&")) { |
| 1199 var keyvalue = part.split("="); |
| 1200 addQueryParam(core.Uri.decodeQueryComponent(keyvalue[0]), core.Uri.d
ecodeQueryComponent(keyvalue[1])); |
| 1201 } |
| 1202 } |
| 1203 |
| 1204 |
| 1205 var h = { |
| 1206 "content-type" : "application/json; charset=utf-8", |
| 1207 }; |
| 1208 var resp = convert.JSON.encode(buildSignJwtResponse()); |
| 1209 return new async.Future.value(stringResponse(200, h, resp)); |
| 1210 }), true); |
| 1211 res.signJwt(arg_request, arg_name).then(unittest.expectAsync(((api.SignJwt
Response response) { |
| 1212 checkSignJwtResponse(response); |
| 1213 }))); |
| 1214 }); |
| 1215 |
| 1109 unittest.test("method--testIamPermissions", () { | 1216 unittest.test("method--testIamPermissions", () { |
| 1110 | 1217 |
| 1111 var mock = new HttpServerMock(); | 1218 var mock = new HttpServerMock(); |
| 1112 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; | 1219 api.ProjectsServiceAccountsResourceApi res = new api.IamApi(mock).projects
.serviceAccounts; |
| 1113 var arg_request = buildTestIamPermissionsRequest(); | 1220 var arg_request = buildTestIamPermissionsRequest(); |
| 1114 var arg_resource = "foo"; | 1221 var arg_resource = "foo"; |
| 1115 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1222 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1116 var obj = new api.TestIamPermissionsRequest.fromJson(json); | 1223 var obj = new api.TestIamPermissionsRequest.fromJson(json); |
| 1117 checkTestIamPermissionsRequest(obj); | 1224 checkTestIamPermissionsRequest(obj); |
| 1118 | 1225 |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1347 res.get(arg_name, publicKeyType: arg_publicKeyType).then(unittest.expectAs
ync(((api.ServiceAccountKey response) { | 1454 res.get(arg_name, publicKeyType: arg_publicKeyType).then(unittest.expectAs
ync(((api.ServiceAccountKey response) { |
| 1348 checkServiceAccountKey(response); | 1455 checkServiceAccountKey(response); |
| 1349 }))); | 1456 }))); |
| 1350 }); | 1457 }); |
| 1351 | 1458 |
| 1352 unittest.test("method--list", () { | 1459 unittest.test("method--list", () { |
| 1353 | 1460 |
| 1354 var mock = new HttpServerMock(); | 1461 var mock = new HttpServerMock(); |
| 1355 api.ProjectsServiceAccountsKeysResourceApi res = new api.IamApi(mock).proj
ects.serviceAccounts.keys; | 1462 api.ProjectsServiceAccountsKeysResourceApi res = new api.IamApi(mock).proj
ects.serviceAccounts.keys; |
| 1356 var arg_name = "foo"; | 1463 var arg_name = "foo"; |
| 1357 var arg_keyTypes = buildUnnamed1088(); | 1464 var arg_keyTypes = buildUnnamed1097(); |
| 1358 mock.register(unittest.expectAsync((http.BaseRequest req, json) { | 1465 mock.register(unittest.expectAsync((http.BaseRequest req, json) { |
| 1359 var path = (req.url).path; | 1466 var path = (req.url).path; |
| 1360 var pathOffset = 0; | 1467 var pathOffset = 0; |
| 1361 var index; | 1468 var index; |
| 1362 var subPart; | 1469 var subPart; |
| 1363 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); | 1470 unittest.expect(path.substring(pathOffset, pathOffset + 1), unittest.equ
als("/")); |
| 1364 pathOffset += 1; | 1471 pathOffset += 1; |
| 1365 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); | 1472 unittest.expect(path.substring(pathOffset, pathOffset + 3), unittest.equ
als("v1/")); |
| 1366 pathOffset += 3; | 1473 pathOffset += 3; |
| 1367 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; | 1474 // NOTE: We cannot test reserved expansions due to the inability to reve
rse the operation; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1445 res.queryGrantableRoles(arg_request).then(unittest.expectAsync(((api.Query
GrantableRolesResponse response) { | 1552 res.queryGrantableRoles(arg_request).then(unittest.expectAsync(((api.Query
GrantableRolesResponse response) { |
| 1446 checkQueryGrantableRolesResponse(response); | 1553 checkQueryGrantableRolesResponse(response); |
| 1447 }))); | 1554 }))); |
| 1448 }); | 1555 }); |
| 1449 | 1556 |
| 1450 }); | 1557 }); |
| 1451 | 1558 |
| 1452 | 1559 |
| 1453 } | 1560 } |
| 1454 | 1561 |
| OLD | NEW |