@aws-sdk/client-synthetics 3.50.0 → 3.53.0

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 (48) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/dist-cjs/index.js +3 -0
  3. package/dist-cjs/models/SyntheticsServiceException.js +11 -0
  4. package/dist-cjs/models/models_0.js +73 -2
  5. package/dist-cjs/protocols/Aws_restJson1.js +173 -393
  6. package/dist-es/index.js +1 -0
  7. package/dist-es/models/SyntheticsServiceException.js +12 -0
  8. package/dist-es/models/models_0.js +67 -1
  9. package/dist-es/protocols/Aws_restJson1.js +321 -463
  10. package/dist-types/Synthetics.d.ts +17 -4
  11. package/dist-types/commands/DescribeCanariesCommand.d.ts +8 -4
  12. package/dist-types/commands/DescribeCanariesLastRunCommand.d.ts +9 -0
  13. package/dist-types/index.d.ts +1 -0
  14. package/dist-types/models/SyntheticsServiceException.d.ts +10 -0
  15. package/dist-types/models/models_0.d.ts +69 -14
  16. package/dist-types/ts3.4/Synthetics.d.ts +70 -0
  17. package/dist-types/ts3.4/SyntheticsClient.d.ts +86 -0
  18. package/dist-types/ts3.4/commands/CreateCanaryCommand.d.ts +17 -0
  19. package/dist-types/ts3.4/commands/DeleteCanaryCommand.d.ts +17 -0
  20. package/dist-types/ts3.4/commands/DescribeCanariesCommand.d.ts +17 -0
  21. package/dist-types/ts3.4/commands/DescribeCanariesLastRunCommand.d.ts +17 -0
  22. package/dist-types/ts3.4/commands/DescribeRuntimeVersionsCommand.d.ts +17 -0
  23. package/dist-types/ts3.4/commands/GetCanaryCommand.d.ts +17 -0
  24. package/dist-types/ts3.4/commands/GetCanaryRunsCommand.d.ts +17 -0
  25. package/dist-types/ts3.4/commands/ListTagsForResourceCommand.d.ts +17 -0
  26. package/dist-types/ts3.4/commands/StartCanaryCommand.d.ts +17 -0
  27. package/dist-types/ts3.4/commands/StopCanaryCommand.d.ts +17 -0
  28. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +17 -0
  29. package/dist-types/ts3.4/commands/UntagResourceCommand.d.ts +17 -0
  30. package/dist-types/ts3.4/commands/UpdateCanaryCommand.d.ts +17 -0
  31. package/dist-types/ts3.4/commands/index.d.ts +13 -0
  32. package/dist-types/ts3.4/endpoints.d.ts +2 -0
  33. package/dist-types/ts3.4/index.d.ts +6 -0
  34. package/dist-types/ts3.4/models/SyntheticsServiceException.d.ts +6 -0
  35. package/dist-types/ts3.4/models/index.d.ts +1 -0
  36. package/dist-types/ts3.4/models/models_0.d.ts +645 -0
  37. package/dist-types/ts3.4/pagination/DescribeCanariesLastRunPaginator.d.ts +4 -0
  38. package/dist-types/ts3.4/pagination/DescribeCanariesPaginator.d.ts +4 -0
  39. package/dist-types/ts3.4/pagination/DescribeRuntimeVersionsPaginator.d.ts +4 -0
  40. package/dist-types/ts3.4/pagination/GetCanaryRunsPaginator.d.ts +4 -0
  41. package/dist-types/ts3.4/pagination/Interfaces.d.ts +6 -0
  42. package/dist-types/ts3.4/pagination/index.d.ts +5 -0
  43. package/dist-types/ts3.4/protocols/Aws_restJson1.d.ts +41 -0
  44. package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
  45. package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
  46. package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
  47. package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
  48. package/package.json +33 -33
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.deserializeAws_restJson1UpdateCanaryCommand = exports.deserializeAws_restJson1UntagResourceCommand = exports.deserializeAws_restJson1TagResourceCommand = exports.deserializeAws_restJson1StopCanaryCommand = exports.deserializeAws_restJson1StartCanaryCommand = exports.deserializeAws_restJson1ListTagsForResourceCommand = exports.deserializeAws_restJson1GetCanaryRunsCommand = exports.deserializeAws_restJson1GetCanaryCommand = exports.deserializeAws_restJson1DescribeRuntimeVersionsCommand = exports.deserializeAws_restJson1DescribeCanariesLastRunCommand = exports.deserializeAws_restJson1DescribeCanariesCommand = exports.deserializeAws_restJson1DeleteCanaryCommand = exports.deserializeAws_restJson1CreateCanaryCommand = exports.serializeAws_restJson1UpdateCanaryCommand = exports.serializeAws_restJson1UntagResourceCommand = exports.serializeAws_restJson1TagResourceCommand = exports.serializeAws_restJson1StopCanaryCommand = exports.serializeAws_restJson1StartCanaryCommand = exports.serializeAws_restJson1ListTagsForResourceCommand = exports.serializeAws_restJson1GetCanaryRunsCommand = exports.serializeAws_restJson1GetCanaryCommand = exports.serializeAws_restJson1DescribeRuntimeVersionsCommand = exports.serializeAws_restJson1DescribeCanariesLastRunCommand = exports.serializeAws_restJson1DescribeCanariesCommand = exports.serializeAws_restJson1DeleteCanaryCommand = exports.serializeAws_restJson1CreateCanaryCommand = void 0;
4
4
  const protocol_http_1 = require("@aws-sdk/protocol-http");
