@aws-sdk/client-fms 3.52.0 → 3.54.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +6 -6
  3. package/dist-cjs/index.js +3 -0
  4. package/dist-cjs/models/FMSServiceException.js +11 -0
  5. package/dist-cjs/models/models_0.js +124 -3
  6. package/dist-cjs/protocols/Aws_json1_1.js +367 -888
  7. package/dist-es/index.js +1 -0
  8. package/dist-es/models/FMSServiceException.js +12 -0
  9. package/dist-es/models/models_0.js +106 -1
  10. package/dist-es/protocols/Aws_json1_1.js +667 -983
  11. package/dist-types/FMS.d.ts +59 -56
  12. package/dist-types/FMSClient.d.ts +8 -8
  13. package/dist-types/commands/AssociateAdminAccountCommand.d.ts +5 -4
  14. package/dist-types/commands/DeleteNotificationChannelCommand.d.ts +2 -2
  15. package/dist-types/commands/DisassociateAdminAccountCommand.d.ts +3 -3
  16. package/dist-types/commands/GetAdminAccountCommand.d.ts +2 -2
  17. package/dist-types/commands/GetComplianceDetailCommand.d.ts +13 -13
  18. package/dist-types/commands/GetNotificationChannelCommand.d.ts +2 -2
  19. package/dist-types/commands/GetProtectionStatusCommand.d.ts +2 -1
  20. package/dist-types/commands/GetViolationDetailsCommand.d.ts +2 -1
  21. package/dist-types/commands/ListComplianceStatusCommand.d.ts +2 -2
  22. package/dist-types/commands/ListMemberAccountsCommand.d.ts +2 -2
  23. package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
  24. package/dist-types/commands/PutNotificationChannelCommand.d.ts +6 -5
  25. package/dist-types/commands/PutPolicyCommand.d.ts +11 -12
  26. package/dist-types/index.d.ts +1 -0
  27. package/dist-types/models/FMSServiceException.d.ts +10 -0
  28. package/dist-types/models/models_0.d.ts +771 -334
  29. package/dist-types/runtimeConfig.browser.d.ts +1 -1
  30. package/dist-types/runtimeConfig.d.ts +1 -1
  31. package/dist-types/runtimeConfig.native.d.ts +1 -1
  32. package/dist-types/ts3.4/FMSClient.d.ts +2 -2
  33. package/dist-types/ts3.4/index.d.ts +1 -0
  34. package/dist-types/ts3.4/models/FMSServiceException.d.ts +6 -0
  35. package/dist-types/ts3.4/models/models_0.d.ts +126 -19
  36. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +1 -1
  37. package/dist-types/ts3.4/runtimeConfig.d.ts +1 -1
  38. package/dist-types/ts3.4/runtimeConfig.native.d.ts +1 -1
  39. package/package.json +27 -27
@@ -4,6 +4,8 @@ exports.deserializeAws_json1_1PutProtocolsListCommand = exports.deserializeAws_j
4
4
  exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = void 0;
5
5
  const protocol_http_1 = require("@aws-sdk/protocol-http");
6
6
  const smithy_client_1 = require("@aws-sdk/smithy-client");