5
5
  const smithy_client_1 = require("@aws-sdk/smithy-client");
6
+ const models_0_1 = require("../models/models_0");
7
+ const SyntheticsServiceException_1 = require("../models/SyntheticsServiceException");
6
8
  const serializeAws_restJson1CreateCanaryCommand = async (input, context) => {
7
9
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
8
10
  const headers = {
@@ -86,6 +88,8 @@ const serializeAws_restJson1DescribeCanariesCommand = async (input, context) =>
86
88
  let body;
87
89
  body = JSON.stringify({
88
90
  ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
91
+ ...(input.Names !== undefined &&
92
+ input.Names !== null && { Names: serializeAws_restJson1DescribeCanariesNameFilter(input.Names, context) }),
89
93
  ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
90
94
  });
91
95
  return new protocol_http_1.HttpRequest({
@@ -108,6 +112,8 @@ const serializeAws_restJson1DescribeCanariesLastRunCommand = async (input, conte
108
112
  let body;
109
113
  body = JSON.stringify({
110
114
  ...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
115
+ ...(input.Names !== undefined &&
116
+ input.Names !== null && { Names: serializeAws_restJson1DescribeCanariesLastRunNameFilter(input.Names, context) }),
111
117
  ...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
112
118
  });
113
119
  return new protocol_http_1.HttpRequest({
@@ -426,35 +432,22 @@ const deserializeAws_restJson1CreateCanaryCommandError = async (output, context)
426
432
  switch (errorCode) {
427
433
  case "InternalServerException":
428
434
  case "com.amazonaws.synthetics#InternalServerException":
429
- response = {
430
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
431
- name: errorCode,
432
- $metadata: deserializeMetadata(output),
433
- };
434
- break;
435
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
436
+ case "RequestEntityTooLargeException":
437
+ case "com.amazonaws.synthetics#RequestEntityTooLargeException":
438
+ throw await deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context);
435
439
  case "ValidationException":
436
440
  case "com.amazonaws.synthetics#ValidationException":
437
- response = {
438
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
439
- name: errorCode,
440
- $metadata: deserializeMetadata(output),
441
- };
442
- break;
441
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
443
442
  default:
444
443
  const parsedBody = parsedOutput.body;
445
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
446
- response = {
447
- ...parsedBody,
448
- name: `${errorCode}`,
449
- message: parsedBody.message || parsedBody.Message || errorCode,
444
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
445
+ name: parsedBody.code || parsedBody.Code || errorCode,
450
446
  $fault: "client",
451
447
  $metadata: deserializeMetadata(output),
452
- };
448
+ });
449
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
453
450
  }
454
- const message = response.message || response.Message || errorCode;
455
- response.message = message;
456
- delete response.Message;
457
- return Promise.reject(Object.assign(new Error(message), response));
458
451
  };
459
452
  const deserializeAws_restJson1DeleteCanaryCommand = async (output, context) => {
460
453
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -478,51 +471,25 @@ const deserializeAws_restJson1DeleteCanaryCommandError = async (output, context)
478
471
  switch (errorCode) {
479
472
  case "ConflictException":
480
473
  case "com.amazonaws.synthetics#ConflictException":
481
- response = {
482
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
483
- name: errorCode,
484
- $metadata: deserializeMetadata(output),
485
- };
486
- break;
474
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
487
475
  case "InternalServerException":
488
476
  case "com.amazonaws.synthetics#InternalServerException":
489
- response = {
490
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
491
- name: errorCode,
492
- $metadata: deserializeMetadata(output),
493
- };
494
- break;
477
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
495
478
  case "ResourceNotFoundException":
496
479
  case "com.amazonaws.synthetics#ResourceNotFoundException":
497
- response = {
498
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
499
- name: errorCode,
500
- $metadata: deserializeMetadata(output),
501
- };
502
- break;
480
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
503
481
  case "ValidationException":
504
482
  case "com.amazonaws.synthetics#ValidationException":
505
- response = {
506
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
507
- name: errorCode,
508
- $metadata: deserializeMetadata(output),
509
- };
510
- break;
483
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
511
484
  default:
512
485
  const parsedBody = parsedOutput.body;
513
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
514
- response = {
515
- ...parsedBody,
516
- name: `${errorCode}`,
517
- message: parsedBody.message || parsedBody.Message || errorCode,
486
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
487
+ name: parsedBody.code || parsedBody.Code || errorCode,
518
488
  $fault: "client",
519
489
  $metadata: deserializeMetadata(output),
520
- };
490
+ });
491
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
521
492
  }
522
- const message = response.message || response.Message || errorCode;
523
- response.message = message;
524
- delete response.Message;
525
- return Promise.reject(Object.assign(new Error(message), response));
526
493
  };
527
494
  const deserializeAws_restJson1DescribeCanariesCommand = async (output, context) => {
528
495
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -554,35 +521,19 @@ const deserializeAws_restJson1DescribeCanariesCommandError = async (output, cont
554
521
  switch (errorCode) {
555
522
  case "InternalServerException":
556
523
  case "com.amazonaws.synthetics#InternalServerException":
557
- response = {
558
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
559
- name: errorCode,
560
- $metadata: deserializeMetadata(output),
561
- };
562
- break;
524
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
563
525
  case "ValidationException":
564
526
  case "com.amazonaws.synthetics#ValidationException":
565
- response = {
566
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
567
- name: errorCode,
568
- $metadata: deserializeMetadata(output),
569
- };
570
- break;
527
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
571
528
  default:
572
529
  const parsedBody = parsedOutput.body;
573
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
574
- response = {
575
- ...parsedBody,
576
- name: `${errorCode}`,
577
- message: parsedBody.message || parsedBody.Message || errorCode,
530
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
531
+ name: parsedBody.code || parsedBody.Code || errorCode,
578
532
  $fault: "client",
579
533
  $metadata: deserializeMetadata(output),
580
- };
534
+ });
535
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
581
536
  }
582
- const message = response.message || response.Message || errorCode;
583
- response.message = message;
584
- delete response.Message;
585
- return Promise.reject(Object.assign(new Error(message), response));
586
537
  };
587
538
  const deserializeAws_restJson1DescribeCanariesLastRunCommand = async (output, context) => {
588
539
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -614,35 +565,19 @@ const deserializeAws_restJson1DescribeCanariesLastRunCommandError = async (outpu
614
565
  switch (errorCode) {
615
566
  case "InternalServerException":
616
567
  case "com.amazonaws.synthetics#InternalServerException":
617
- response = {
618
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
619
- name: errorCode,
620
- $metadata: deserializeMetadata(output),
621
- };
622
- break;
568
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
623
569
  case "ValidationException":
624
570
  case "com.amazonaws.synthetics#ValidationException":
625
- response = {
626
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
627
- name: errorCode,
628
- $metadata: deserializeMetadata(output),
629
- };
630
- break;
571
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
631
572
  default:
632
573
  const parsedBody = parsedOutput.body;
633
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
634
- response = {
635
- ...parsedBody,
636
- name: `${errorCode}`,
637
- message: parsedBody.message || parsedBody.Message || errorCode,
574
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
575
+ name: parsedBody.code || parsedBody.Code || errorCode,
638
576
  $fault: "client",
639
577
  $metadata: deserializeMetadata(output),
640
- };
578
+ });
579
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
641
580
  }
642
- const message = response.message || response.Message || errorCode;
643
- response.message = message;
644
- delete response.Message;
645
- return Promise.reject(Object.assign(new Error(message), response));
646
581
  };
647
582
  const deserializeAws_restJson1DescribeRuntimeVersionsCommand = async (output, context) => {
648
583
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -674,35 +609,19 @@ const deserializeAws_restJson1DescribeRuntimeVersionsCommandError = async (outpu
674
609
  switch (errorCode) {
675
610
  case "InternalServerException":
676
611
  case "com.amazonaws.synthetics#InternalServerException":
677
- response = {
678
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
679
- name: errorCode,
680
- $metadata: deserializeMetadata(output),
681
- };
682
- break;
612
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
683
613
  case "ValidationException":
684
614
  case "com.amazonaws.synthetics#ValidationException":
685
- response = {
686
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
687
- name: errorCode,
688
- $metadata: deserializeMetadata(output),
689
- };
690
- break;
615
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
691
616
  default:
692
617
  const parsedBody = parsedOutput.body;
693
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
694
- response = {
695
- ...parsedBody,
696
- name: `${errorCode}`,
697
- message: parsedBody.message || parsedBody.Message || errorCode,
618
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
619
+ name: parsedBody.code || parsedBody.Code || errorCode,
698
620
  $fault: "client",
699
621
  $metadata: deserializeMetadata(output),
700
- };
622
+ });
623
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
701
624
  }
702
- const message = response.message || response.Message || errorCode;
703
- response.message = message;
704
- delete response.Message;
705
- return Promise.reject(Object.assign(new Error(message), response));
706
625
  };