7
+ const FMSServiceException_1 = require("../models/FMSServiceException");
8
+ const models_0_1 = require("../models/models_0");
7
9
  const serializeAws_json1_1AssociateAdminAccountCommand = async (input, context) => {
8
10
  const headers = {
9
11
  "content-type": "application/x-amz-json-1.1",
@@ -286,59 +288,28 @@ const deserializeAws_json1_1AssociateAdminAccountCommandError = async (output, c
286
288
  switch (errorCode) {
287
289
  case "InternalErrorException":
288
290
  case "com.amazonaws.fms#InternalErrorException":
289
- response = {
290
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
291
- name: errorCode,
292
- $metadata: deserializeMetadata(output),
293
- };
294
- break;
291
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
295
292
  case "InvalidInputException":
296
293
  case "com.amazonaws.fms#InvalidInputException":
297
- response = {
298
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
299
- name: errorCode,
300
- $metadata: deserializeMetadata(output),
301
- };
302
- break;
294
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
303
295
  case "InvalidOperationException":
304
296
  case "com.amazonaws.fms#InvalidOperationException":
305
- response = {
306
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
307
- name: errorCode,
308
- $metadata: deserializeMetadata(output),
309
- };
310
- break;
297
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
311
298
  case "LimitExceededException":
312
299
  case "com.amazonaws.fms#LimitExceededException":
313
- response = {
314
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
315
- name: errorCode,
316
- $metadata: deserializeMetadata(output),
317
- };
318
- break;
300
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
319
301
  case "ResourceNotFoundException":
320
302
  case "com.amazonaws.fms#ResourceNotFoundException":
321
- response = {
322
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
323
- name: errorCode,
324
- $metadata: deserializeMetadata(output),
325
- };
326
- break;
303
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
327
304
  default:
328
305
  const parsedBody = parsedOutput.body;
329
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
330
- response = {
331
- ...parsedBody,
332
- name: `${errorCode}`,
333
- message: parsedBody.message || parsedBody.Message || errorCode,
306
+ response = new FMSServiceException_1.FMSServiceException({
307
+ name: parsedBody.code || parsedBody.Code || errorCode,
334
308
  $fault: "client",
335
309
  $metadata: deserializeMetadata(output),
336
- };
310
+ });
311
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
337
312
  }
338
- const message = response.message || response.Message || errorCode;
339
- response.message = message;
340
- delete response.Message;
341
- return Promise.reject(Object.assign(new Error(message), response));
342
313
  };
343
314
  const deserializeAws_json1_1DeleteAppsListCommand = async (output, context) => {
344
315
  if (output.statusCode >= 300) {
@@ -362,43 +333,22 @@ const deserializeAws_json1_1DeleteAppsListCommandError = async (output, context)
362
333
  switch (errorCode) {
363
334
  case "InternalErrorException":
364
335
  case "com.amazonaws.fms#InternalErrorException":
365
- response = {
366
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
367
- name: errorCode,
368
- $metadata: deserializeMetadata(output),
369
- };
370
- break;
336
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
371
337
  case "InvalidOperationException":
372
338
  case "com.amazonaws.fms#InvalidOperationException":
373
- response = {
374
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
375
- name: errorCode,
376
- $metadata: deserializeMetadata(output),
377
- };
378
- break;
339
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
379
340
  case "ResourceNotFoundException":
380
341
  case "com.amazonaws.fms#ResourceNotFoundException":
381
- response = {
382
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
383
- name: errorCode,
384
- $metadata: deserializeMetadata(output),
385
- };
386
- break;
342
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
387
343
  default:
388
344
  const parsedBody = parsedOutput.body;
389
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
390
- response = {
391
- ...parsedBody,
392
- name: `${errorCode}`,
393
- message: parsedBody.message || parsedBody.Message || errorCode,
345
+ response = new FMSServiceException_1.FMSServiceException({
346
+ name: parsedBody.code || parsedBody.Code || errorCode,
394
347
  $fault: "client",
395
348
  $metadata: deserializeMetadata(output),
396
- };
349
+ });
350
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
397
351
  }
398
- const message = response.message || response.Message || errorCode;
399
- response.message = message;
400
- delete response.Message;
401
- return Promise.reject(Object.assign(new Error(message), response));
402
352
  };
403
353
  const deserializeAws_json1_1DeleteNotificationChannelCommand = async (output, context) => {
404
354
  if (output.statusCode >= 300) {
@@ -422,43 +372,22 @@ const deserializeAws_json1_1DeleteNotificationChannelCommandError = async (outpu
422
372
  switch (errorCode) {
423
373
  case "InternalErrorException":
424
374
  case "com.amazonaws.fms#InternalErrorException":
425
- response = {
426
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
427
- name: errorCode,
428
- $metadata: deserializeMetadata(output),
429
- };
430
- break;
375
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
431
376
  case "InvalidOperationException":
432
377
  case "com.amazonaws.fms#InvalidOperationException":
433
- response = {
434
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
435
- name: errorCode,
436
- $metadata: deserializeMetadata(output),
437
- };
438
- break;
378
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
439
379
  case "ResourceNotFoundException":
440
380
  case "com.amazonaws.fms#ResourceNotFoundException":
441
- response = {
442
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
443
- name: errorCode,
444
- $metadata: deserializeMetadata(output),
445
- };
446
- break;
381
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
447
382
  default:
448
383
  const parsedBody = parsedOutput.body;
449
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
450
- response = {
451
- ...parsedBody,
452
- name: `${errorCode}`,
453
- message: parsedBody.message || parsedBody.Message || errorCode,
384
+ response = new FMSServiceException_1.FMSServiceException({
385
+ name: parsedBody.code || parsedBody.Code || errorCode,
454
386
  $fault: "client",
455
387
  $metadata: deserializeMetadata(output),
456
- };
388
+ });
389
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
457
390
  }
458
- const message = response.message || response.Message || errorCode;
459
- response.message = message;
460
- delete response.Message;
461
- return Promise.reject(Object.assign(new Error(message), response));
462
391
  };
463
392
  const deserializeAws_json1_1DeletePolicyCommand = async (output, context) => {
464
393
  if (output.statusCode >= 300) {
@@ -482,59 +411,28 @@ const deserializeAws_json1_1DeletePolicyCommandError = async (output, context) =
482
411
  switch (errorCode) {
483
412
  case "InternalErrorException":
484
413
  case "com.amazonaws.fms#InternalErrorException":
485
- response = {
486
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
487
- name: errorCode,
488
- $metadata: deserializeMetadata(output),
489
- };
490
- break;
414
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
491
415
  case "InvalidInputException":
492
416
  case "com.amazonaws.fms#InvalidInputException":
493
- response = {
494
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
495
- name: errorCode,
496
- $metadata: deserializeMetadata(output),
497
- };
498
- break;
417
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
499
418
  case "InvalidOperationException":
500
419
  case "com.amazonaws.fms#InvalidOperationException":
501
- response = {
502
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
503
- name: errorCode,
504
- $metadata: deserializeMetadata(output),
505
- };
506
- break;
420
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
507
421
  case "LimitExceededException":
508
422
  case "com.amazonaws.fms#LimitExceededException":
509
- response = {
510
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
511
- name: errorCode,
512
- $metadata: deserializeMetadata(output),
513
- };
514
- break;
423
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
515
424
  case "ResourceNotFoundException":
516
425
  case "com.amazonaws.fms#ResourceNotFoundException":
517
- response = {
518
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
519
- name: errorCode,
520
- $metadata: deserializeMetadata(output),
521
- };
522
- break;
426
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
523
427
  default:
524
428
  const parsedBody = parsedOutput.body;
525
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
526
- response = {
527
- ...parsedBody,
528
- name: `${errorCode}`,
529
- message: parsedBody.message || parsedBody.Message || errorCode,
429
+ response = new FMSServiceException_1.FMSServiceException({
430
+ name: parsedBody.code || parsedBody.Code || errorCode,
530
431
  $fault: "client",
531
432
  $metadata: deserializeMetadata(output),
532
- };
433
+ });
434
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
533
435
  }
534
- const message = response.message || response.Message || errorCode;
535
- response.message = message;
536
- delete response.Message;
537
- return Promise.reject(Object.assign(new Error(message), response));
538
436
  };
539
437
  const deserializeAws_json1_1DeleteProtocolsListCommand = async (output, context) => {
540
438
  if (output.statusCode >= 300) {
@@ -558,43 +456,22 @@ const deserializeAws_json1_1DeleteProtocolsListCommandError = async (output, con
558
456
  switch (errorCode) {
559
457
  case "InternalErrorException":
560
458
  case "com.amazonaws.fms#InternalErrorException":
561
- response = {
562
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
563
- name: errorCode,
564
- $metadata: deserializeMetadata(output),
565
- };
566
- break;
459
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
567
460
  case "InvalidOperationException":
568
461
  case "com.amazonaws.fms#InvalidOperationException":
569
- response = {
570
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
571
- name: errorCode,
572
- $metadata: deserializeMetadata(output),
573
- };
574
- break;
462
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
575
463
  case "ResourceNotFoundException":
576
464
  case "com.amazonaws.fms#ResourceNotFoundException":
577
- response = {
578
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
579
- name: errorCode,
580
- $metadata: deserializeMetadata(output),
581
- };
582
- break;
465
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
583
466
  default:
584
467
  const parsedBody = parsedOutput.body;
585
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
586
- response = {
587
- ...parsedBody,
588
- name: `${errorCode}`,
589
- message: parsedBody.message || parsedBody.Message || errorCode,
468
+ response = new FMSServiceException_1.FMSServiceException({
469
+ name: parsedBody.code || parsedBody.Code || errorCode,
590
470
  $fault: "client",
591
471
  $metadata: deserializeMetadata(output),
592
- };
472
+ });
473
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
593
474
  }
594
- const message = response.message || response.Message || errorCode;
595
- response.message = message;
596
- delete response.Message;
597
- return Promise.reject(Object.assign(new Error(message), response));
598
475
  };
599
476
  const deserializeAws_json1_1DisassociateAdminAccountCommand = async (output, context) => {
600
477
  if (output.statusCode >= 300) {
@@ -618,43 +495,22 @@ const deserializeAws_json1_1DisassociateAdminAccountCommandError = async (output
618
495
  switch (errorCode) {
619
496
  case "InternalErrorException":
620
497
  case "com.amazonaws.fms#InternalErrorException":
621
- response = {
622
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
623
- name: errorCode,
624
- $metadata: deserializeMetadata(output),
625
- };
626
- break;
498
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
627
499
  case "InvalidOperationException":
628
500
  case "com.amazonaws.fms#InvalidOperationException":
629
- response = {
630
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
631
- name: errorCode,
632
- $metadata: deserializeMetadata(output),
633
- };
634
- break;
501
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
635
502
  case "ResourceNotFoundException":
636
503
  case "com.amazonaws.fms#ResourceNotFoundException":
637
- response = {
638
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
639
- name: errorCode,
640
- $metadata: deserializeMetadata(output),
641
- };
642
- break;
504
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
643
505
  default:
644
506
  const parsedBody = parsedOutput.body;
645
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
646
- response = {
647
- ...parsedBody,
648
- name: `${errorCode}`,
649
- message: parsedBody.message || parsedBody.Message || errorCode,
507
+ response = new FMSServiceException_1.FMSServiceException({
508
+ name: parsedBody.code || parsedBody.Code || errorCode,
650
509
  $fault: "client",
651
510
  $metadata: deserializeMetadata(output),
652
- };
511
+ });
512
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
653
513
  }
654
- const message = response.message || response.Message || errorCode;
655
- response.message = message;
656
- delete response.Message;
657
- return Promise.reject(Object.assign(new Error(message), response));
658
514
  };
659
515
  const deserializeAws_json1_1GetAdminAccountCommand = async (output, context) => {
660
516
  if (output.statusCode >= 300) {
@@ -681,43 +537,22 @@ const deserializeAws_json1_1GetAdminAccountCommandError = async (output, context
681
537
  switch (errorCode) {
682
538
  case "InternalErrorException":
683
539
  case "com.amazonaws.fms#InternalErrorException":
684
- response = {
685
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
686
- name: errorCode,
687
- $metadata: deserializeMetadata(output),
688
- };
689
- break;
540
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
690
541
  case "InvalidOperationException":
691
542
  case "com.amazonaws.fms#InvalidOperationException":
692
- response = {
693
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
694
- name: errorCode,
695
- $metadata: deserializeMetadata(output),
696
- };
697
- break;
543
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
698
544
  case "ResourceNotFoundException":
699
545
  case "com.amazonaws.fms#ResourceNotFoundException":
700
- response = {
701
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
702
- name: errorCode,
703
- $metadata: deserializeMetadata(output),
704
- };
705
- break;
546
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
706
547
  default:
707
548
  const parsedBody = parsedOutput.body;
708
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
709
- response = {
710
- ...parsedBody,
711
- name: `${errorCode}`,
712
- message: parsedBody.message || parsedBody.Message || errorCode,
549
+ response = new FMSServiceException_1.FMSServiceException({
550
+ name: parsedBody.code || parsedBody.Code || errorCode,
713
551
  $fault: "client",
714
552
  $metadata: deserializeMetadata(output),
715
- };
553
+ });
554
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
716
555
  }
717
- const message = response.message || response.Message || errorCode;
718
- response.message = message;
719
- delete response.Message;
720
- return Promise.reject(Object.assign(new Error(message), response));
721
556
  };
722
557
  const deserializeAws_json1_1GetAppsListCommand = async (output, context) => {
723
558
  if (output.statusCode >= 300) {
@@ -744,43 +579,22 @@ const deserializeAws_json1_1GetAppsListCommandError = async (output, context) =>
744
579
  switch (errorCode) {
745
580
  case "InternalErrorException":
746
581
  case "com.amazonaws.fms#InternalErrorException":
747
- response = {
748
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
749
- name: errorCode,
750
- $metadata: deserializeMetadata(output),
751
- };
752
- break;
582
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
753
583
  case "InvalidOperationException":
754
584
  case "com.amazonaws.fms#InvalidOperationException":
755
- response = {
756
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
757
- name: errorCode,
758
- $metadata: deserializeMetadata(output),
759
- };
760
- break;
585
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
761
586
  case "ResourceNotFoundException":
762
587
  case "com.amazonaws.fms#ResourceNotFoundException":
763
- response = {
764
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
765
- name: errorCode,
766
- $metadata: deserializeMetadata(output),
767
- };
768
- break;
588
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
769
589
  default:
770
590
  const parsedBody = parsedOutput.body;
771
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
772
- response = {
773
- ...parsedBody,
774
- name: `${errorCode}`,
775
- message: parsedBody.message || parsedBody.Message || errorCode,
591
+ response = new FMSServiceException_1.FMSServiceException({
592
+ name: parsedBody.code || parsedBody.Code || errorCode,
776
593
  $fault: "client",
777
594
  $metadata: deserializeMetadata(output),
778
- };
595
+ });
596
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
779
597
  }
780
- const message = response.message || response.Message || errorCode;
781
- response.message = message;
782
- delete response.Message;
783
- return Promise.reject(Object.assign(new Error(message), response));
784
598
  };
785
599
  const deserializeAws_json1_1GetComplianceDetailCommand = async (output, context) => {
786
600
  if (output.statusCode >= 300) {
@@ -807,51 +621,25 @@ const deserializeAws_json1_1GetComplianceDetailCommandError = async (output, con
807
621
  switch (errorCode) {
808
622
  case "InternalErrorException":
809
623
  case "com.amazonaws.fms#InternalErrorException":
810
- response = {
811
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
812
- name: errorCode,
813
- $metadata: deserializeMetadata(output),
814
- };
815
- break;
624
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
816
625
  case "InvalidInputException":
817
626
  case "com.amazonaws.fms#InvalidInputException":
818
- response = {
819
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
820
- name: errorCode,
821
- $metadata: deserializeMetadata(output),
822
- };
823
- break;
627
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
824
628
  case "InvalidOperationException":
825
629
  case "com.amazonaws.fms#InvalidOperationException":
826
- response = {
827
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
828
- name: errorCode,
829
- $metadata: deserializeMetadata(output),
830
- };
831
- break;
630
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
832
631
  case "ResourceNotFoundException":
833
632
  case "com.amazonaws.fms#ResourceNotFoundException":
834
- response = {
835
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
836
- name: errorCode,
837
- $metadata: deserializeMetadata(output),
838
- };
839
- break;
633
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
840
634
  default:
841
635
  const parsedBody = parsedOutput.body;
842
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
843
- response = {
844
- ...parsedBody,
845
- name: `${errorCode}`,
846
- message: parsedBody.message || parsedBody.Message || errorCode,
636
+ response = new FMSServiceException_1.FMSServiceException({
637
+ name: parsedBody.code || parsedBody.Code || errorCode,
847
638
  $fault: "client",
848
639
  $metadata: deserializeMetadata(output),
849
- };
640
+ });
641
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
850
642
  }
851
- const message = response.message || response.Message || errorCode;
852
- response.message = message;
853
- delete response.Message;
854
- return Promise.reject(Object.assign(new Error(message), response));
855
643
  };
856
644
  const deserializeAws_json1_1GetNotificationChannelCommand = async (output, context) => {
857
645
  if (output.statusCode >= 300) {
@@ -878,43 +666,22 @@ const deserializeAws_json1_1GetNotificationChannelCommandError = async (output,
878
666
  switch (errorCode) {
879
667
  case "InternalErrorException":
880
668
  case "com.amazonaws.fms#InternalErrorException":
881
- response = {
882
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
883
- name: errorCode,
884
- $metadata: deserializeMetadata(output),
885
- };
886
- break;
669
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
887
670
  case "InvalidOperationException":
888
671
  case "com.amazonaws.fms#InvalidOperationException":
889
- response = {
890
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
891
- name: errorCode,
892
- $metadata: deserializeMetadata(output),
893
- };
894
- break;
672
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
895
673
  case "ResourceNotFoundException":
896
674
  case "com.amazonaws.fms#ResourceNotFoundException":
897
- response = {
898
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
899
- name: errorCode,
900
- $metadata: deserializeMetadata(output),
901
- };
902
- break;
675
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
903
676
  default:
904
677
  const parsedBody = parsedOutput.body;
905
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
906
- response = {
907
- ...parsedBody,
908
- name: `${errorCode}`,
909
- message: parsedBody.message || parsedBody.Message || errorCode,
678
+ response = new FMSServiceException_1.FMSServiceException({
679
+ name: parsedBody.code || parsedBody.Code || errorCode,
910
680
  $fault: "client",
911
681
  $metadata: deserializeMetadata(output),
912
- };
682
+ });
683
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
913
684
  }
914
- const message = response.message || response.Message || errorCode;
915
- response.message = message;
916
- delete response.Message;
917
- return Promise.reject(Object.assign(new Error(message), response));
918
685
  };
919
686
  const deserializeAws_json1_1GetPolicyCommand = async (output, context) => {
920
687
  if (output.statusCode >= 300) {
@@ -941,51 +708,25 @@ const deserializeAws_json1_1GetPolicyCommandError = async (output, context) => {
941
708
  switch (errorCode) {
942
709
  case "InternalErrorException":
943
710
  case "com.amazonaws.fms#InternalErrorException":
944
- response = {
945
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
946
- name: errorCode,
947
- $metadata: deserializeMetadata(output),
948
- };
949
- break;
711
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
950
712
  case "InvalidOperationException":
951
713
  case "com.amazonaws.fms#InvalidOperationException":
952
- response = {
953
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
954
- name: errorCode,
955
- $metadata: deserializeMetadata(output),
956
- };
957
- break;
714
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
958
715
  case "InvalidTypeException":
959
716
  case "com.amazonaws.fms#InvalidTypeException":
960
- response = {
961
- ...(await deserializeAws_json1_1InvalidTypeExceptionResponse(parsedOutput, context)),
962
- name: errorCode,
963
- $metadata: deserializeMetadata(output),
964
- };
965
- break;
717
+ throw await deserializeAws_json1_1InvalidTypeExceptionResponse(parsedOutput, context);
966
718
  case "ResourceNotFoundException":
967
719
  case "com.amazonaws.fms#ResourceNotFoundException":
968
- response = {
969
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
970
- name: errorCode,
971
- $metadata: deserializeMetadata(output),
972
- };
973
- break;
720
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
974
721
  default:
975
722
  const parsedBody = parsedOutput.body;
976
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
977
- response = {
978
- ...parsedBody,
979
- name: `${errorCode}`,
980
- message: parsedBody.message || parsedBody.Message || errorCode,
723
+ response = new FMSServiceException_1.FMSServiceException({
724
+ name: parsedBody.code || parsedBody.Code || errorCode,
981
725
  $fault: "client",
982
726
  $metadata: deserializeMetadata(output),
983
- };
727
+ });
728
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
984
729
  }
985
- const message = response.message || response.Message || errorCode;
986
- response.message = message;
987
- delete response.Message;
988
- return Promise.reject(Object.assign(new Error(message), response));
989
730
  };
990
731
  const deserializeAws_json1_1GetProtectionStatusCommand = async (output, context) => {
991
732
  if (output.statusCode >= 300) {
@@ -1012,43 +753,22 @@ const deserializeAws_json1_1GetProtectionStatusCommandError = async (output, con
1012
753
  switch (errorCode) {
1013
754
  case "InternalErrorException":
1014
755
  case "com.amazonaws.fms#InternalErrorException":
1015
- response = {
1016
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1017
- name: errorCode,
1018
- $metadata: deserializeMetadata(output),
1019
- };
1020
- break;
756
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1021
757
  case "InvalidInputException":
1022
758
  case "com.amazonaws.fms#InvalidInputException":
1023
- response = {
1024
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1025
- name: errorCode,
1026
- $metadata: deserializeMetadata(output),
1027
- };
1028
- break;
759
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1029
760
  case "ResourceNotFoundException":
1030
761
  case "com.amazonaws.fms#ResourceNotFoundException":
1031
- response = {
1032
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1033
- name: errorCode,
1034
- $metadata: deserializeMetadata(output),
1035
- };
1036
- break;
762
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1037
763
  default:
1038
764
  const parsedBody = parsedOutput.body;
1039
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1040
- response = {
1041
- ...parsedBody,
1042
- name: `${errorCode}`,
1043
- message: parsedBody.message || parsedBody.Message || errorCode,
765
+ response = new FMSServiceException_1.FMSServiceException({
766
+ name: parsedBody.code || parsedBody.Code || errorCode,
1044
767
  $fault: "client",
1045
768
  $metadata: deserializeMetadata(output),
1046
- };
769
+ });
770
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1047
771
  }
1048
- const message = response.message || response.Message || errorCode;
1049
- response.message = message;
1050
- delete response.Message;
1051
- return Promise.reject(Object.assign(new Error(message), response));
1052
772
  };
1053
773
  const deserializeAws_json1_1GetProtocolsListCommand = async (output, context) => {
1054
774
  if (output.statusCode >= 300) {
@@ -1075,43 +795,22 @@ const deserializeAws_json1_1GetProtocolsListCommandError = async (output, contex
1075
795
  switch (errorCode) {
1076
796
  case "InternalErrorException":
1077
797
  case "com.amazonaws.fms#InternalErrorException":
1078
- response = {
1079
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1080
- name: errorCode,
1081
- $metadata: deserializeMetadata(output),
1082
- };
1083
- break;
798
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1084
799
  case "InvalidOperationException":
1085
800
  case "com.amazonaws.fms#InvalidOperationException":
1086
- response = {
1087
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1088
- name: errorCode,
1089
- $metadata: deserializeMetadata(output),
1090
- };
1091
- break;
801
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1092
802
  case "ResourceNotFoundException":
1093
803
  case "com.amazonaws.fms#ResourceNotFoundException":
1094
- response = {
1095
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1096
- name: errorCode,
1097
- $metadata: deserializeMetadata(output),
1098
- };
1099
- break;
804
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1100
805
  default:
1101
806
  const parsedBody = parsedOutput.body;
1102
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1103
- response = {
1104
- ...parsedBody,
1105
- name: `${errorCode}`,
1106
- message: parsedBody.message || parsedBody.Message || errorCode,
807
+ response = new FMSServiceException_1.FMSServiceException({
808
+ name: parsedBody.code || parsedBody.Code || errorCode,
1107
809
  $fault: "client",
1108
810
  $metadata: deserializeMetadata(output),
1109
- };
811
+ });
812
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1110
813
  }
1111
- const message = response.message || response.Message || errorCode;
1112
- response.message = message;
1113
- delete response.Message;
1114
- return Promise.reject(Object.assign(new Error(message), response));
1115
814
  };
1116
815
  const deserializeAws_json1_1GetViolationDetailsCommand = async (output, context) => {
1117
816
  if (output.statusCode >= 300) {
@@ -1138,43 +837,22 @@ const deserializeAws_json1_1GetViolationDetailsCommandError = async (output, con
1138
837
  switch (errorCode) {
1139
838
  case "InternalErrorException":
1140
839
  case "com.amazonaws.fms#InternalErrorException":
1141
- response = {
1142
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1143
- name: errorCode,
1144
- $metadata: deserializeMetadata(output),
1145
- };
1146
- break;
840
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1147
841
  case "InvalidInputException":
1148
842
  case "com.amazonaws.fms#InvalidInputException":
1149
- response = {
1150
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1151
- name: errorCode,
1152
- $metadata: deserializeMetadata(output),
1153
- };
1154
- break;
843
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1155
844
  case "ResourceNotFoundException":
1156
845
  case "com.amazonaws.fms#ResourceNotFoundException":
1157
- response = {
1158
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1159
- name: errorCode,
1160
- $metadata: deserializeMetadata(output),
1161
- };
1162
- break;
846
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1163
847
  default:
1164
848
  const parsedBody = parsedOutput.body;
1165
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1166
- response = {
1167
- ...parsedBody,
1168
- name: `${errorCode}`,
1169
- message: parsedBody.message || parsedBody.Message || errorCode,
849
+ response = new FMSServiceException_1.FMSServiceException({
850
+ name: parsedBody.code || parsedBody.Code || errorCode,
1170
851
  $fault: "client",
1171
852
  $metadata: deserializeMetadata(output),
1172
- };
853
+ });
854
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1173
855
  }
1174
- const message = response.message || response.Message || errorCode;
1175
- response.message = message;
1176
- delete response.Message;
1177
- return Promise.reject(Object.assign(new Error(message), response));
1178
856
  };
1179
857
  const deserializeAws_json1_1ListAppsListsCommand = async (output, context) => {
1180
858
  if (output.statusCode >= 300) {
@@ -1201,51 +879,25 @@ const deserializeAws_json1_1ListAppsListsCommandError = async (output, context)
1201
879
  switch (errorCode) {
1202
880
  case "InternalErrorException":
1203
881
  case "com.amazonaws.fms#InternalErrorException":
1204
- response = {
1205
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1206
- name: errorCode,
1207
- $metadata: deserializeMetadata(output),
1208
- };
1209
- break;
882
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1210
883
  case "InvalidOperationException":
1211
884
  case "com.amazonaws.fms#InvalidOperationException":
1212
- response = {
1213
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1214
- name: errorCode,
1215
- $metadata: deserializeMetadata(output),
1216
- };
1217
- break;
885
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1218
886
  case "LimitExceededException":
1219
887
  case "com.amazonaws.fms#LimitExceededException":
1220
- response = {
1221
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1222
- name: errorCode,
1223
- $metadata: deserializeMetadata(output),
1224
- };
1225
- break;
888
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1226
889
  case "ResourceNotFoundException":
1227
890
  case "com.amazonaws.fms#ResourceNotFoundException":
1228
- response = {
1229
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1230
- name: errorCode,
1231
- $metadata: deserializeMetadata(output),
1232
- };
1233
- break;
891
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1234
892
  default:
1235
893
  const parsedBody = parsedOutput.body;
1236
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1237
- response = {
1238
- ...parsedBody,
1239
- name: `${errorCode}`,
1240
- message: parsedBody.message || parsedBody.Message || errorCode,
894
+ response = new FMSServiceException_1.FMSServiceException({
895
+ name: parsedBody.code || parsedBody.Code || errorCode,
1241
896
  $fault: "client",
1242
897
  $metadata: deserializeMetadata(output),
1243
- };
898
+ });
899
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1244
900
  }
1245
- const message = response.message || response.Message || errorCode;
1246
- response.message = message;
1247
- delete response.Message;
1248
- return Promise.reject(Object.assign(new Error(message), response));
1249
901
  };
1250
902
  const deserializeAws_json1_1ListComplianceStatusCommand = async (output, context) => {
1251
903
  if (output.statusCode >= 300) {
@@ -1272,35 +924,19 @@ const deserializeAws_json1_1ListComplianceStatusCommandError = async (output, co
1272
924
  switch (errorCode) {
1273
925
  case "InternalErrorException":
1274
926
  case "com.amazonaws.fms#InternalErrorException":
1275
- response = {
1276
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1277
- name: errorCode,
1278
- $metadata: deserializeMetadata(output),
1279
- };
1280
- break;
927
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1281
928
  case "ResourceNotFoundException":
1282
929
  case "com.amazonaws.fms#ResourceNotFoundException":
1283
- response = {
1284
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1285
- name: errorCode,
1286
- $metadata: deserializeMetadata(output),
1287
- };
1288
- break;
930
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1289
931
  default:
1290
932
  const parsedBody = parsedOutput.body;
1291
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1292
- response = {
1293
- ...parsedBody,
1294
- name: `${errorCode}`,
1295
- message: parsedBody.message || parsedBody.Message || errorCode,
933
+ response = new FMSServiceException_1.FMSServiceException({
934
+ name: parsedBody.code || parsedBody.Code || errorCode,
1296
935
  $fault: "client",
1297
936
  $metadata: deserializeMetadata(output),
1298
- };
937
+ });
938
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1299
939
  }
1300
- const message = response.message || response.Message || errorCode;
1301
- response.message = message;
1302
- delete response.Message;
1303
- return Promise.reject(Object.assign(new Error(message), response));
1304
940
  };
1305
941
  const deserializeAws_json1_1ListMemberAccountsCommand = async (output, context) => {
1306
942
  if (output.statusCode >= 300) {
@@ -1327,35 +963,19 @@ const deserializeAws_json1_1ListMemberAccountsCommandError = async (output, cont
1327
963
  switch (errorCode) {
1328
964
  case "InternalErrorException":
1329
965
  case "com.amazonaws.fms#InternalErrorException":
1330
- response = {
1331
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1332
- name: errorCode,
1333
- $metadata: deserializeMetadata(output),
1334
- };
1335
- break;
966
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1336
967
  case "ResourceNotFoundException":
1337
968
  case "com.amazonaws.fms#ResourceNotFoundException":
1338
- response = {
1339
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1340
- name: errorCode,
1341
- $metadata: deserializeMetadata(output),
1342
- };
1343
- break;
969
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1344
970
  default:
1345
971
  const parsedBody = parsedOutput.body;
1346
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1347
- response = {
1348
- ...parsedBody,
1349
- name: `${errorCode}`,
1350
- message: parsedBody.message || parsedBody.Message || errorCode,
972
+ response = new FMSServiceException_1.FMSServiceException({
973
+ name: parsedBody.code || parsedBody.Code || errorCode,
1351
974
  $fault: "client",
1352
975
  $metadata: deserializeMetadata(output),
1353
- };
976
+ });
977
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1354
978
  }
1355
- const message = response.message || response.Message || errorCode;
1356
- response.message = message;
1357
- delete response.Message;
1358
- return Promise.reject(Object.assign(new Error(message), response));
1359
979
  };
1360
980
  const deserializeAws_json1_1ListPoliciesCommand = async (output, context) => {
1361
981
  if (output.statusCode >= 300) {
@@ -1382,51 +1002,25 @@ const deserializeAws_json1_1ListPoliciesCommandError = async (output, context) =
1382
1002
  switch (errorCode) {
1383
1003
  case "InternalErrorException":
1384
1004
  case "com.amazonaws.fms#InternalErrorException":
1385
- response = {
1386
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1387
- name: errorCode,
1388
- $metadata: deserializeMetadata(output),
1389
- };
1390
- break;
1005
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1391
1006
  case "InvalidOperationException":
1392
1007
  case "com.amazonaws.fms#InvalidOperationException":
1393
- response = {
1394
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1395
- name: errorCode,
1396
- $metadata: deserializeMetadata(output),
1397
- };
1398
- break;
1008
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1399
1009
  case "LimitExceededException":
1400
1010
  case "com.amazonaws.fms#LimitExceededException":
1401
- response = {
1402
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1403
- name: errorCode,
1404
- $metadata: deserializeMetadata(output),
1405
- };
1406
- break;
1011
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1407
1012
  case "ResourceNotFoundException":
1408
1013
  case "com.amazonaws.fms#ResourceNotFoundException":
1409
- response = {
1410
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1411
- name: errorCode,
1412
- $metadata: deserializeMetadata(output),
1413
- };
1414
- break;
1014
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1415
1015
  default:
1416
1016
  const parsedBody = parsedOutput.body;
1417
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1418
- response = {
1419
- ...parsedBody,
1420
- name: `${errorCode}`,
1421
- message: parsedBody.message || parsedBody.Message || errorCode,
1017
+ response = new FMSServiceException_1.FMSServiceException({
1018
+ name: parsedBody.code || parsedBody.Code || errorCode,
1422
1019
  $fault: "client",
1423
1020
  $metadata: deserializeMetadata(output),
1424
- };
1021
+ });
1022
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1425
1023
  }
1426
- const message = response.message || response.Message || errorCode;
1427
- response.message = message;
1428
- delete response.Message;
1429
- return Promise.reject(Object.assign(new Error(message), response));
1430
1024
  };
1431
1025
  const deserializeAws_json1_1ListProtocolsListsCommand = async (output, context) => {
1432
1026
  if (output.statusCode >= 300) {
@@ -1453,43 +1047,22 @@ const deserializeAws_json1_1ListProtocolsListsCommandError = async (output, cont
1453
1047
  switch (errorCode) {
1454
1048
  case "InternalErrorException":
1455
1049
  case "com.amazonaws.fms#InternalErrorException":
1456
- response = {
1457
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1458
- name: errorCode,
1459
- $metadata: deserializeMetadata(output),
1460
- };
1461
- break;
1050
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1462
1051
  case "InvalidOperationException":
1463
1052
  case "com.amazonaws.fms#InvalidOperationException":
1464
- response = {
1465
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1466
- name: errorCode,
1467
- $metadata: deserializeMetadata(output),
1468
- };
1469
- break;
1053
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1470
1054
  case "ResourceNotFoundException":
1471
1055
  case "com.amazonaws.fms#ResourceNotFoundException":
1472
- response = {
1473
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1474
- name: errorCode,
1475
- $metadata: deserializeMetadata(output),
1476
- };
1477
- break;
1056
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1478
1057
  default:
1479
1058
  const parsedBody = parsedOutput.body;
1480
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1481
- response = {
1482
- ...parsedBody,
1483
- name: `${errorCode}`,
1484
- message: parsedBody.message || parsedBody.Message || errorCode,
1059
+ response = new FMSServiceException_1.FMSServiceException({
1060
+ name: parsedBody.code || parsedBody.Code || errorCode,
1485
1061
  $fault: "client",
1486
1062
  $metadata: deserializeMetadata(output),
1487
- };
1063
+ });
1064
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1488
1065
  }
1489
- const message = response.message || response.Message || errorCode;
1490
- response.message = message;
1491
- delete response.Message;
1492
- return Promise.reject(Object.assign(new Error(message), response));
1493
1066
  };
1494
1067
  const deserializeAws_json1_1ListTagsForResourceCommand = async (output, context) => {
1495
1068
  if (output.statusCode >= 300) {
@@ -1516,51 +1089,25 @@ const deserializeAws_json1_1ListTagsForResourceCommandError = async (output, con
1516
1089
  switch (errorCode) {
1517
1090
  case "InternalErrorException":
1518
1091
  case "com.amazonaws.fms#InternalErrorException":
1519
- response = {
1520
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1521
- name: errorCode,
1522
- $metadata: deserializeMetadata(output),
1523
- };
1524
- break;
1092
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1525
1093
  case "InvalidInputException":
1526
1094
  case "com.amazonaws.fms#InvalidInputException":
1527
- response = {
1528
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1529
- name: errorCode,
1530
- $metadata: deserializeMetadata(output),
1531
- };
1532
- break;
1095
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1533
1096
  case "InvalidOperationException":
1534
1097
  case "com.amazonaws.fms#InvalidOperationException":
1535
- response = {
1536
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1537
- name: errorCode,
1538
- $metadata: deserializeMetadata(output),
1539
- };
1540
- break;
1098
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1541
1099
  case "ResourceNotFoundException":
1542
1100
  case "com.amazonaws.fms#ResourceNotFoundException":
1543
- response = {
1544
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1545
- name: errorCode,
1546
- $metadata: deserializeMetadata(output),
1547
- };
1548
- break;
1101
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1549
1102
  default:
1550
1103
  const parsedBody = parsedOutput.body;
1551
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1552
- response = {
1553
- ...parsedBody,
1554
- name: `${errorCode}`,
1555
- message: parsedBody.message || parsedBody.Message || errorCode,
1104
+ response = new FMSServiceException_1.FMSServiceException({
1105
+ name: parsedBody.code || parsedBody.Code || errorCode,
1556
1106
  $fault: "client",
1557
1107
  $metadata: deserializeMetadata(output),
1558
- };
1108
+ });
1109
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1559
1110
  }
1560
- const message = response.message || response.Message || errorCode;
1561
- response.message = message;
1562
- delete response.Message;
1563
- return Promise.reject(Object.assign(new Error(message), response));
1564
1111
  };
1565
1112
  const deserializeAws_json1_1PutAppsListCommand = async (output, context) => {
1566
1113
  if (output.statusCode >= 300) {
@@ -1587,59 +1134,28 @@ const deserializeAws_json1_1PutAppsListCommandError = async (output, context) =>
1587
1134
  switch (errorCode) {
1588
1135
  case "InternalErrorException":
1589
1136
  case "com.amazonaws.fms#InternalErrorException":
1590
- response = {
1591
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1592
- name: errorCode,
1593
- $metadata: deserializeMetadata(output),
1594
- };
1595
- break;
1137
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1596
1138
  case "InvalidInputException":
1597
1139
  case "com.amazonaws.fms#InvalidInputException":
1598
- response = {
1599
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1600
- name: errorCode,
1601
- $metadata: deserializeMetadata(output),
1602
- };
1603
- break;
1140
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1604
1141
  case "InvalidOperationException":
1605
1142
  case "com.amazonaws.fms#InvalidOperationException":
1606
- response = {
1607
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1608
- name: errorCode,
1609
- $metadata: deserializeMetadata(output),
1610
- };
1611
- break;
1143
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1612
1144
  case "LimitExceededException":
1613
1145
  case "com.amazonaws.fms#LimitExceededException":
1614
- response = {
1615
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1616
- name: errorCode,
1617
- $metadata: deserializeMetadata(output),
1618
- };
1619
- break;
1146
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1620
1147
  case "ResourceNotFoundException":
1621
1148
  case "com.amazonaws.fms#ResourceNotFoundException":
1622
- response = {
1623
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1624
- name: errorCode,
1625
- $metadata: deserializeMetadata(output),
1626
- };
1627
- break;
1149
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1628
1150
  default:
1629
1151
  const parsedBody = parsedOutput.body;
1630
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1631
- response = {
1632
- ...parsedBody,
1633
- name: `${errorCode}`,
1634
- message: parsedBody.message || parsedBody.Message || errorCode,
1152
+ response = new FMSServiceException_1.FMSServiceException({
1153
+ name: parsedBody.code || parsedBody.Code || errorCode,
1635
1154
  $fault: "client",
1636
1155
  $metadata: deserializeMetadata(output),
1637
- };
1156
+ });
1157
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1638
1158
  }
1639
- const message = response.message || response.Message || errorCode;
1640
- response.message = message;
1641
- delete response.Message;
1642
- return Promise.reject(Object.assign(new Error(message), response));
1643
1159
  };
1644
1160
  const deserializeAws_json1_1PutNotificationChannelCommand = async (output, context) => {
1645
1161
  if (output.statusCode >= 300) {
@@ -1663,43 +1179,22 @@ const deserializeAws_json1_1PutNotificationChannelCommandError = async (output,
1663
1179
  switch (errorCode) {
1664
1180
  case "InternalErrorException":
1665
1181
  case "com.amazonaws.fms#InternalErrorException":
1666
- response = {
1667
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1668
- name: errorCode,
1669
- $metadata: deserializeMetadata(output),
1670
- };
1671
- break;
1182
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1672
1183
  case "InvalidOperationException":
1673
1184
  case "com.amazonaws.fms#InvalidOperationException":
1674
- response = {
1675
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1676
- name: errorCode,
1677
- $metadata: deserializeMetadata(output),
1678
- };
1679
- break;
1185
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1680
1186
  case "ResourceNotFoundException":
1681
1187
  case "com.amazonaws.fms#ResourceNotFoundException":
1682
- response = {
1683
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1684
- name: errorCode,
1685
- $metadata: deserializeMetadata(output),
1686
- };
1687
- break;
1188
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1688
1189
  default:
1689
1190
  const parsedBody = parsedOutput.body;
1690
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1691
- response = {
1692
- ...parsedBody,
1693
- name: `${errorCode}`,
1694
- message: parsedBody.message || parsedBody.Message || errorCode,
1191
+ response = new FMSServiceException_1.FMSServiceException({
1192
+ name: parsedBody.code || parsedBody.Code || errorCode,
1695
1193
  $fault: "client",
1696
1194
  $metadata: deserializeMetadata(output),
1697
- };
1195
+ });
1196
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1698
1197
  }
1699
- const message = response.message || response.Message || errorCode;
1700
- response.message = message;
1701
- delete response.Message;
1702
- return Promise.reject(Object.assign(new Error(message), response));
1703
1198
  };
1704
1199
  const deserializeAws_json1_1PutPolicyCommand = async (output, context) => {
1705
1200
  if (output.statusCode >= 300) {
@@ -1726,67 +1221,31 @@ const deserializeAws_json1_1PutPolicyCommandError = async (output, context) => {
1726
1221
  switch (errorCode) {
1727
1222
  case "InternalErrorException":
1728
1223
  case "com.amazonaws.fms#InternalErrorException":
1729
- response = {
1730
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1731
- name: errorCode,
1732
- $metadata: deserializeMetadata(output),
1733
- };
1734
- break;
1224
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1735
1225
  case "InvalidInputException":
1736
1226
  case "com.amazonaws.fms#InvalidInputException":
1737
- response = {
1738
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1739
- name: errorCode,
1740
- $metadata: deserializeMetadata(output),
1741
- };
1742
- break;
1227
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1743
1228
  case "InvalidOperationException":
1744
1229
  case "com.amazonaws.fms#InvalidOperationException":
1745
- response = {
1746
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1747
- name: errorCode,
1748
- $metadata: deserializeMetadata(output),
1749
- };
1750
- break;
1230
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1751
1231
  case "InvalidTypeException":
1752
1232
  case "com.amazonaws.fms#InvalidTypeException":
1753
- response = {
1754
- ...(await deserializeAws_json1_1InvalidTypeExceptionResponse(parsedOutput, context)),
1755
- name: errorCode,
1756
- $metadata: deserializeMetadata(output),
1757
- };
1758
- break;
1233
+ throw await deserializeAws_json1_1InvalidTypeExceptionResponse(parsedOutput, context);
1759
1234
  case "LimitExceededException":
1760
1235
  case "com.amazonaws.fms#LimitExceededException":
1761
- response = {
1762
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1763
- name: errorCode,
1764
- $metadata: deserializeMetadata(output),
1765
- };
1766
- break;
1236
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1767
1237
  case "ResourceNotFoundException":
1768
1238
  case "com.amazonaws.fms#ResourceNotFoundException":
1769
- response = {
1770
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1771
- name: errorCode,
1772
- $metadata: deserializeMetadata(output),
1773
- };
1774
- break;
1239
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1775
1240
  default:
1776
1241
  const parsedBody = parsedOutput.body;
1777
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1778
- response = {
1779
- ...parsedBody,
1780
- name: `${errorCode}`,
1781
- message: parsedBody.message || parsedBody.Message || errorCode,
1242
+ response = new FMSServiceException_1.FMSServiceException({
1243
+ name: parsedBody.code || parsedBody.Code || errorCode,
1782
1244
  $fault: "client",
1783
1245
  $metadata: deserializeMetadata(output),
1784
- };
1246
+ });
1247
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1785
1248
  }
1786
- const message = response.message || response.Message || errorCode;
1787
- response.message = message;
1788
- delete response.Message;
1789
- return Promise.reject(Object.assign(new Error(message), response));
1790
1249
  };
1791
1250
  const deserializeAws_json1_1PutProtocolsListCommand = async (output, context) => {
1792
1251
  if (output.statusCode >= 300) {
@@ -1813,59 +1272,28 @@ const deserializeAws_json1_1PutProtocolsListCommandError = async (output, contex
1813
1272
  switch (errorCode) {
1814
1273
  case "InternalErrorException":
1815
1274
  case "com.amazonaws.fms#InternalErrorException":
1816
- response = {
1817
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1818
- name: errorCode,
1819
- $metadata: deserializeMetadata(output),
1820
- };
1821
- break;
1275
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1822
1276
  case "InvalidInputException":
1823
1277
  case "com.amazonaws.fms#InvalidInputException":
1824
- response = {
1825
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1826
- name: errorCode,
1827
- $metadata: deserializeMetadata(output),
1828
- };
1829
- break;
1278
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1830
1279
  case "InvalidOperationException":
1831
1280
  case "com.amazonaws.fms#InvalidOperationException":
1832
- response = {
1833
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1834
- name: errorCode,
1835
- $metadata: deserializeMetadata(output),
1836
- };
1837
- break;
1281
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1838
1282
  case "LimitExceededException":
1839
1283
  case "com.amazonaws.fms#LimitExceededException":
1840
- response = {
1841
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1842
- name: errorCode,
1843
- $metadata: deserializeMetadata(output),
1844
- };
1845
- break;
1284
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1846
1285
  case "ResourceNotFoundException":
1847
1286
  case "com.amazonaws.fms#ResourceNotFoundException":
1848
- response = {
1849
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1850
- name: errorCode,
1851
- $metadata: deserializeMetadata(output),
1852
- };
1853
- break;
1287
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1854
1288
  default:
1855
1289
  const parsedBody = parsedOutput.body;
1856
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1857
- response = {
1858
- ...parsedBody,
1859
- name: `${errorCode}`,
1860
- message: parsedBody.message || parsedBody.Message || errorCode,
1290
+ response = new FMSServiceException_1.FMSServiceException({
1291
+ name: parsedBody.code || parsedBody.Code || errorCode,
1861
1292
  $fault: "client",
1862
1293
  $metadata: deserializeMetadata(output),
1863
- };
1294
+ });
1295
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1864
1296
  }
1865
- const message = response.message || response.Message || errorCode;
1866
- response.message = message;
1867
- delete response.Message;
1868
- return Promise.reject(Object.assign(new Error(message), response));
1869
1297
  };
1870
1298
  const deserializeAws_json1_1TagResourceCommand = async (output, context) => {
1871
1299
  if (output.statusCode >= 300) {
@@ -1892,59 +1320,28 @@ const deserializeAws_json1_1TagResourceCommandError = async (output, context) =>
1892
1320
  switch (errorCode) {
1893
1321
  case "InternalErrorException":
1894
1322
  case "com.amazonaws.fms#InternalErrorException":
1895
- response = {
1896
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1897
- name: errorCode,
1898
- $metadata: deserializeMetadata(output),
1899
- };
1900
- break;
1323
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1901
1324
  case "InvalidInputException":
1902
1325
  case "com.amazonaws.fms#InvalidInputException":
1903
- response = {
1904
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1905
- name: errorCode,
1906
- $metadata: deserializeMetadata(output),
1907
- };
1908
- break;
1326
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1909
1327
  case "InvalidOperationException":
1910
1328
  case "com.amazonaws.fms#InvalidOperationException":
1911
- response = {
1912
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1913
- name: errorCode,
1914
- $metadata: deserializeMetadata(output),
1915
- };
1916
- break;
1329
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1917
1330
  case "LimitExceededException":
1918
1331
  case "com.amazonaws.fms#LimitExceededException":
1919
- response = {
1920
- ...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
1921
- name: errorCode,
1922
- $metadata: deserializeMetadata(output),
1923
- };
1924
- break;
1332
+ throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
1925
1333
  case "ResourceNotFoundException":
1926
1334
  case "com.amazonaws.fms#ResourceNotFoundException":
1927
- response = {
1928
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1929
- name: errorCode,
1930
- $metadata: deserializeMetadata(output),
1931
- };
1932
- break;
1335
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
1933
1336
  default:
1934
1337
  const parsedBody = parsedOutput.body;
1935
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1936
- response = {
1937
- ...parsedBody,
1938
- name: `${errorCode}`,
1939
- message: parsedBody.message || parsedBody.Message || errorCode,
1338
+ response = new FMSServiceException_1.FMSServiceException({
1339
+ name: parsedBody.code || parsedBody.Code || errorCode,
1940
1340
  $fault: "client",
1941
1341
  $metadata: deserializeMetadata(output),
1942
- };
1342
+ });
1343
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1943
1344
  }
1944
- const message = response.message || response.Message || errorCode;
1945
- response.message = message;
1946
- delete response.Message;
1947
- return Promise.reject(Object.assign(new Error(message), response));
1948
1345
  };
1949
1346
  const deserializeAws_json1_1UntagResourceCommand = async (output, context) => {
1950
1347
  if (output.statusCode >= 300) {
@@ -1971,117 +1368,79 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
1971
1368
  switch (errorCode) {
1972
1369
  case "InternalErrorException":
1973
1370
  case "com.amazonaws.fms#InternalErrorException":
1974
- response = {
1975
- ...(await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context)),
1976
- name: errorCode,
1977
- $metadata: deserializeMetadata(output),
1978
- };
1979
- break;
1371
+ throw await deserializeAws_json1_1InternalErrorExceptionResponse(parsedOutput, context);
1980
1372
  case "InvalidInputException":
1981
1373
  case "com.amazonaws.fms#InvalidInputException":
1982
- response = {
1983
- ...(await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context)),
1984
- name: errorCode,
1985
- $metadata: deserializeMetadata(output),
1986
- };
1987
- break;
1374
+ throw await deserializeAws_json1_1InvalidInputExceptionResponse(parsedOutput, context);
1988
1375
  case "InvalidOperationException":
1989
1376
  case "com.amazonaws.fms#InvalidOperationException":
1990
- response = {
1991
- ...(await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context)),
1992
- name: errorCode,
1993
- $metadata: deserializeMetadata(output),
1994
- };
1995
- break;
1377
+ throw await deserializeAws_json1_1InvalidOperationExceptionResponse(parsedOutput, context);
1996
1378
  case "ResourceNotFoundException":
1997
1379
  case "com.amazonaws.fms#ResourceNotFoundException":
1998
- response = {
1999
- ...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
2000
- name: errorCode,
2001
- $metadata: deserializeMetadata(output),
2002
- };
2003
- break;
1380
+ throw await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context);
2004
1381
  default:
2005
1382
  const parsedBody = parsedOutput.body;
2006
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
2007
- response = {
2008
- ...parsedBody,
2009
- name: `${errorCode}`,
2010
- message: parsedBody.message || parsedBody.Message || errorCode,
1383
+ response = new FMSServiceException_1.FMSServiceException({
1384
+ name: parsedBody.code || parsedBody.Code || errorCode,
2011
1385
  $fault: "client",
2012
1386
  $metadata: deserializeMetadata(output),
2013
- };
1387
+ });
1388
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
2014
1389
  }
2015
- const message = response.message || response.Message || errorCode;
2016
- response.message = message;
2017
- delete response.Message;
2018
- return Promise.reject(Object.assign(new Error(message), response));
2019
1390
  };
2020
1391
  const deserializeAws_json1_1InternalErrorExceptionResponse = async (parsedOutput, context) => {
2021
1392
  const body = parsedOutput.body;
2022
1393
  const deserialized = deserializeAws_json1_1InternalErrorException(body, context);
2023
- const contents = {
2024
- name: "InternalErrorException",
2025
- $fault: "client",
1394
+ const exception = new models_0_1.InternalErrorException({
2026
1395
  $metadata: deserializeMetadata(parsedOutput),
2027
1396
  ...deserialized,
2028
- };
2029
- return contents;
1397
+ });
1398
+ return smithy_client_1.decorateServiceException(exception, body);
2030
1399
  };
2031
1400
  const deserializeAws_json1_1InvalidInputExceptionResponse = async (parsedOutput, context) => {
2032
1401
  const body = parsedOutput.body;
2033
1402
  const deserialized = deserializeAws_json1_1InvalidInputException(body, context);
2034
- const contents = {
2035
- name: "InvalidInputException",
2036
- $fault: "client",
1403
+ const exception = new models_0_1.InvalidInputException({
2037
1404
  $metadata: deserializeMetadata(parsedOutput),
2038
1405
  ...deserialized,
2039
- };
2040
- return contents;
1406
+ });
1407
+ return smithy_client_1.decorateServiceException(exception, body);
2041
1408
  };
2042
1409
  const deserializeAws_json1_1InvalidOperationExceptionResponse = async (parsedOutput, context) => {
2043
1410
  const body = parsedOutput.body;
2044
1411
  const deserialized = deserializeAws_json1_1InvalidOperationException(body, context);
2045
- const contents = {
2046
- name: "InvalidOperationException",
2047
- $fault: "client",
1412
+ const exception = new models_0_1.InvalidOperationException({
2048
1413
  $metadata: deserializeMetadata(parsedOutput),
2049
1414
  ...deserialized,
2050
- };
2051
- return contents;
1415
+ });
1416
+ return smithy_client_1.decorateServiceException(exception, body);
2052
1417
  };
2053
1418
  const deserializeAws_json1_1InvalidTypeExceptionResponse = async (parsedOutput, context) => {
2054
1419
  const body = parsedOutput.body;
2055
1420
  const deserialized = deserializeAws_json1_1InvalidTypeException(body, context);
2056
- const contents = {
2057
- name: "InvalidTypeException",
2058
- $fault: "client",
1421
+ const exception = new models_0_1.InvalidTypeException({
2059
1422
  $metadata: deserializeMetadata(parsedOutput),
2060
1423
  ...deserialized,
2061
- };
2062
- return contents;
1424
+ });
1425
+ return smithy_client_1.decorateServiceException(exception, body);
2063
1426
  };
2064
1427
  const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
2065
1428
  const body = parsedOutput.body;
2066
1429
  const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
2067
- const contents = {
2068
- name: "LimitExceededException",
2069
- $fault: "client",
1430
+ const exception = new models_0_1.LimitExceededException({
2070
1431
  $metadata: deserializeMetadata(parsedOutput),
2071
1432
  ...deserialized,
2072
- };
2073
- return contents;
1433
+ });
1434
+ return smithy_client_1.decorateServiceException(exception, body);
2074
1435
  };
2075
1436
  const deserializeAws_json1_1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
2076
1437
  const body = parsedOutput.body;
2077
1438
  const deserialized = deserializeAws_json1_1ResourceNotFoundException(body, context);
2078
- const contents = {
2079
- name: "ResourceNotFoundException",
2080
- $fault: "client",
1439
+ const exception = new models_0_1.ResourceNotFoundException({
2081
1440
  $metadata: deserializeMetadata(parsedOutput),
2082
1441
  ...deserialized,
2083
- };
2084
- return contents;
1442
+ });
1443
+ return smithy_client_1.decorateServiceException(exception, body);
2085
1444
  };
2086
1445
  const serializeAws_json1_1App = (input, context) => {
2087
1446
  return {
@@ -2255,6 +1614,12 @@ const serializeAws_json1_1ListTagsForResourceRequest = (input, context) => {
2255
1614
  ...(input.ResourceArn !== undefined && input.ResourceArn !== null && { ResourceArn: input.ResourceArn }),
2256
1615
  };
2257
1616
  };
1617
+ const serializeAws_json1_1NetworkFirewallPolicy = (input, context) => {
1618
+ return {
1619
+ ...(input.FirewallDeploymentModel !== undefined &&
1620
+ input.FirewallDeploymentModel !== null && { FirewallDeploymentModel: input.FirewallDeploymentModel }),
1621
+ };
1622
+ };
2258
1623
  const serializeAws_json1_1Policy = (input, context) => {
2259
1624
  return {
2260
1625
  ...(input.DeleteUnusedFMManagedResources !== undefined &&
@@ -2290,6 +1655,14 @@ const serializeAws_json1_1Policy = (input, context) => {
2290
1655
  }),
2291
1656
  };
2292
1657
  };
1658
+ const serializeAws_json1_1PolicyOption = (input, context) => {
1659
+ return {
1660
+ ...(input.NetworkFirewallPolicy !== undefined &&
1661
+ input.NetworkFirewallPolicy !== null && {
1662
+ NetworkFirewallPolicy: serializeAws_json1_1NetworkFirewallPolicy(input.NetworkFirewallPolicy, context),
1663
+ }),
1664
+ };
1665
+ };
2293
1666
  const serializeAws_json1_1PreviousAppsList = (input, context) => {
2294
1667
  return Object.entries(input).reduce((acc, [key, value]) => {
2295
1668
  if (value === null) {
@@ -2404,6 +1777,8 @@ const serializeAws_json1_1SecurityServicePolicyData = (input, context) => {
2404
1777
  return {
2405
1778
  ...(input.ManagedServiceData !== undefined &&
2406
1779
  input.ManagedServiceData !== null && { ManagedServiceData: input.ManagedServiceData }),
1780
+ ...(input.PolicyOption !== undefined &&
1781
+ input.PolicyOption !== null && { PolicyOption: serializeAws_json1_1PolicyOption(input.PolicyOption, context) }),
2407
1782
  ...(input.Type !== undefined && input.Type !== null && { Type: input.Type }),
2408
1783
  };
2409
1784
  };
@@ -2461,7 +1836,7 @@ const deserializeAws_json1_1App = (output, context) => {
2461
1836
  };
2462
1837
  };
2463
1838
  const deserializeAws_json1_1AppsList = (output, context) => {
2464
- return (output || [])
1839
+ const retVal = (output || [])
2465
1840
  .filter((e) => e != null)
2466
1841
  .map((entry) => {
2467
1842
  if (entry === null) {
@@ -2469,6 +1844,7 @@ const deserializeAws_json1_1AppsList = (output, context) => {
2469
1844
  }
2470
1845
  return deserializeAws_json1_1App(entry, context);
2471
1846
  });
1847
+ return retVal;
2472
1848
  };
2473
1849
  const deserializeAws_json1_1AppsListData = (output, context) => {
2474
1850
  return {
@@ -2500,7 +1876,7 @@ const deserializeAws_json1_1AppsListDataSummary = (output, context) => {
2500
1876
  };
2501
1877
  };
2502
1878
  const deserializeAws_json1_1AppsListsData = (output, context) => {
2503
- return (output || [])
1879
+ const retVal = (output || [])
2504
1880
  .filter((e) => e != null)
2505
1881
  .map((entry) => {
2506
1882
  if (entry === null) {
@@ -2508,6 +1884,7 @@ const deserializeAws_json1_1AppsListsData = (output, context) => {
2508
1884
  }
2509
1885
  return deserializeAws_json1_1AppsListDataSummary(entry, context);
2510
1886
  });
1887
+ return retVal;
2511
1888
  };
2512
1889
  const deserializeAws_json1_1AwsEc2InstanceViolation = (output, context) => {
2513
1890
  return {
@@ -2526,7 +1903,7 @@ const deserializeAws_json1_1AwsEc2NetworkInterfaceViolation = (output, context)
2526
1903
  };
2527
1904
  };
2528
1905
  const deserializeAws_json1_1AwsEc2NetworkInterfaceViolations = (output, context) => {
2529
- return (output || [])
1906
+ const retVal = (output || [])
2530
1907
  .filter((e) => e != null)
2531
1908
  .map((entry) => {
2532
1909
  if (entry === null) {
@@ -2534,6 +1911,7 @@ const deserializeAws_json1_1AwsEc2NetworkInterfaceViolations = (output, context)
2534
1911
  }
2535
1912
  return deserializeAws_json1_1AwsEc2NetworkInterfaceViolation(entry, context);
2536
1913
  });
1914
+ return retVal;
2537
1915
  };
2538
1916
  const deserializeAws_json1_1AwsVPCSecurityGroupViolation = (output, context) => {
2539
1917
  return {
@@ -2550,13 +1928,27 @@ const deserializeAws_json1_1AwsVPCSecurityGroupViolation = (output, context) =>
2550
1928
  };
2551
1929
  const deserializeAws_json1_1ComplianceViolator = (output, context) => {
2552
1930
  return {
1931
+ Metadata: output.Metadata !== undefined && output.Metadata !== null
1932
+ ? deserializeAws_json1_1ComplianceViolatorMetadata(output.Metadata, context)
1933
+ : undefined,
2553
1934
  ResourceId: smithy_client_1.expectString(output.ResourceId),
2554
1935
  ResourceType: smithy_client_1.expectString(output.ResourceType),
2555
1936
  ViolationReason: smithy_client_1.expectString(output.ViolationReason),
2556
1937
  };
2557
1938
  };
1939
+ const deserializeAws_json1_1ComplianceViolatorMetadata = (output, context) => {
1940
+ return Object.entries(output).reduce((acc, [key, value]) => {
1941
+ if (value === null) {
1942
+ return acc;
1943
+ }
1944
+ return {
1945
+ ...acc,
1946
+ [key]: smithy_client_1.expectString(value),
1947
+ };
1948
+ }, {});
1949
+ };
2558
1950
  const deserializeAws_json1_1ComplianceViolators = (output, context) => {
2559
- return (output || [])
1951
+ const retVal = (output || [])
2560
1952
  .filter((e) => e != null)
2561
1953
  .map((entry) => {
2562
1954
  if (entry === null) {
@@ -2564,9 +1956,10 @@ const deserializeAws_json1_1ComplianceViolators = (output, context) => {
2564
1956
  }
2565
1957
  return deserializeAws_json1_1ComplianceViolator(entry, context);
2566
1958
  });
1959
+ return retVal;
2567
1960
  };
2568
1961
  const deserializeAws_json1_1CustomerPolicyScopeIdList = (output, context) => {
2569
- return (output || [])
1962
+ const retVal = (output || [])
2570
1963
  .filter((e) => e != null)
2571
1964
  .map((entry) => {
2572
1965
  if (entry === null) {
@@ -2574,6 +1967,7 @@ const deserializeAws_json1_1CustomerPolicyScopeIdList = (output, context) => {
2574
1967
  }
2575
1968
  return smithy_client_1.expectString(entry);
2576
1969
  });
1970
+ return retVal;
2577
1971
  };
2578
1972
  const deserializeAws_json1_1CustomerPolicyScopeMap = (output, context) => {
2579
1973
  return Object.entries(output).reduce((acc, [key, value]) => {
@@ -2600,7 +1994,7 @@ const deserializeAws_json1_1DnsRuleGroupLimitExceededViolation = (output, contex
2600
1994
  };
2601
1995
  };
2602
1996
  const deserializeAws_json1_1DnsRuleGroupPriorities = (output, context) => {
2603
- return (output || [])
1997
+ const retVal = (output || [])
2604
1998
  .filter((e) => e != null)
2605
1999
  .map((entry) => {
2606
2000
  if (entry === null) {
@@ -2608,6 +2002,7 @@ const deserializeAws_json1_1DnsRuleGroupPriorities = (output, context) => {
2608
2002
  }
2609
2003
  return smithy_client_1.expectInt32(entry);
2610
2004
  });
2005
+ return retVal;
2611
2006
  };
2612
2007
  const deserializeAws_json1_1DnsRuleGroupPriorityConflictViolation = (output, context) => {
2613
2008
  return {
@@ -2714,7 +2109,7 @@ const deserializeAws_json1_1EvaluationResult = (output, context) => {
2714
2109
  };
2715
2110
  };
2716
2111
  const deserializeAws_json1_1EvaluationResults = (output, context) => {
2717
- return (output || [])
2112
+ const retVal = (output || [])
2718
2113
  .filter((e) => e != null)
2719
2114
  .map((entry) => {
2720
2115
  if (entry === null) {
@@ -2722,6 +2117,7 @@ const deserializeAws_json1_1EvaluationResults = (output, context) => {
2722
2117
  }
2723
2118
  return deserializeAws_json1_1EvaluationResult(entry, context);
2724
2119
  });
2120
+ return retVal;
2725
2121
  };
2726
2122
  const deserializeAws_json1_1ExpectedRoute = (output, context) => {
2727
2123
  return {
@@ -2738,7 +2134,7 @@ const deserializeAws_json1_1ExpectedRoute = (output, context) => {
2738
2134
  };
2739
2135
  };
2740
2136
  const deserializeAws_json1_1ExpectedRoutes = (output, context) => {
2741
- return (output || [])
2137
+ const retVal = (output || [])
2742
2138
  .filter((e) => e != null)
2743
2139
  .map((entry) => {
2744
2140
  if (entry === null) {
@@ -2746,6 +2142,22 @@ const deserializeAws_json1_1ExpectedRoutes = (output, context) => {
2746
2142
  }
2747
2143
  return deserializeAws_json1_1ExpectedRoute(entry, context);
2748
2144
  });
2145
+ return retVal;
2146
+ };
2147
+ const deserializeAws_json1_1FirewallSubnetIsOutOfScopeViolation = (output, context) => {
2148
+ return {
2149
+ FirewallSubnetId: smithy_client_1.expectString(output.FirewallSubnetId),
2150
+ SubnetAvailabilityZone: smithy_client_1.expectString(output.SubnetAvailabilityZone),
2151
+ SubnetAvailabilityZoneId: smithy_client_1.expectString(output.SubnetAvailabilityZoneId),
2152
+ VpcEndpointId: smithy_client_1.expectString(output.VpcEndpointId),
2153
+ VpcId: smithy_client_1.expectString(output.VpcId),
2154
+ };
2155
+ };
2156
+ const deserializeAws_json1_1FMSPolicyUpdateFirewallCreationConfigAction = (output, context) => {
2157
+ return {
2158
+ Description: smithy_client_1.expectString(output.Description),
2159
+ FirewallCreationConfig: smithy_client_1.expectString(output.FirewallCreationConfig),
2160
+ };
2749
2161
  };
2750
2162
  const deserializeAws_json1_1GetAdminAccountResponse = (output, context) => {
2751
2163
  return {
@@ -2837,7 +2249,7 @@ const deserializeAws_json1_1IssueInfoMap = (output, context) => {
2837
2249
  }, {});
2838
2250
  };
2839
2251
  const deserializeAws_json1_1LengthBoundedStringList = (output, context) => {
2840
- return (output || [])
2252
+ const retVal = (output || [])
2841
2253
  .filter((e) => e != null)
2842
2254
  .map((entry) => {
2843
2255
  if (entry === null) {
@@ -2845,6 +2257,7 @@ const deserializeAws_json1_1LengthBoundedStringList = (output, context) => {
2845
2257
  }
2846
2258
  return smithy_client_1.expectString(entry);
2847
2259
  });
2260
+ return retVal;
2848
2261
  };
2849
2262
  const deserializeAws_json1_1LimitExceededException = (output, context) => {
2850
2263
  return {
@@ -2899,7 +2312,7 @@ const deserializeAws_json1_1ListTagsForResourceResponse = (output, context) => {
2899
2312
  };
2900
2313
  };
2901
2314
  const deserializeAws_json1_1MemberAccounts = (output, context) => {
2902
- return (output || [])
2315
+ const retVal = (output || [])
2903
2316
  .filter((e) => e != null)
2904
2317
  .map((entry) => {
2905
2318
  if (entry === null) {
@@ -2907,9 +2320,10 @@ const deserializeAws_json1_1MemberAccounts = (output, context) => {
2907
2320
  }
2908
2321
  return smithy_client_1.expectString(entry);
2909
2322
  });
2323
+ return retVal;
2910
2324
  };
2911
2325
  const deserializeAws_json1_1NetworkFirewallActionList = (output, context) => {
2912
- return (output || [])
2326
+ const retVal = (output || [])
2913
2327
  .filter((e) => e != null)
2914
2328
  .map((entry) => {
2915
2329
  if (entry === null) {
@@ -2917,6 +2331,7 @@ const deserializeAws_json1_1NetworkFirewallActionList = (output, context) => {
2917
2331
  }
2918
2332
  return smithy_client_1.expectString(entry);
2919
2333
  });
2334
+ return retVal;
2920
2335
  };
2921
2336
  const deserializeAws_json1_1NetworkFirewallBlackHoleRouteDetectedViolation = (output, context) => {
2922
2337
  return {
@@ -3023,6 +2438,11 @@ const deserializeAws_json1_1NetworkFirewallMissingSubnetViolation = (output, con
3023
2438
  ViolationTarget: smithy_client_1.expectString(output.ViolationTarget),
3024
2439
  };
3025
2440
  };
2441
+ const deserializeAws_json1_1NetworkFirewallPolicy = (output, context) => {
2442
+ return {
2443
+ FirewallDeploymentModel: smithy_client_1.expectString(output.FirewallDeploymentModel),
2444
+ };
2445
+ };
3026
2446
  const deserializeAws_json1_1NetworkFirewallPolicyDescription = (output, context) => {
3027
2447
  return {
3028
2448
  StatefulRuleGroups: output.StatefulRuleGroups !== undefined && output.StatefulRuleGroups !== null
@@ -3075,7 +2495,7 @@ const deserializeAws_json1_1NetworkFirewallUnexpectedGatewayRoutesViolation = (o
3075
2495
  };
3076
2496
  };
3077
2497
  const deserializeAws_json1_1OrderedRemediationActions = (output, context) => {
3078
- return (output || [])
2498
+ const retVal = (output || [])
3079
2499
  .filter((e) => e != null)
3080
2500
  .map((entry) => {
3081
2501
  if (entry === null) {
@@ -3083,6 +2503,7 @@ const deserializeAws_json1_1OrderedRemediationActions = (output, context) => {
3083
2503
  }
3084
2504
  return deserializeAws_json1_1RemediationActionWithOrder(entry, context);
3085
2505
  });
2506
+ return retVal;
3086
2507
  };
3087
2508
  const deserializeAws_json1_1PartialMatch = (output, context) => {
3088
2509
  return {
@@ -3093,7 +2514,7 @@ const deserializeAws_json1_1PartialMatch = (output, context) => {
3093
2514
  };
3094
2515
  };
3095
2516
  const deserializeAws_json1_1PartialMatches = (output, context) => {
3096
- return (output || [])
2517
+ const retVal = (output || [])
3097
2518
  .filter((e) => e != null)
3098
2519
  .map((entry) => {
3099
2520
  if (entry === null) {
@@ -3101,6 +2522,7 @@ const deserializeAws_json1_1PartialMatches = (output, context) => {
3101
2522
  }
3102
2523
  return deserializeAws_json1_1PartialMatch(entry, context);
3103
2524
  });
2525
+ return retVal;
3104
2526
  };
3105
2527
  const deserializeAws_json1_1Policy = (output, context) => {
3106
2528
  return {
@@ -3163,7 +2585,7 @@ const deserializeAws_json1_1PolicyComplianceStatus = (output, context) => {
3163
2585
  };
3164
2586
  };
3165
2587
  const deserializeAws_json1_1PolicyComplianceStatusList = (output, context) => {
3166
- return (output || [])
2588
+ const retVal = (output || [])
3167
2589
  .filter((e) => e != null)
3168
2590
  .map((entry) => {
3169
2591
  if (entry === null) {
@@ -3171,6 +2593,14 @@ const deserializeAws_json1_1PolicyComplianceStatusList = (output, context) => {
3171
2593
  }
3172
2594
  return deserializeAws_json1_1PolicyComplianceStatus(entry, context);
3173
2595
  });
2596
+ return retVal;
2597
+ };
2598
+ const deserializeAws_json1_1PolicyOption = (output, context) => {
2599
+ return {
2600
+ NetworkFirewallPolicy: output.NetworkFirewallPolicy !== undefined && output.NetworkFirewallPolicy !== null
2601
+ ? deserializeAws_json1_1NetworkFirewallPolicy(output.NetworkFirewallPolicy, context)
2602
+ : undefined,
2603
+ };
3174
2604
  };
3175
2605
  const deserializeAws_json1_1PolicySummary = (output, context) => {
3176
2606
  return {
@@ -3184,7 +2614,7 @@ const deserializeAws_json1_1PolicySummary = (output, context) => {
3184
2614
  };
3185
2615
  };
3186
2616
  const deserializeAws_json1_1PolicySummaryList = (output, context) => {
3187
- return (output || [])
2617
+ const retVal = (output || [])
3188
2618
  .filter((e) => e != null)
3189
2619
  .map((entry) => {
3190
2620
  if (entry === null) {
@@ -3192,6 +2622,7 @@ const deserializeAws_json1_1PolicySummaryList = (output, context) => {
3192
2622
  }
3193
2623
  return deserializeAws_json1_1PolicySummary(entry, context);
3194
2624
  });
2625
+ return retVal;
3195
2626
  };
3196
2627
  const deserializeAws_json1_1PossibleRemediationAction = (output, context) => {
3197
2628
  return {
@@ -3203,7 +2634,7 @@ const deserializeAws_json1_1PossibleRemediationAction = (output, context) => {
3203
2634
  };
3204
2635
  };
3205
2636
  const deserializeAws_json1_1PossibleRemediationActionList = (output, context) => {
3206
- return (output || [])
2637
+ const retVal = (output || [])
3207
2638
  .filter((e) => e != null)
3208
2639
  .map((entry) => {
3209
2640
  if (entry === null) {
@@ -3211,6 +2642,7 @@ const deserializeAws_json1_1PossibleRemediationActionList = (output, context) =>
3211
2642
  }
3212
2643
  return deserializeAws_json1_1PossibleRemediationAction(entry, context);
3213
2644
  });
2645
+ return retVal;
3214
2646
  };
3215
2647
  const deserializeAws_json1_1PossibleRemediationActions = (output, context) => {
3216
2648
  return {
@@ -3243,7 +2675,7 @@ const deserializeAws_json1_1PreviousProtocolsList = (output, context) => {
3243
2675
  }, {});
3244
2676
  };
3245
2677
  const deserializeAws_json1_1ProtocolsList = (output, context) => {
3246
- return (output || [])
2678
+ const retVal = (output || [])
3247
2679
  .filter((e) => e != null)
3248
2680
  .map((entry) => {
3249
2681
  if (entry === null) {
@@ -3251,6 +2683,7 @@ const deserializeAws_json1_1ProtocolsList = (output, context) => {
3251
2683
  }
3252
2684
  return smithy_client_1.expectString(entry);
3253
2685
  });
2686
+ return retVal;
3254
2687
  };
3255
2688
  const deserializeAws_json1_1ProtocolsListData = (output, context) => {
3256
2689
  return {
@@ -3282,7 +2715,7 @@ const deserializeAws_json1_1ProtocolsListDataSummary = (output, context) => {
3282
2715
  };
3283
2716
  };
3284
2717
  const deserializeAws_json1_1ProtocolsListsData = (output, context) => {
3285
- return (output || [])
2718
+ const retVal = (output || [])
3286
2719
  .filter((e) => e != null)
3287
2720
  .map((entry) => {
3288
2721
  if (entry === null) {
@@ -3290,6 +2723,7 @@ const deserializeAws_json1_1ProtocolsListsData = (output, context) => {
3290
2723
  }
3291
2724
  return deserializeAws_json1_1ProtocolsListDataSummary(entry, context);
3292
2725
  });
2726
+ return retVal;
3293
2727
  };
3294
2728
  const deserializeAws_json1_1PutAppsListResponse = (output, context) => {
3295
2729
  return {
@@ -3340,6 +2774,10 @@ const deserializeAws_json1_1RemediationAction = (output, context) => {
3340
2774
  output.EC2ReplaceRouteTableAssociationAction !== null
3341
2775
  ? deserializeAws_json1_1EC2ReplaceRouteTableAssociationAction(output.EC2ReplaceRouteTableAssociationAction, context)
3342
2776
  : undefined,
2777
+ FMSPolicyUpdateFirewallCreationConfigAction: output.FMSPolicyUpdateFirewallCreationConfigAction !== undefined &&
2778
+ output.FMSPolicyUpdateFirewallCreationConfigAction !== null
2779
+ ? deserializeAws_json1_1FMSPolicyUpdateFirewallCreationConfigAction(output.FMSPolicyUpdateFirewallCreationConfigAction, context)
2780
+ : undefined,
3343
2781
  };
3344
2782
  };
3345
2783
  const deserializeAws_json1_1RemediationActionWithOrder = (output, context) => {
@@ -3351,7 +2789,7 @@ const deserializeAws_json1_1RemediationActionWithOrder = (output, context) => {
3351
2789
  };
3352
2790
  };
3353
2791
  const deserializeAws_json1_1ResourceIdList = (output, context) => {
3354
- return (output || [])
2792
+ const retVal = (output || [])
3355
2793
  .filter((e) => e != null)
3356
2794
  .map((entry) => {
3357
2795
  if (entry === null) {
@@ -3359,6 +2797,7 @@ const deserializeAws_json1_1ResourceIdList = (output, context) => {
3359
2797
  }
3360
2798
  return smithy_client_1.expectString(entry);
3361
2799
  });
2800
+ return retVal;
3362
2801
  };
3363
2802
  const deserializeAws_json1_1ResourceNotFoundException = (output, context) => {
3364
2803
  return {
@@ -3372,7 +2811,7 @@ const deserializeAws_json1_1ResourceTag = (output, context) => {
3372
2811
  };
3373
2812
  };
3374
2813
  const deserializeAws_json1_1ResourceTags = (output, context) => {
3375
- return (output || [])
2814
+ const retVal = (output || [])
3376
2815
  .filter((e) => e != null)
3377
2816
  .map((entry) => {
3378
2817
  if (entry === null) {
@@ -3380,9 +2819,10 @@ const deserializeAws_json1_1ResourceTags = (output, context) => {
3380
2819
  }
3381
2820
  return deserializeAws_json1_1ResourceTag(entry, context);
3382
2821
  });
2822
+ return retVal;
3383
2823
  };
3384
2824
  const deserializeAws_json1_1ResourceTypeList = (output, context) => {
3385
- return (output || [])
2825
+ const retVal = (output || [])
3386
2826
  .filter((e) => e != null)
3387
2827
  .map((entry) => {
3388
2828
  if (entry === null) {
@@ -3390,6 +2830,7 @@ const deserializeAws_json1_1ResourceTypeList = (output, context) => {
3390
2830
  }
3391
2831
  return smithy_client_1.expectString(entry);
3392
2832
  });
2833
+ return retVal;
3393
2834
  };
3394
2835
  const deserializeAws_json1_1ResourceViolation = (output, context) => {
3395
2836
  return {
@@ -3412,6 +2853,9 @@ const deserializeAws_json1_1ResourceViolation = (output, context) => {
3412
2853
  output.DnsRuleGroupPriorityConflictViolation !== null
3413
2854
  ? deserializeAws_json1_1DnsRuleGroupPriorityConflictViolation(output.DnsRuleGroupPriorityConflictViolation, context)
3414
2855
  : undefined,
2856
+ FirewallSubnetIsOutOfScopeViolation: output.FirewallSubnetIsOutOfScopeViolation !== undefined && output.FirewallSubnetIsOutOfScopeViolation !== null
2857
+ ? deserializeAws_json1_1FirewallSubnetIsOutOfScopeViolation(output.FirewallSubnetIsOutOfScopeViolation, context)
2858
+ : undefined,
3415
2859
  NetworkFirewallBlackHoleRouteDetectedViolation: output.NetworkFirewallBlackHoleRouteDetectedViolation !== undefined &&
3416
2860
  output.NetworkFirewallBlackHoleRouteDetectedViolation !== null
3417
2861
  ? deserializeAws_json1_1NetworkFirewallBlackHoleRouteDetectedViolation(output.NetworkFirewallBlackHoleRouteDetectedViolation, context)
@@ -3455,10 +2899,13 @@ const deserializeAws_json1_1ResourceViolation = (output, context) => {
3455
2899
  PossibleRemediationActions: output.PossibleRemediationActions !== undefined && output.PossibleRemediationActions !== null
3456
2900
  ? deserializeAws_json1_1PossibleRemediationActions(output.PossibleRemediationActions, context)
3457
2901
  : undefined,
2902
+ RouteHasOutOfScopeEndpointViolation: output.RouteHasOutOfScopeEndpointViolation !== undefined && output.RouteHasOutOfScopeEndpointViolation !== null
2903
+ ? deserializeAws_json1_1RouteHasOutOfScopeEndpointViolation(output.RouteHasOutOfScopeEndpointViolation, context)
2904
+ : undefined,
3458
2905
  };
3459
2906
  };
3460
2907
  const deserializeAws_json1_1ResourceViolations = (output, context) => {
3461
- return (output || [])
2908
+ const retVal = (output || [])
3462
2909
  .filter((e) => e != null)
3463
2910
  .map((entry) => {
3464
2911
  if (entry === null) {
@@ -3466,6 +2913,7 @@ const deserializeAws_json1_1ResourceViolations = (output, context) => {
3466
2913
  }
3467
2914
  return deserializeAws_json1_1ResourceViolation(entry, context);
3468
2915
  });
2916
+ return retVal;
3469
2917
  };
3470
2918
  const deserializeAws_json1_1Route = (output, context) => {
3471
2919
  return {
@@ -3475,8 +2923,30 @@ const deserializeAws_json1_1Route = (output, context) => {
3475
2923
  TargetType: smithy_client_1.expectString(output.TargetType),
3476
2924
  };
3477
2925
  };
2926
+ const deserializeAws_json1_1RouteHasOutOfScopeEndpointViolation = (output, context) => {
2927
+ return {
2928
+ CurrentFirewallSubnetRouteTable: smithy_client_1.expectString(output.CurrentFirewallSubnetRouteTable),
2929
+ CurrentInternetGatewayRouteTable: smithy_client_1.expectString(output.CurrentInternetGatewayRouteTable),
2930
+ FirewallSubnetId: smithy_client_1.expectString(output.FirewallSubnetId),
2931
+ FirewallSubnetRoutes: output.FirewallSubnetRoutes !== undefined && output.FirewallSubnetRoutes !== null
2932
+ ? deserializeAws_json1_1Routes(output.FirewallSubnetRoutes, context)
2933
+ : undefined,
2934
+ InternetGatewayId: smithy_client_1.expectString(output.InternetGatewayId),
2935
+ InternetGatewayRoutes: output.InternetGatewayRoutes !== undefined && output.InternetGatewayRoutes !== null
2936
+ ? deserializeAws_json1_1Routes(output.InternetGatewayRoutes, context)
2937
+ : undefined,
2938
+ RouteTableId: smithy_client_1.expectString(output.RouteTableId),
2939
+ SubnetAvailabilityZone: smithy_client_1.expectString(output.SubnetAvailabilityZone),
2940
+ SubnetAvailabilityZoneId: smithy_client_1.expectString(output.SubnetAvailabilityZoneId),
2941
+ SubnetId: smithy_client_1.expectString(output.SubnetId),
2942
+ ViolatingRoutes: output.ViolatingRoutes !== undefined && output.ViolatingRoutes !== null
2943
+ ? deserializeAws_json1_1Routes(output.ViolatingRoutes, context)
2944
+ : undefined,
2945
+ VpcId: smithy_client_1.expectString(output.VpcId),
2946
+ };
2947
+ };
3478
2948
  const deserializeAws_json1_1Routes = (output, context) => {
3479
- return (output || [])
2949
+ const retVal = (output || [])
3480
2950
  .filter((e) => e != null)
3481
2951
  .map((entry) => {
3482
2952
  if (entry === null) {
@@ -3484,6 +2954,7 @@ const deserializeAws_json1_1Routes = (output, context) => {
3484
2954
  }
3485
2955
  return deserializeAws_json1_1Route(entry, context);
3486
2956
  });
2957
+ return retVal;
3487
2958
  };
3488
2959
  const deserializeAws_json1_1SecurityGroupRemediationAction = (output, context) => {
3489
2960
  return {
@@ -3496,7 +2967,7 @@ const deserializeAws_json1_1SecurityGroupRemediationAction = (output, context) =
3496
2967
  };
3497
2968
  };
3498
2969
  const deserializeAws_json1_1SecurityGroupRemediationActions = (output, context) => {
3499
- return (output || [])
2970
+ const retVal = (output || [])
3500
2971
  .filter((e) => e != null)
3501
2972
  .map((entry) => {
3502
2973
  if (entry === null) {
@@ -3504,6 +2975,7 @@ const deserializeAws_json1_1SecurityGroupRemediationActions = (output, context)
3504
2975
  }
3505
2976
  return deserializeAws_json1_1SecurityGroupRemediationAction(entry, context);
3506
2977
  });
2978
+ return retVal;
3507
2979
  };
3508
2980
  const deserializeAws_json1_1SecurityGroupRuleDescription = (output, context) => {
3509
2981
  return {
@@ -3518,6 +2990,9 @@ const deserializeAws_json1_1SecurityGroupRuleDescription = (output, context) =>
3518
2990
  const deserializeAws_json1_1SecurityServicePolicyData = (output, context) => {
3519
2991
  return {
3520
2992
  ManagedServiceData: smithy_client_1.expectString(output.ManagedServiceData),
2993
+ PolicyOption: output.PolicyOption !== undefined && output.PolicyOption !== null
2994
+ ? deserializeAws_json1_1PolicyOption(output.PolicyOption, context)
2995
+ : undefined,
3521
2996
  Type: smithy_client_1.expectString(output.Type),
3522
2997
  };
3523
2998
  };
@@ -3528,7 +3003,7 @@ const deserializeAws_json1_1StatefulRuleGroup = (output, context) => {
3528
3003
  };
3529
3004
  };
3530
3005
  const deserializeAws_json1_1StatefulRuleGroupList = (output, context) => {
3531
- return (output || [])
3006
+ const retVal = (output || [])
3532
3007
  .filter((e) => e != null)
3533
3008
  .map((entry) => {
3534
3009
  if (entry === null) {
@@ -3536,6 +3011,7 @@ const deserializeAws_json1_1StatefulRuleGroupList = (output, context) => {
3536
3011
  }
3537
3012
  return deserializeAws_json1_1StatefulRuleGroup(entry, context);
3538
3013
  });
3014
+ return retVal;
3539
3015
  };
3540
3016
  const deserializeAws_json1_1StatelessRuleGroup = (output, context) => {
3541
3017
  return {
@@ -3545,7 +3021,7 @@ const deserializeAws_json1_1StatelessRuleGroup = (output, context) => {
3545
3021
  };
3546
3022
  };
3547
3023
  const deserializeAws_json1_1StatelessRuleGroupList = (output, context) => {
3548
- return (output || [])
3024
+ const retVal = (output || [])
3549
3025
  .filter((e) => e != null)
3550
3026
  .map((entry) => {
3551
3027
  if (entry === null) {
@@ -3553,6 +3029,7 @@ const deserializeAws_json1_1StatelessRuleGroupList = (output, context) => {
3553
3029
  }
3554
3030
  return deserializeAws_json1_1StatelessRuleGroup(entry, context);
3555
3031
  });
3032
+ return retVal;
3556
3033
  };
3557
3034
  const deserializeAws_json1_1Tag = (output, context) => {
3558
3035
  return {
@@ -3561,7 +3038,7 @@ const deserializeAws_json1_1Tag = (output, context) => {
3561
3038
  };
3562
3039
  };
3563
3040
  const deserializeAws_json1_1TagList = (output, context) => {
3564
- return (output || [])
3041
+ const retVal = (output || [])
3565
3042
  .filter((e) => e != null)
3566
3043
  .map((entry) => {
3567
3044
  if (entry === null) {
@@ -3569,12 +3046,13 @@ const deserializeAws_json1_1TagList = (output, context) => {
3569
3046
  }
3570
3047
  return deserializeAws_json1_1Tag(entry, context);
3571
3048
  });
3049
+ return retVal;
3572
3050
  };
3573
3051
  const deserializeAws_json1_1TagResourceResponse = (output, context) => {
3574
3052
  return {};
3575
3053
  };
3576
3054
  const deserializeAws_json1_1TargetViolationReasons = (output, context) => {
3577
- return (output || [])
3055
+ const retVal = (output || [])
3578
3056
  .filter((e) => e != null)
3579
3057
  .map((entry) => {
3580
3058
  if (entry === null) {
@@ -3582,6 +3060,7 @@ const deserializeAws_json1_1TargetViolationReasons = (output, context) => {
3582
3060
  }
3583
3061
  return smithy_client_1.expectString(entry);
3584
3062
  });
3063
+ return retVal;
3585
3064
  };
3586
3065
  const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
3587
3066
  return {};