707
626
  const deserializeAws_restJson1GetCanaryCommand = async (output, context) => {
708
627
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -730,35 +649,19 @@ const deserializeAws_restJson1GetCanaryCommandError = async (output, context) =>
730
649
  switch (errorCode) {
731
650
  case "InternalServerException":
732
651
  case "com.amazonaws.synthetics#InternalServerException":
733
- response = {
734
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
735
- name: errorCode,
736
- $metadata: deserializeMetadata(output),
737
- };
738
- break;
652
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
739
653
  case "ValidationException":
740
654
  case "com.amazonaws.synthetics#ValidationException":
741
- response = {
742
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
743
- name: errorCode,
744
- $metadata: deserializeMetadata(output),
745
- };
746
- break;
655
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
747
656
  default:
748
657
  const parsedBody = parsedOutput.body;
749
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
750
- response = {
751
- ...parsedBody,
752
- name: `${errorCode}`,
753
- message: parsedBody.message || parsedBody.Message || errorCode,
658
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
659
+ name: parsedBody.code || parsedBody.Code || errorCode,
754
660
  $fault: "client",
755
661
  $metadata: deserializeMetadata(output),
756
- };
662
+ });
663
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
757
664
  }
758
- const message = response.message || response.Message || errorCode;
759
- response.message = message;
760
- delete response.Message;
761
- return Promise.reject(Object.assign(new Error(message), response));
762
665
  };
763
666
  const deserializeAws_restJson1GetCanaryRunsCommand = async (output, context) => {
764
667
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -790,43 +693,22 @@ const deserializeAws_restJson1GetCanaryRunsCommandError = async (output, context
790
693
  switch (errorCode) {
791
694
  case "InternalServerException":
792
695
  case "com.amazonaws.synthetics#InternalServerException":
793
- response = {
794
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
795
- name: errorCode,
796
- $metadata: deserializeMetadata(output),
797
- };
798
- break;
696
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
799
697
  case "ResourceNotFoundException":
800
698
  case "com.amazonaws.synthetics#ResourceNotFoundException":
801
- response = {
802
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
803
- name: errorCode,
804
- $metadata: deserializeMetadata(output),
805
- };
806
- break;
699
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
807
700
  case "ValidationException":
808
701
  case "com.amazonaws.synthetics#ValidationException":
809
- response = {
810
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
811
- name: errorCode,
812
- $metadata: deserializeMetadata(output),
813
- };
814
- break;
702
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
815
703
  default:
816
704
  const parsedBody = parsedOutput.body;
817
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
818
- response = {
819
- ...parsedBody,
820
- name: `${errorCode}`,
821
- message: parsedBody.message || parsedBody.Message || errorCode,
705
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
706
+ name: parsedBody.code || parsedBody.Code || errorCode,
822
707
  $fault: "client",
823
708
  $metadata: deserializeMetadata(output),
824
- };
709
+ });
710
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
825
711
  }
826
- const message = response.message || response.Message || errorCode;
827
- response.message = message;
828
- delete response.Message;
829
- return Promise.reject(Object.assign(new Error(message), response));
830
712
  };
831
713
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
832
714
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -854,43 +736,22 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
854
736
  switch (errorCode) {
855
737
  case "InternalServerException":
856
738
  case "com.amazonaws.synthetics#InternalServerException":
857
- response = {
858
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
859
- name: errorCode,
860
- $metadata: deserializeMetadata(output),
861
- };
862
- break;
739
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
863
740
  case "ResourceNotFoundException":
864
741
  case "com.amazonaws.synthetics#ResourceNotFoundException":
865
- response = {
866
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
867
- name: errorCode,
868
- $metadata: deserializeMetadata(output),
869
- };
870
- break;
742
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
871
743
  case "ValidationException":
872
744
  case "com.amazonaws.synthetics#ValidationException":
873
- response = {
874
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
875
- name: errorCode,
876
- $metadata: deserializeMetadata(output),
877
- };
878
- break;
745
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
879
746
  default:
880
747
  const parsedBody = parsedOutput.body;
881
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
882
- response = {
883
- ...parsedBody,
884
- name: `${errorCode}`,
885
- message: parsedBody.message || parsedBody.Message || errorCode,
748
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
749
+ name: parsedBody.code || parsedBody.Code || errorCode,
886
750
  $fault: "client",
887
751
  $metadata: deserializeMetadata(output),
888
- };
752
+ });
753
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
889
754
  }
890
- const message = response.message || response.Message || errorCode;
891
- response.message = message;
892
- delete response.Message;
893
- return Promise.reject(Object.assign(new Error(message), response));
894
755
  };
895
756
  const deserializeAws_restJson1StartCanaryCommand = async (output, context) => {
896
757
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -914,51 +775,25 @@ const deserializeAws_restJson1StartCanaryCommandError = async (output, context)
914
775
  switch (errorCode) {
915
776
  case "ConflictException":
916
777
  case "com.amazonaws.synthetics#ConflictException":
917
- response = {
918
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
919
- name: errorCode,
920
- $metadata: deserializeMetadata(output),
921
- };
922
- break;
778
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
923
779
  case "InternalServerException":
924
780
  case "com.amazonaws.synthetics#InternalServerException":
925
- response = {
926
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
927
- name: errorCode,
928
- $metadata: deserializeMetadata(output),
929
- };
930
- break;
781
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
931
782
  case "ResourceNotFoundException":
932
783
  case "com.amazonaws.synthetics#ResourceNotFoundException":
933
- response = {
934
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
935
- name: errorCode,
936
- $metadata: deserializeMetadata(output),
937
- };
938
- break;
784
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
939
785
  case "ValidationException":
940
786
  case "com.amazonaws.synthetics#ValidationException":
941
- response = {
942
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
943
- name: errorCode,
944
- $metadata: deserializeMetadata(output),
945
- };
946
- break;
787
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
947
788
  default:
948
789
  const parsedBody = parsedOutput.body;
949
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
950
- response = {
951
- ...parsedBody,
952
- name: `${errorCode}`,
953
- message: parsedBody.message || parsedBody.Message || errorCode,
790
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
791
+ name: parsedBody.code || parsedBody.Code || errorCode,
954
792
  $fault: "client",
955
793
  $metadata: deserializeMetadata(output),
956
- };
794
+ });
795
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
957
796
  }
958
- const message = response.message || response.Message || errorCode;
959
- response.message = message;
960
- delete response.Message;
961
- return Promise.reject(Object.assign(new Error(message), response));
962
797
  };
963
798
  const deserializeAws_restJson1StopCanaryCommand = async (output, context) => {
964
799
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -982,51 +817,25 @@ const deserializeAws_restJson1StopCanaryCommandError = async (output, context) =
982
817
  switch (errorCode) {
983
818
  case "ConflictException":
984
819
  case "com.amazonaws.synthetics#ConflictException":
985
- response = {
986
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
987
- name: errorCode,
988
- $metadata: deserializeMetadata(output),
989
- };
990
- break;
820
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
991
821
  case "InternalServerException":
992
822
  case "com.amazonaws.synthetics#InternalServerException":
993
- response = {
994
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
995
- name: errorCode,
996
- $metadata: deserializeMetadata(output),
997
- };
998
- break;
823
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
999
824
  case "ResourceNotFoundException":
1000
825
  case "com.amazonaws.synthetics#ResourceNotFoundException":
1001
- response = {
1002
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1003
- name: errorCode,
1004
- $metadata: deserializeMetadata(output),
1005
- };
1006
- break;
826
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1007
827
  case "ValidationException":
1008
828
  case "com.amazonaws.synthetics#ValidationException":
1009
- response = {
1010
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1011
- name: errorCode,
1012
- $metadata: deserializeMetadata(output),
1013
- };
1014
- break;
829
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1015
830
  default:
1016
831
  const parsedBody = parsedOutput.body;
1017
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1018
- response = {
1019
- ...parsedBody,
1020
- name: `${errorCode}`,
1021
- message: parsedBody.message || parsedBody.Message || errorCode,
832
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
833
+ name: parsedBody.code || parsedBody.Code || errorCode,
1022
834
  $fault: "client",
1023
835
  $metadata: deserializeMetadata(output),
1024
- };
836
+ });
837
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1025
838
  }
1026
- const message = response.message || response.Message || errorCode;
1027
- response.message = message;
1028
- delete response.Message;
1029
- return Promise.reject(Object.assign(new Error(message), response));
1030
839
  };
1031
840
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1032
841
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1050,43 +859,22 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1050
859
  switch (errorCode) {
1051
860
  case "InternalServerException":
1052
861
  case "com.amazonaws.synthetics#InternalServerException":
1053
- response = {
1054
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1055
- name: errorCode,
1056
- $metadata: deserializeMetadata(output),
1057
- };
1058
- break;
862
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1059
863
  case "ResourceNotFoundException":
1060
864
  case "com.amazonaws.synthetics#ResourceNotFoundException":
1061
- response = {
1062
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1063
- name: errorCode,
1064
- $metadata: deserializeMetadata(output),
1065
- };
1066
- break;
865
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1067
866
  case "ValidationException":
1068
867
  case "com.amazonaws.synthetics#ValidationException":
1069
- response = {
1070
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1071
- name: errorCode,
1072
- $metadata: deserializeMetadata(output),
1073
- };
1074
- break;
868
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1075
869
  default:
1076
870
  const parsedBody = parsedOutput.body;
1077
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1078
- response = {
1079
- ...parsedBody,
1080
- name: `${errorCode}`,
1081
- message: parsedBody.message || parsedBody.Message || errorCode,
871
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
872
+ name: parsedBody.code || parsedBody.Code || errorCode,
1082
873
  $fault: "client",
1083
874
  $metadata: deserializeMetadata(output),
1084
- };
875
+ });
876
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1085
877
  }
1086
- const message = response.message || response.Message || errorCode;
1087
- response.message = message;
1088
- delete response.Message;
1089
- return Promise.reject(Object.assign(new Error(message), response));
1090
878
  };
1091
879
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
1092
880
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1110,43 +898,22 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1110
898
  switch (errorCode) {
1111
899
  case "InternalServerException":
1112
900
  case "com.amazonaws.synthetics#InternalServerException":
1113
- response = {
1114
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1115
- name: errorCode,
1116
- $metadata: deserializeMetadata(output),
1117
- };
1118
- break;
901
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
1119
902
  case "ResourceNotFoundException":
1120
903
  case "com.amazonaws.synthetics#ResourceNotFoundException":
1121
- response = {
1122
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1123
- name: errorCode,
1124
- $metadata: deserializeMetadata(output),
1125
- };
1126
- break;
904
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1127
905
  case "ValidationException":
1128
906
  case "com.amazonaws.synthetics#ValidationException":
1129
- response = {
1130
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1131
- name: errorCode,
1132
- $metadata: deserializeMetadata(output),
1133
- };
1134
- break;
907
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1135
908
  default:
1136
909
  const parsedBody = parsedOutput.body;
1137
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1138
- response = {
1139
- ...parsedBody,
1140
- name: `${errorCode}`,
1141
- message: parsedBody.message || parsedBody.Message || errorCode,
910
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
911
+ name: parsedBody.code || parsedBody.Code || errorCode,
1142
912
  $fault: "client",
1143
913
  $metadata: deserializeMetadata(output),
1144
- };
914
+ });
915
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1145
916
  }
1146
- const message = response.message || response.Message || errorCode;
1147
- response.message = message;
1148
- delete response.Message;
1149
- return Promise.reject(Object.assign(new Error(message), response));
1150
917
  };
1151
918
  const deserializeAws_restJson1UpdateCanaryCommand = async (output, context) => {
1152
919
  if (output.statusCode !== 200 && output.statusCode >= 300) {
@@ -1170,103 +937,88 @@ const deserializeAws_restJson1UpdateCanaryCommandError = async (output, context)
1170
937
  switch (errorCode) {
1171
938
  case "ConflictException":
1172
939
  case "com.amazonaws.synthetics#ConflictException":
1173
- response = {
1174
- ...(await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context)),
1175
- name: errorCode,
1176
- $metadata: deserializeMetadata(output),
1177
- };
1178
- break;
940
+ throw await deserializeAws_restJson1ConflictExceptionResponse(parsedOutput, context);
1179
941
  case "InternalServerException":
1180
942
  case "com.amazonaws.synthetics#InternalServerException":
1181
- response = {
1182
- ...(await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context)),
1183
- name: errorCode,
1184
- $metadata: deserializeMetadata(output),
1185
- };
1186
- break;
943
+ throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
944
+ case "RequestEntityTooLargeException":
945
+ case "com.amazonaws.synthetics#RequestEntityTooLargeException":
946
+ throw await deserializeAws_restJson1RequestEntityTooLargeExceptionResponse(parsedOutput, context);
1187
947
  case "ResourceNotFoundException":
1188
948
  case "com.amazonaws.synthetics#ResourceNotFoundException":
1189
- response = {
1190
- ...(await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context)),
1191
- name: errorCode,
1192
- $metadata: deserializeMetadata(output),
1193
- };
1194
- break;
949
+ throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1195
950
  case "ValidationException":
1196
951
  case "com.amazonaws.synthetics#ValidationException":
1197
- response = {
1198
- ...(await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context)),
1199
- name: errorCode,
1200
- $metadata: deserializeMetadata(output),
1201
- };
1202
- break;
952
+ throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1203
953
  default:
1204
954
  const parsedBody = parsedOutput.body;
1205
- errorCode = parsedBody.code || parsedBody.Code || errorCode;
1206
- response = {
1207
- ...parsedBody,
1208
- name: `${errorCode}`,
1209
- message: parsedBody.message || parsedBody.Message || errorCode,
955
+ response = new SyntheticsServiceException_1.SyntheticsServiceException({
956
+ name: parsedBody.code || parsedBody.Code || errorCode,
1210
957
  $fault: "client",
1211
958
  $metadata: deserializeMetadata(output),
1212
- };
959
+ });
960
+ throw smithy_client_1.decorateServiceException(response, parsedBody);
1213
961
  }
1214
- const message = response.message || response.Message || errorCode;
1215
- response.message = message;
1216
- delete response.Message;
1217
- return Promise.reject(Object.assign(new Error(message), response));
1218
962
  };
1219
963
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
1220
- const contents = {
1221
- name: "ConflictException",
1222
- $fault: "client",
1223
- $metadata: deserializeMetadata(parsedOutput),
1224
- Message: undefined,
1225
- };
964
+ const contents = {};
1226
965
  const data = parsedOutput.body;
1227
966
  if (data.Message !== undefined && data.Message !== null) {
1228
967
  contents.Message = smithy_client_1.expectString(data.Message);
1229
968
  }
1230
- return contents;
969
+ const exception = new models_0_1.ConflictException({
970
+ $metadata: deserializeMetadata(parsedOutput),
971
+ ...contents,
972
+ });
973
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1231
974
  };
1232
975
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
1233
- const contents = {
1234
- name: "InternalServerException",
1235
- $fault: "server",
976
+ const contents = {};
977
+ const data = parsedOutput.body;
978
+ if (data.Message !== undefined && data.Message !== null) {
979
+ contents.Message = smithy_client_1.expectString(data.Message);
980
+ }
981
+ const exception = new models_0_1.InternalServerException({
1236
982
  $metadata: deserializeMetadata(parsedOutput),
1237
- Message: undefined,
1238
- };
983
+ ...contents,
984
+ });
985
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
986
+ };
987
+ const deserializeAws_restJson1RequestEntityTooLargeExceptionResponse = async (parsedOutput, context) => {
988
+ const contents = {};
1239
989
  const data = parsedOutput.body;
1240
990
  if (data.Message !== undefined && data.Message !== null) {
1241
991
  contents.Message = smithy_client_1.expectString(data.Message);
1242
992
  }
1243
- return contents;
993
+ const exception = new models_0_1.RequestEntityTooLargeException({
994
+ $metadata: deserializeMetadata(parsedOutput),
995
+ ...contents,
996
+ });
997
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1244
998
  };
1245
999
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1246
- const contents = {
1247
- name: "ResourceNotFoundException",
1248
- $fault: "client",
1249
- $metadata: deserializeMetadata(parsedOutput),
1250
- Message: undefined,
1251
- };
1000
+ const contents = {};
1252
1001
  const data = parsedOutput.body;
1253
1002
  if (data.Message !== undefined && data.Message !== null) {
1254
1003
  contents.Message = smithy_client_1.expectString(data.Message);
1255
1004
  }
1256
- return contents;
1005
+ const exception = new models_0_1.ResourceNotFoundException({
1006
+ $metadata: deserializeMetadata(parsedOutput),
1007
+ ...contents,
1008
+ });
1009
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1257
1010
  };
1258
1011
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
1259
- const contents = {
1260
- name: "ValidationException",
1261
- $fault: "client",
1262
- $metadata: deserializeMetadata(parsedOutput),
1263
- Message: undefined,
1264
- };
1012
+ const contents = {};
1265
1013
  const data = parsedOutput.body;
1266
1014
  if (data.Message !== undefined && data.Message !== null) {
1267
1015
  contents.Message = smithy_client_1.expectString(data.Message);
1268
1016
  }
1269
- return contents;
1017
+ const exception = new models_0_1.ValidationException({
1018
+ $metadata: deserializeMetadata(parsedOutput),
1019
+ ...contents,
1020
+ });
1021
+ return smithy_client_1.decorateServiceException(exception, parsedOutput.body);
1270
1022
  };
1271
1023
  const serializeAws_restJson1ArtifactConfigInput = (input, context) => {
1272
1024
  return {
@@ -1334,6 +1086,26 @@ const serializeAws_restJson1CanaryScheduleInput = (input, context) => {
1334
1086
  ...(input.Expression !== undefined && input.Expression !== null && { Expression: input.Expression }),
1335
1087
  };
1336
1088
  };
1089
+ const serializeAws_restJson1DescribeCanariesLastRunNameFilter = (input, context) => {
1090
+ return input
1091
+ .filter((e) => e != null)
1092
+ .map((entry) => {
1093
+ if (entry === null) {
1094
+ return null;
1095
+ }
1096
+ return entry;
1097
+ });
1098
+ };
1099
+ const serializeAws_restJson1DescribeCanariesNameFilter = (input, context) => {
1100
+ return input
1101
+ .filter((e) => e != null)
1102
+ .map((entry) => {
1103
+ if (entry === null) {
1104
+ return null;
1105
+ }
1106
+ return entry;
1107
+ });
1108
+ };
1337
1109
  const serializeAws_restJson1EnvironmentVariablesMap = (input, context) => {
1338
1110
  return Object.entries(input).reduce((acc, [key, value]) => {
1339
1111
  if (value === null) {
@@ -1419,7 +1191,7 @@ const deserializeAws_restJson1BaseScreenshot = (output, context) => {
1419
1191
  };
1420
1192
  };
1421
1193
  const deserializeAws_restJson1BaseScreenshotIgnoreCoordinates = (output, context) => {
1422
- return (output || [])
1194
+ const retVal = (output || [])
1423
1195
  .filter((e) => e != null)
1424
1196
  .map((entry) => {
1425
1197
  if (entry === null) {
@@ -1427,9 +1199,10 @@ const deserializeAws_restJson1BaseScreenshotIgnoreCoordinates = (output, context
1427
1199
  }
1428
1200
  return smithy_client_1.expectString(entry);
1429
1201
  });
1202
+ return retVal;
1430
1203
  };
1431
1204
  const deserializeAws_restJson1BaseScreenshots = (output, context) => {
1432
- return (output || [])
1205
+ const retVal = (output || [])
1433
1206
  .filter((e) => e != null)
1434
1207
  .map((entry) => {
1435
1208
  if (entry === null) {
@@ -1437,9 +1210,10 @@ const deserializeAws_restJson1BaseScreenshots = (output, context) => {
1437
1210
  }
1438
1211
  return deserializeAws_restJson1BaseScreenshot(entry, context);
1439
1212
  });
1213
+ return retVal;
1440
1214
  };
1441
1215
  const deserializeAws_restJson1Canaries = (output, context) => {
1442
- return (output || [])
1216
+ const retVal = (output || [])
1443
1217
  .filter((e) => e != null)
1444
1218
  .map((entry) => {
1445
1219
  if (entry === null) {
@@ -1447,9 +1221,10 @@ const deserializeAws_restJson1Canaries = (output, context) => {
1447
1221
  }
1448
1222
  return deserializeAws_restJson1Canary(entry, context);
1449
1223
  });
1224
+ return retVal;
1450
1225
  };
1451
1226
  const deserializeAws_restJson1CanariesLastRun = (output, context) => {
1452
- return (output || [])
1227
+ const retVal = (output || [])
1453
1228
  .filter((e) => e != null)
1454
1229
  .map((entry) => {
1455
1230
  if (entry === null) {
@@ -1457,6 +1232,7 @@ const deserializeAws_restJson1CanariesLastRun = (output, context) => {
1457
1232
  }
1458
1233
  return deserializeAws_restJson1CanaryLastRun(entry, context);
1459
1234
  });
1235
+ return retVal;
1460
1236
  };
1461
1237
  const deserializeAws_restJson1Canary = (output, context) => {
1462
1238
  return {
@@ -1532,7 +1308,7 @@ const deserializeAws_restJson1CanaryRunConfigOutput = (output, context) => {
1532
1308
  };
1533
1309
  };
1534
1310
  const deserializeAws_restJson1CanaryRuns = (output, context) => {
1535
- return (output || [])
1311
+ const retVal = (output || [])
1536
1312
  .filter((e) => e != null)
1537
1313
  .map((entry) => {
1538
1314
  if (entry === null) {
@@ -1540,6 +1316,7 @@ const deserializeAws_restJson1CanaryRuns = (output, context) => {
1540
1316
  }
1541
1317
  return deserializeAws_restJson1CanaryRun(entry, context);
1542
1318
  });
1319
+ return retVal;
1543
1320
  };
1544
1321
  const deserializeAws_restJson1CanaryRunStatus = (output, context) => {
1545
1322
  return {
@@ -1600,7 +1377,7 @@ const deserializeAws_restJson1RuntimeVersion = (output, context) => {
1600
1377
  };
1601
1378
  };
1602
1379
  const deserializeAws_restJson1RuntimeVersionList = (output, context) => {
1603
- return (output || [])
1380
+ const retVal = (output || [])
1604
1381
  .filter((e) => e != null)
1605
1382
  .map((entry) => {
1606
1383
  if (entry === null) {
@@ -1608,6 +1385,7 @@ const deserializeAws_restJson1RuntimeVersionList = (output, context) => {
1608
1385
  }
1609
1386
  return deserializeAws_restJson1RuntimeVersion(entry, context);
1610
1387
  });
1388
+ return retVal;
1611
1389
  };
1612
1390
  const deserializeAws_restJson1S3EncryptionConfig = (output, context) => {
1613
1391
  return {
@@ -1616,7 +1394,7 @@ const deserializeAws_restJson1S3EncryptionConfig = (output, context) => {
1616
1394
  };
1617
1395
  };
1618
1396
  const deserializeAws_restJson1SecurityGroupIds = (output, context) => {
1619
- return (output || [])
1397
+ const retVal = (output || [])
1620
1398
  .filter((e) => e != null)
1621
1399
  .map((entry) => {
1622
1400
  if (entry === null) {
@@ -1624,9 +1402,10 @@ const deserializeAws_restJson1SecurityGroupIds = (output, context) => {
1624
1402
  }
1625
1403
  return smithy_client_1.expectString(entry);
1626
1404
  });
1405
+ return retVal;
1627
1406
  };
1628
1407
  const deserializeAws_restJson1SubnetIds = (output, context) => {
1629
- return (output || [])
1408
+ const retVal = (output || [])
1630
1409
  .filter((e) => e != null)
1631
1410
  .map((entry) => {
1632
1411
  if (entry === null) {
@@ -1634,6 +1413,7 @@ const deserializeAws_restJson1SubnetIds = (output, context) => {
1634
1413
  }
1635
1414
  return smithy_client_1.expectString(entry);
1636
1415
  });
1416
+ return retVal;
1637
1417
  };
1638
1418
  const deserializeAws_restJson1TagMap = (output, context) => {
1639
1419
  return Object.entries(output).reduce((acc, [key, value]) => {