@aws-sdk/client-appflow 3.141.0 → 3.150.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.
@@ -325,16 +325,7 @@ const serializeAws_restJson1ListTagsForResourceCommand = async (input, context)
325
325
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
326
326
  const headers = {};
327
327
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
328
- if (input.resourceArn !== undefined) {
329
- const labelValue = input.resourceArn;
330
- if (labelValue.length <= 0) {
331
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
332
- }
333
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
334
- }
335
- else {
336
- throw new Error("No value provided for input HTTP label: resourceArn.");
337
- }
328
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
338
329
  let body;
339
330
  return new protocol_http_1.HttpRequest({
340
331
  protocol,
@@ -421,16 +412,7 @@ const serializeAws_restJson1TagResourceCommand = async (input, context) => {
421
412
  "content-type": "application/json",
422
413
  };
423
414
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
424
- if (input.resourceArn !== undefined) {
425
- const labelValue = input.resourceArn;
426
- if (labelValue.length <= 0) {
427
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
428
- }
429
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
430
- }
431
- else {
432
- throw new Error("No value provided for input HTTP label: resourceArn.");
433
- }
415
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
434
416
  let body;
435
417
  body = JSON.stringify({
436
418
  ...(input.tags != null && { tags: serializeAws_restJson1TagMap(input.tags, context) }),
@@ -472,19 +454,10 @@ const serializeAws_restJson1UntagResourceCommand = async (input, context) => {
472
454
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
473
455
  const headers = {};
474
456
  let resolvedPath = `${(basePath === null || basePath === void 0 ? void 0 : basePath.endsWith("/")) ? basePath.slice(0, -1) : basePath || ""}` + "/tags/{resourceArn}";
475
- if (input.resourceArn !== undefined) {
476
- const labelValue = input.resourceArn;
477
- if (labelValue.length <= 0) {
478
- throw new Error("Empty value provided for input HTTP label: resourceArn.");
479
- }
480
- resolvedPath = resolvedPath.replace("{resourceArn}", (0, smithy_client_1.extendedEncodeURIComponent)(labelValue));
481
- }
482
- else {
483
- throw new Error("No value provided for input HTTP label: resourceArn.");
484
- }
485
- const query = {
486
- ...(input.tagKeys !== undefined && { tagKeys: (input.tagKeys || []).map((_entry) => _entry) }),
487
- };
457
+ resolvedPath = (0, smithy_client_1.resolvedPath)(resolvedPath, input, "resourceArn", () => input.resourceArn, "{resourceArn}", false);
458
+ const query = map({
459
+ tagKeys: [() => input.tagKeys !== void 0, () => (input.tagKeys || []).map((_entry) => _entry)],
460
+ });
488
461
  let body;
489
462
  return new protocol_http_1.HttpRequest({
490
463
  protocol,
@@ -559,15 +532,14 @@ const deserializeAws_restJson1CreateConnectorProfileCommand = async (output, con
559
532
  if (output.statusCode !== 200 && output.statusCode >= 300) {
560
533
  return deserializeAws_restJson1CreateConnectorProfileCommandError(output, context);
561
534
  }
562
- const contents = {
535
+ const contents = map({
563
536
  $metadata: deserializeMetadata(output),
564
- connectorProfileArn: undefined,
565
- };
537
+ });
566
538
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
567
- if (data.connectorProfileArn !== undefined && data.connectorProfileArn !== null) {
539
+ if (data.connectorProfileArn != null) {
568
540
  contents.connectorProfileArn = (0, smithy_client_1.expectString)(data.connectorProfileArn);
569
541
  }
570
- return Promise.resolve(contents);
542
+ return contents;
571
543
  };
572
544
  exports.deserializeAws_restJson1CreateConnectorProfileCommand = deserializeAws_restJson1CreateConnectorProfileCommand;
573
545
  const deserializeAws_restJson1CreateConnectorProfileCommandError = async (output, context) => {
@@ -575,7 +547,6 @@ const deserializeAws_restJson1CreateConnectorProfileCommandError = async (output
575
547
  ...output,
576
548
  body: await parseBody(output.body, context),
577
549
  };
578
- let response;
579
550
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
580
551
  switch (errorCode) {
581
552
  case "ConflictException":
@@ -595,33 +566,29 @@ const deserializeAws_restJson1CreateConnectorProfileCommandError = async (output
595
566
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
596
567
  default:
597
568
  const parsedBody = parsedOutput.body;
598
- const $metadata = deserializeMetadata(output);
599
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
600
- response = new AppflowServiceException_1.AppflowServiceException({
601
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
602
- $fault: "client",
603
- $metadata,
569
+ (0, smithy_client_1.throwDefaultError)({
570
+ output,
571
+ parsedBody,
572
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
573
+ errorCode,
604
574
  });
605
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
606
575
  }
607
576
  };
608
577
  const deserializeAws_restJson1CreateFlowCommand = async (output, context) => {
609
578
  if (output.statusCode !== 200 && output.statusCode >= 300) {
610
579
  return deserializeAws_restJson1CreateFlowCommandError(output, context);
611
580
  }
612
- const contents = {
581
+ const contents = map({
613
582
  $metadata: deserializeMetadata(output),
614
- flowArn: undefined,
615
- flowStatus: undefined,
616
- };
583
+ });
617
584
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
618
- if (data.flowArn !== undefined && data.flowArn !== null) {
585
+ if (data.flowArn != null) {
619
586
  contents.flowArn = (0, smithy_client_1.expectString)(data.flowArn);
620
587
  }
621
- if (data.flowStatus !== undefined && data.flowStatus !== null) {
588
+ if (data.flowStatus != null) {
622
589
  contents.flowStatus = (0, smithy_client_1.expectString)(data.flowStatus);
623
590
  }
624
- return Promise.resolve(contents);
591
+ return contents;
625
592
  };
626
593
  exports.deserializeAws_restJson1CreateFlowCommand = deserializeAws_restJson1CreateFlowCommand;
627
594
  const deserializeAws_restJson1CreateFlowCommandError = async (output, context) => {
@@ -629,7 +596,6 @@ const deserializeAws_restJson1CreateFlowCommandError = async (output, context) =
629
596
  ...output,
630
597
  body: await parseBody(output.body, context),
631
598
  };
632
- let response;
633
599
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
634
600
  switch (errorCode) {
635
601
  case "ConflictException":
@@ -655,25 +621,23 @@ const deserializeAws_restJson1CreateFlowCommandError = async (output, context) =
655
621
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
656
622
  default:
657
623
  const parsedBody = parsedOutput.body;
658
- const $metadata = deserializeMetadata(output);
659
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
660
- response = new AppflowServiceException_1.AppflowServiceException({
661
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
662
- $fault: "client",
663
- $metadata,
624
+ (0, smithy_client_1.throwDefaultError)({
625
+ output,
626
+ parsedBody,
627
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
628
+ errorCode,
664
629
  });
665
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
666
630
  }
667
631
  };
668
632
  const deserializeAws_restJson1DeleteConnectorProfileCommand = async (output, context) => {
669
633
  if (output.statusCode !== 200 && output.statusCode >= 300) {
670
634
  return deserializeAws_restJson1DeleteConnectorProfileCommandError(output, context);
671
635
  }
672
- const contents = {
636
+ const contents = map({
673
637
  $metadata: deserializeMetadata(output),
674
- };
638
+ });
675
639
  await collectBody(output.body, context);
676
- return Promise.resolve(contents);
640
+ return contents;
677
641
  };
678
642
  exports.deserializeAws_restJson1DeleteConnectorProfileCommand = deserializeAws_restJson1DeleteConnectorProfileCommand;
679
643
  const deserializeAws_restJson1DeleteConnectorProfileCommandError = async (output, context) => {
@@ -681,7 +645,6 @@ const deserializeAws_restJson1DeleteConnectorProfileCommandError = async (output
681
645
  ...output,
682
646
  body: await parseBody(output.body, context),
683
647
  };
684
- let response;
685
648
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
686
649
  switch (errorCode) {
687
650
  case "ConflictException":
@@ -695,25 +658,23 @@ const deserializeAws_restJson1DeleteConnectorProfileCommandError = async (output
695
658
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
696
659
  default:
697
660
  const parsedBody = parsedOutput.body;
698
- const $metadata = deserializeMetadata(output);
699
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
700
- response = new AppflowServiceException_1.AppflowServiceException({
701
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
702
- $fault: "client",
703
- $metadata,
661
+ (0, smithy_client_1.throwDefaultError)({
662
+ output,
663
+ parsedBody,
664
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
665
+ errorCode,
704
666
  });
705
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
706
667
  }
707
668
  };
708
669
  const deserializeAws_restJson1DeleteFlowCommand = async (output, context) => {
709
670
  if (output.statusCode !== 200 && output.statusCode >= 300) {
710
671
  return deserializeAws_restJson1DeleteFlowCommandError(output, context);
711
672
  }
712
- const contents = {
673
+ const contents = map({
713
674
  $metadata: deserializeMetadata(output),
714
- };
675
+ });
715
676
  await collectBody(output.body, context);
716
- return Promise.resolve(contents);
677
+ return contents;
717
678
  };
718
679
  exports.deserializeAws_restJson1DeleteFlowCommand = deserializeAws_restJson1DeleteFlowCommand;
719
680
  const deserializeAws_restJson1DeleteFlowCommandError = async (output, context) => {
@@ -721,7 +682,6 @@ const deserializeAws_restJson1DeleteFlowCommandError = async (output, context) =
721
682
  ...output,
722
683
  body: await parseBody(output.body, context),
723
684
  };
724
- let response;
725
685
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
726
686
  switch (errorCode) {
727
687
  case "ConflictException":
@@ -735,29 +695,26 @@ const deserializeAws_restJson1DeleteFlowCommandError = async (output, context) =
735
695
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
736
696
  default:
737
697
  const parsedBody = parsedOutput.body;
738
- const $metadata = deserializeMetadata(output);
739
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
740
- response = new AppflowServiceException_1.AppflowServiceException({
741
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
742
- $fault: "client",
743
- $metadata,
698
+ (0, smithy_client_1.throwDefaultError)({
699
+ output,
700
+ parsedBody,
701
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
702
+ errorCode,
744
703
  });
745
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
746
704
  }
747
705
  };
748
706
  const deserializeAws_restJson1DescribeConnectorCommand = async (output, context) => {
749
707
  if (output.statusCode !== 200 && output.statusCode >= 300) {
750
708
  return deserializeAws_restJson1DescribeConnectorCommandError(output, context);
751
709
  }
752
- const contents = {
710
+ const contents = map({
753
711
  $metadata: deserializeMetadata(output),
754
- connectorConfiguration: undefined,
755
- };
712
+ });
756
713
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
757
- if (data.connectorConfiguration !== undefined && data.connectorConfiguration !== null) {
714
+ if (data.connectorConfiguration != null) {
758
715
  contents.connectorConfiguration = deserializeAws_restJson1ConnectorConfiguration(data.connectorConfiguration, context);
759
716
  }
760
- return Promise.resolve(contents);
717
+ return contents;
761
718
  };
762
719
  exports.deserializeAws_restJson1DescribeConnectorCommand = deserializeAws_restJson1DescribeConnectorCommand;
763
720
  const deserializeAws_restJson1DescribeConnectorCommandError = async (output, context) => {
@@ -765,7 +722,6 @@ const deserializeAws_restJson1DescribeConnectorCommandError = async (output, con
765
722
  ...output,
766
723
  body: await parseBody(output.body, context),
767
724
  };
768
- let response;
769
725
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
770
726
  switch (errorCode) {
771
727
  case "InternalServerException":
@@ -779,29 +735,26 @@ const deserializeAws_restJson1DescribeConnectorCommandError = async (output, con
779
735
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
780
736
  default:
781
737
  const parsedBody = parsedOutput.body;
782
- const $metadata = deserializeMetadata(output);
783
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
784
- response = new AppflowServiceException_1.AppflowServiceException({
785
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
786
- $fault: "client",
787
- $metadata,
738
+ (0, smithy_client_1.throwDefaultError)({
739
+ output,
740
+ parsedBody,
741
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
742
+ errorCode,
788
743
  });
789
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
790
744
  }
791
745
  };
792
746
  const deserializeAws_restJson1DescribeConnectorEntityCommand = async (output, context) => {
793
747
  if (output.statusCode !== 200 && output.statusCode >= 300) {
794
748
  return deserializeAws_restJson1DescribeConnectorEntityCommandError(output, context);
795
749
  }
796
- const contents = {
750
+ const contents = map({
797
751
  $metadata: deserializeMetadata(output),
798
- connectorEntityFields: undefined,
799
- };
752
+ });
800
753
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
801
- if (data.connectorEntityFields !== undefined && data.connectorEntityFields !== null) {
754
+ if (data.connectorEntityFields != null) {
802
755
  contents.connectorEntityFields = deserializeAws_restJson1ConnectorEntityFieldList(data.connectorEntityFields, context);
803
756
  }
804
- return Promise.resolve(contents);
757
+ return contents;
805
758
  };
806
759
  exports.deserializeAws_restJson1DescribeConnectorEntityCommand = deserializeAws_restJson1DescribeConnectorEntityCommand;
807
760
  const deserializeAws_restJson1DescribeConnectorEntityCommandError = async (output, context) => {
@@ -809,7 +762,6 @@ const deserializeAws_restJson1DescribeConnectorEntityCommandError = async (outpu
809
762
  ...output,
810
763
  body: await parseBody(output.body, context),
811
764
  };
812
- let response;
813
765
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
814
766
  switch (errorCode) {
815
767
  case "ConnectorAuthenticationException":
@@ -829,33 +781,29 @@ const deserializeAws_restJson1DescribeConnectorEntityCommandError = async (outpu
829
781
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
830
782
  default:
831
783
  const parsedBody = parsedOutput.body;
832
- const $metadata = deserializeMetadata(output);
833
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
834
- response = new AppflowServiceException_1.AppflowServiceException({
835
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
836
- $fault: "client",
837
- $metadata,
784
+ (0, smithy_client_1.throwDefaultError)({
785
+ output,
786
+ parsedBody,
787
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
788
+ errorCode,
838
789
  });
839
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
840
790
  }
841
791
  };
842
792
  const deserializeAws_restJson1DescribeConnectorProfilesCommand = async (output, context) => {
843
793
  if (output.statusCode !== 200 && output.statusCode >= 300) {
844
794
  return deserializeAws_restJson1DescribeConnectorProfilesCommandError(output, context);
845
795
  }
846
- const contents = {
796
+ const contents = map({
847
797
  $metadata: deserializeMetadata(output),
848
- connectorProfileDetails: undefined,
849
- nextToken: undefined,
850
- };
798
+ });
851
799
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
852
- if (data.connectorProfileDetails !== undefined && data.connectorProfileDetails !== null) {
800
+ if (data.connectorProfileDetails != null) {
853
801
  contents.connectorProfileDetails = deserializeAws_restJson1ConnectorProfileDetailList(data.connectorProfileDetails, context);
854
802
  }
855
- if (data.nextToken !== undefined && data.nextToken !== null) {
803
+ if (data.nextToken != null) {
856
804
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
857
805
  }
858
- return Promise.resolve(contents);
806
+ return contents;
859
807
  };
860
808
  exports.deserializeAws_restJson1DescribeConnectorProfilesCommand = deserializeAws_restJson1DescribeConnectorProfilesCommand;
861
809
  const deserializeAws_restJson1DescribeConnectorProfilesCommandError = async (output, context) => {
@@ -863,7 +811,6 @@ const deserializeAws_restJson1DescribeConnectorProfilesCommandError = async (out
863
811
  ...output,
864
812
  body: await parseBody(output.body, context),
865
813
  };
866
- let response;
867
814
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
868
815
  switch (errorCode) {
869
816
  case "InternalServerException":
@@ -874,37 +821,32 @@ const deserializeAws_restJson1DescribeConnectorProfilesCommandError = async (out
874
821
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
875
822
  default:
876
823
  const parsedBody = parsedOutput.body;
877
- const $metadata = deserializeMetadata(output);
878
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
879
- response = new AppflowServiceException_1.AppflowServiceException({
880
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
881
- $fault: "client",
882
- $metadata,
824
+ (0, smithy_client_1.throwDefaultError)({
825
+ output,
826
+ parsedBody,
827
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
828
+ errorCode,
883
829
  });
884
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
885
830
  }
886
831
  };
887
832
  const deserializeAws_restJson1DescribeConnectorsCommand = async (output, context) => {
888
833
  if (output.statusCode !== 200 && output.statusCode >= 300) {
889
834
  return deserializeAws_restJson1DescribeConnectorsCommandError(output, context);
890
835
  }
891
- const contents = {
836
+ const contents = map({
892
837
  $metadata: deserializeMetadata(output),
893
- connectorConfigurations: undefined,
894
- connectors: undefined,
895
- nextToken: undefined,
896
- };
838
+ });
897
839
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
898
- if (data.connectorConfigurations !== undefined && data.connectorConfigurations !== null) {
840
+ if (data.connectorConfigurations != null) {
899
841
  contents.connectorConfigurations = deserializeAws_restJson1ConnectorConfigurationsMap(data.connectorConfigurations, context);
900
842
  }
901
- if (data.connectors !== undefined && data.connectors !== null) {
843
+ if (data.connectors != null) {
902
844
  contents.connectors = deserializeAws_restJson1ConnectorList(data.connectors, context);
903
845
  }
904
- if (data.nextToken !== undefined && data.nextToken !== null) {
846
+ if (data.nextToken != null) {
905
847
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
906
848
  }
907
- return Promise.resolve(contents);
849
+ return contents;
908
850
  };
909
851
  exports.deserializeAws_restJson1DescribeConnectorsCommand = deserializeAws_restJson1DescribeConnectorsCommand;
910
852
  const deserializeAws_restJson1DescribeConnectorsCommandError = async (output, context) => {
@@ -912,7 +854,6 @@ const deserializeAws_restJson1DescribeConnectorsCommandError = async (output, co
912
854
  ...output,
913
855
  body: await parseBody(output.body, context),
914
856
  };
915
- let response;
916
857
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
917
858
  switch (errorCode) {
918
859
  case "InternalServerException":
@@ -923,89 +864,71 @@ const deserializeAws_restJson1DescribeConnectorsCommandError = async (output, co
923
864
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
924
865
  default:
925
866
  const parsedBody = parsedOutput.body;
926
- const $metadata = deserializeMetadata(output);
927
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
928
- response = new AppflowServiceException_1.AppflowServiceException({
929
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
930
- $fault: "client",
931
- $metadata,
867
+ (0, smithy_client_1.throwDefaultError)({
868
+ output,
869
+ parsedBody,
870
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
871
+ errorCode,
932
872
  });
933
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
934
873
  }
935
874
  };
936
875
  const deserializeAws_restJson1DescribeFlowCommand = async (output, context) => {
937
876
  if (output.statusCode !== 200 && output.statusCode >= 300) {
938
877
  return deserializeAws_restJson1DescribeFlowCommandError(output, context);
939
878
  }
940
- const contents = {
879
+ const contents = map({
941
880
  $metadata: deserializeMetadata(output),
942
- createdAt: undefined,
943
- createdBy: undefined,
944
- description: undefined,
945
- destinationFlowConfigList: undefined,
946
- flowArn: undefined,
947
- flowName: undefined,
948
- flowStatus: undefined,
949
- flowStatusMessage: undefined,
950
- kmsArn: undefined,
951
- lastRunExecutionDetails: undefined,
952
- lastUpdatedAt: undefined,
953
- lastUpdatedBy: undefined,
954
- sourceFlowConfig: undefined,
955
- tags: undefined,
956
- tasks: undefined,
957
- triggerConfig: undefined,
958
- };
881
+ });
959
882
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
960
- if (data.createdAt !== undefined && data.createdAt !== null) {
883
+ if (data.createdAt != null) {
961
884
  contents.createdAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.createdAt)));
962
885
  }
963
- if (data.createdBy !== undefined && data.createdBy !== null) {
886
+ if (data.createdBy != null) {
964
887
  contents.createdBy = (0, smithy_client_1.expectString)(data.createdBy);
965
888
  }
966
- if (data.description !== undefined && data.description !== null) {
889
+ if (data.description != null) {
967
890
  contents.description = (0, smithy_client_1.expectString)(data.description);
968
891
  }
969
- if (data.destinationFlowConfigList !== undefined && data.destinationFlowConfigList !== null) {
892
+ if (data.destinationFlowConfigList != null) {
970
893
  contents.destinationFlowConfigList = deserializeAws_restJson1DestinationFlowConfigList(data.destinationFlowConfigList, context);
971
894
  }
972
- if (data.flowArn !== undefined && data.flowArn !== null) {
895
+ if (data.flowArn != null) {
973
896
  contents.flowArn = (0, smithy_client_1.expectString)(data.flowArn);
974
897
  }
975
- if (data.flowName !== undefined && data.flowName !== null) {
898
+ if (data.flowName != null) {
976
899
  contents.flowName = (0, smithy_client_1.expectString)(data.flowName);
977
900
  }
978
- if (data.flowStatus !== undefined && data.flowStatus !== null) {
901
+ if (data.flowStatus != null) {
979
902
  contents.flowStatus = (0, smithy_client_1.expectString)(data.flowStatus);
980
903
  }
981
- if (data.flowStatusMessage !== undefined && data.flowStatusMessage !== null) {
904
+ if (data.flowStatusMessage != null) {
982
905
  contents.flowStatusMessage = (0, smithy_client_1.expectString)(data.flowStatusMessage);
983
906
  }
984
- if (data.kmsArn !== undefined && data.kmsArn !== null) {
907
+ if (data.kmsArn != null) {
985
908
  contents.kmsArn = (0, smithy_client_1.expectString)(data.kmsArn);
986
909
  }
987
- if (data.lastRunExecutionDetails !== undefined && data.lastRunExecutionDetails !== null) {
910
+ if (data.lastRunExecutionDetails != null) {
988
911
  contents.lastRunExecutionDetails = deserializeAws_restJson1ExecutionDetails(data.lastRunExecutionDetails, context);
989
912
  }
990
- if (data.lastUpdatedAt !== undefined && data.lastUpdatedAt !== null) {
913
+ if (data.lastUpdatedAt != null) {
991
914
  contents.lastUpdatedAt = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(data.lastUpdatedAt)));
992
915
  }
993
- if (data.lastUpdatedBy !== undefined && data.lastUpdatedBy !== null) {
916
+ if (data.lastUpdatedBy != null) {
994
917
  contents.lastUpdatedBy = (0, smithy_client_1.expectString)(data.lastUpdatedBy);
995
918
  }
996
- if (data.sourceFlowConfig !== undefined && data.sourceFlowConfig !== null) {
919
+ if (data.sourceFlowConfig != null) {
997
920
  contents.sourceFlowConfig = deserializeAws_restJson1SourceFlowConfig(data.sourceFlowConfig, context);
998
921
  }
999
- if (data.tags !== undefined && data.tags !== null) {
922
+ if (data.tags != null) {
1000
923
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1001
924
  }
1002
- if (data.tasks !== undefined && data.tasks !== null) {
925
+ if (data.tasks != null) {
1003
926
  contents.tasks = deserializeAws_restJson1Tasks(data.tasks, context);
1004
927
  }
1005
- if (data.triggerConfig !== undefined && data.triggerConfig !== null) {
928
+ if (data.triggerConfig != null) {
1006
929
  contents.triggerConfig = deserializeAws_restJson1TriggerConfig(data.triggerConfig, context);
1007
930
  }
1008
- return Promise.resolve(contents);
931
+ return contents;
1009
932
  };
1010
933
  exports.deserializeAws_restJson1DescribeFlowCommand = deserializeAws_restJson1DescribeFlowCommand;
1011
934
  const deserializeAws_restJson1DescribeFlowCommandError = async (output, context) => {
@@ -1013,7 +936,6 @@ const deserializeAws_restJson1DescribeFlowCommandError = async (output, context)
1013
936
  ...output,
1014
937
  body: await parseBody(output.body, context),
1015
938
  };
1016
- let response;
1017
939
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1018
940
  switch (errorCode) {
1019
941
  case "InternalServerException":
@@ -1024,33 +946,29 @@ const deserializeAws_restJson1DescribeFlowCommandError = async (output, context)
1024
946
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1025
947
  default:
1026
948
  const parsedBody = parsedOutput.body;
1027
- const $metadata = deserializeMetadata(output);
1028
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1029
- response = new AppflowServiceException_1.AppflowServiceException({
1030
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1031
- $fault: "client",
1032
- $metadata,
949
+ (0, smithy_client_1.throwDefaultError)({
950
+ output,
951
+ parsedBody,
952
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
953
+ errorCode,
1033
954
  });
1034
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1035
955
  }
1036
956
  };
1037
957
  const deserializeAws_restJson1DescribeFlowExecutionRecordsCommand = async (output, context) => {
1038
958
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1039
959
  return deserializeAws_restJson1DescribeFlowExecutionRecordsCommandError(output, context);
1040
960
  }
1041
- const contents = {
961
+ const contents = map({
1042
962
  $metadata: deserializeMetadata(output),
1043
- flowExecutions: undefined,
1044
- nextToken: undefined,
1045
- };
963
+ });
1046
964
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1047
- if (data.flowExecutions !== undefined && data.flowExecutions !== null) {
965
+ if (data.flowExecutions != null) {
1048
966
  contents.flowExecutions = deserializeAws_restJson1FlowExecutionList(data.flowExecutions, context);
1049
967
  }
1050
- if (data.nextToken !== undefined && data.nextToken !== null) {
968
+ if (data.nextToken != null) {
1051
969
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1052
970
  }
1053
- return Promise.resolve(contents);
971
+ return contents;
1054
972
  };
1055
973
  exports.deserializeAws_restJson1DescribeFlowExecutionRecordsCommand = deserializeAws_restJson1DescribeFlowExecutionRecordsCommand;
1056
974
  const deserializeAws_restJson1DescribeFlowExecutionRecordsCommandError = async (output, context) => {
@@ -1058,7 +976,6 @@ const deserializeAws_restJson1DescribeFlowExecutionRecordsCommandError = async (
1058
976
  ...output,
1059
977
  body: await parseBody(output.body, context),
1060
978
  };
1061
- let response;
1062
979
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1063
980
  switch (errorCode) {
1064
981
  case "InternalServerException":
@@ -1072,29 +989,26 @@ const deserializeAws_restJson1DescribeFlowExecutionRecordsCommandError = async (
1072
989
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1073
990
  default:
1074
991
  const parsedBody = parsedOutput.body;
1075
- const $metadata = deserializeMetadata(output);
1076
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1077
- response = new AppflowServiceException_1.AppflowServiceException({
1078
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1079
- $fault: "client",
1080
- $metadata,
992
+ (0, smithy_client_1.throwDefaultError)({
993
+ output,
994
+ parsedBody,
995
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
996
+ errorCode,
1081
997
  });
1082
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1083
998
  }
1084
999
  };
1085
1000
  const deserializeAws_restJson1ListConnectorEntitiesCommand = async (output, context) => {
1086
1001
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1087
1002
  return deserializeAws_restJson1ListConnectorEntitiesCommandError(output, context);
1088
1003
  }
1089
- const contents = {
1004
+ const contents = map({
1090
1005
  $metadata: deserializeMetadata(output),
1091
- connectorEntityMap: undefined,
1092
- };
1006
+ });
1093
1007
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1094
- if (data.connectorEntityMap !== undefined && data.connectorEntityMap !== null) {
1008
+ if (data.connectorEntityMap != null) {
1095
1009
  contents.connectorEntityMap = deserializeAws_restJson1ConnectorEntityMap(data.connectorEntityMap, context);
1096
1010
  }
1097
- return Promise.resolve(contents);
1011
+ return contents;
1098
1012
  };
1099
1013
  exports.deserializeAws_restJson1ListConnectorEntitiesCommand = deserializeAws_restJson1ListConnectorEntitiesCommand;
1100
1014
  const deserializeAws_restJson1ListConnectorEntitiesCommandError = async (output, context) => {
@@ -1102,7 +1016,6 @@ const deserializeAws_restJson1ListConnectorEntitiesCommandError = async (output,
1102
1016
  ...output,
1103
1017
  body: await parseBody(output.body, context),
1104
1018
  };
1105
- let response;
1106
1019
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1107
1020
  switch (errorCode) {
1108
1021
  case "ConnectorAuthenticationException":
@@ -1122,33 +1035,29 @@ const deserializeAws_restJson1ListConnectorEntitiesCommandError = async (output,
1122
1035
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1123
1036
  default:
1124
1037
  const parsedBody = parsedOutput.body;
1125
- const $metadata = deserializeMetadata(output);
1126
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1127
- response = new AppflowServiceException_1.AppflowServiceException({
1128
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1129
- $fault: "client",
1130
- $metadata,
1038
+ (0, smithy_client_1.throwDefaultError)({
1039
+ output,
1040
+ parsedBody,
1041
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1042
+ errorCode,
1131
1043
  });
1132
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1133
1044
  }
1134
1045
  };
1135
1046
  const deserializeAws_restJson1ListConnectorsCommand = async (output, context) => {
1136
1047
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1137
1048
  return deserializeAws_restJson1ListConnectorsCommandError(output, context);
1138
1049
  }
1139
- const contents = {
1050
+ const contents = map({
1140
1051
  $metadata: deserializeMetadata(output),
1141
- connectors: undefined,
1142
- nextToken: undefined,
1143
- };
1052
+ });
1144
1053
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1145
- if (data.connectors !== undefined && data.connectors !== null) {
1054
+ if (data.connectors != null) {
1146
1055
  contents.connectors = deserializeAws_restJson1ConnectorList(data.connectors, context);
1147
1056
  }
1148
- if (data.nextToken !== undefined && data.nextToken !== null) {
1057
+ if (data.nextToken != null) {
1149
1058
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1150
1059
  }
1151
- return Promise.resolve(contents);
1060
+ return contents;
1152
1061
  };
1153
1062
  exports.deserializeAws_restJson1ListConnectorsCommand = deserializeAws_restJson1ListConnectorsCommand;
1154
1063
  const deserializeAws_restJson1ListConnectorsCommandError = async (output, context) => {
@@ -1156,7 +1065,6 @@ const deserializeAws_restJson1ListConnectorsCommandError = async (output, contex
1156
1065
  ...output,
1157
1066
  body: await parseBody(output.body, context),
1158
1067
  };
1159
- let response;
1160
1068
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1161
1069
  switch (errorCode) {
1162
1070
  case "InternalServerException":
@@ -1167,33 +1075,29 @@ const deserializeAws_restJson1ListConnectorsCommandError = async (output, contex
1167
1075
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1168
1076
  default:
1169
1077
  const parsedBody = parsedOutput.body;
1170
- const $metadata = deserializeMetadata(output);
1171
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1172
- response = new AppflowServiceException_1.AppflowServiceException({
1173
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1174
- $fault: "client",
1175
- $metadata,
1078
+ (0, smithy_client_1.throwDefaultError)({
1079
+ output,
1080
+ parsedBody,
1081
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1082
+ errorCode,
1176
1083
  });
1177
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1178
1084
  }
1179
1085
  };
1180
1086
  const deserializeAws_restJson1ListFlowsCommand = async (output, context) => {
1181
1087
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1182
1088
  return deserializeAws_restJson1ListFlowsCommandError(output, context);
1183
1089
  }
1184
- const contents = {
1090
+ const contents = map({
1185
1091
  $metadata: deserializeMetadata(output),
1186
- flows: undefined,
1187
- nextToken: undefined,
1188
- };
1092
+ });
1189
1093
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1190
- if (data.flows !== undefined && data.flows !== null) {
1094
+ if (data.flows != null) {
1191
1095
  contents.flows = deserializeAws_restJson1FlowList(data.flows, context);
1192
1096
  }
1193
- if (data.nextToken !== undefined && data.nextToken !== null) {
1097
+ if (data.nextToken != null) {
1194
1098
  contents.nextToken = (0, smithy_client_1.expectString)(data.nextToken);
1195
1099
  }
1196
- return Promise.resolve(contents);
1100
+ return contents;
1197
1101
  };
1198
1102
  exports.deserializeAws_restJson1ListFlowsCommand = deserializeAws_restJson1ListFlowsCommand;
1199
1103
  const deserializeAws_restJson1ListFlowsCommandError = async (output, context) => {
@@ -1201,7 +1105,6 @@ const deserializeAws_restJson1ListFlowsCommandError = async (output, context) =>
1201
1105
  ...output,
1202
1106
  body: await parseBody(output.body, context),
1203
1107
  };
1204
- let response;
1205
1108
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1206
1109
  switch (errorCode) {
1207
1110
  case "InternalServerException":
@@ -1212,29 +1115,26 @@ const deserializeAws_restJson1ListFlowsCommandError = async (output, context) =>
1212
1115
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1213
1116
  default:
1214
1117
  const parsedBody = parsedOutput.body;
1215
- const $metadata = deserializeMetadata(output);
1216
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1217
- response = new AppflowServiceException_1.AppflowServiceException({
1218
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1219
- $fault: "client",
1220
- $metadata,
1118
+ (0, smithy_client_1.throwDefaultError)({
1119
+ output,
1120
+ parsedBody,
1121
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1122
+ errorCode,
1221
1123
  });
1222
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1223
1124
  }
1224
1125
  };
1225
1126
  const deserializeAws_restJson1ListTagsForResourceCommand = async (output, context) => {
1226
1127
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1227
1128
  return deserializeAws_restJson1ListTagsForResourceCommandError(output, context);
1228
1129
  }
1229
- const contents = {
1130
+ const contents = map({
1230
1131
  $metadata: deserializeMetadata(output),
1231
- tags: undefined,
1232
- };
1132
+ });
1233
1133
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1234
- if (data.tags !== undefined && data.tags !== null) {
1134
+ if (data.tags != null) {
1235
1135
  contents.tags = deserializeAws_restJson1TagMap(data.tags, context);
1236
1136
  }
1237
- return Promise.resolve(contents);
1137
+ return contents;
1238
1138
  };
1239
1139
  exports.deserializeAws_restJson1ListTagsForResourceCommand = deserializeAws_restJson1ListTagsForResourceCommand;
1240
1140
  const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, context) => {
@@ -1242,7 +1142,6 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1242
1142
  ...output,
1243
1143
  body: await parseBody(output.body, context),
1244
1144
  };
1245
- let response;
1246
1145
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1247
1146
  switch (errorCode) {
1248
1147
  case "InternalServerException":
@@ -1256,29 +1155,26 @@ const deserializeAws_restJson1ListTagsForResourceCommandError = async (output, c
1256
1155
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1257
1156
  default:
1258
1157
  const parsedBody = parsedOutput.body;
1259
- const $metadata = deserializeMetadata(output);
1260
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1261
- response = new AppflowServiceException_1.AppflowServiceException({
1262
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1263
- $fault: "client",
1264
- $metadata,
1158
+ (0, smithy_client_1.throwDefaultError)({
1159
+ output,
1160
+ parsedBody,
1161
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1162
+ errorCode,
1265
1163
  });
1266
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1267
1164
  }
1268
1165
  };
1269
1166
  const deserializeAws_restJson1RegisterConnectorCommand = async (output, context) => {
1270
1167
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1271
1168
  return deserializeAws_restJson1RegisterConnectorCommandError(output, context);
1272
1169
  }
1273
- const contents = {
1170
+ const contents = map({
1274
1171
  $metadata: deserializeMetadata(output),
1275
- connectorArn: undefined,
1276
- };
1172
+ });
1277
1173
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1278
- if (data.connectorArn !== undefined && data.connectorArn !== null) {
1174
+ if (data.connectorArn != null) {
1279
1175
  contents.connectorArn = (0, smithy_client_1.expectString)(data.connectorArn);
1280
1176
  }
1281
- return Promise.resolve(contents);
1177
+ return contents;
1282
1178
  };
1283
1179
  exports.deserializeAws_restJson1RegisterConnectorCommand = deserializeAws_restJson1RegisterConnectorCommand;
1284
1180
  const deserializeAws_restJson1RegisterConnectorCommandError = async (output, context) => {
@@ -1286,7 +1182,6 @@ const deserializeAws_restJson1RegisterConnectorCommandError = async (output, con
1286
1182
  ...output,
1287
1183
  body: await parseBody(output.body, context),
1288
1184
  };
1289
- let response;
1290
1185
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1291
1186
  switch (errorCode) {
1292
1187
  case "AccessDeniedException":
@@ -1318,37 +1213,32 @@ const deserializeAws_restJson1RegisterConnectorCommandError = async (output, con
1318
1213
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1319
1214
  default:
1320
1215
  const parsedBody = parsedOutput.body;
1321
- const $metadata = deserializeMetadata(output);
1322
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1323
- response = new AppflowServiceException_1.AppflowServiceException({
1324
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1325
- $fault: "client",
1326
- $metadata,
1216
+ (0, smithy_client_1.throwDefaultError)({
1217
+ output,
1218
+ parsedBody,
1219
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1220
+ errorCode,
1327
1221
  });
1328
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1329
1222
  }
1330
1223
  };
1331
1224
  const deserializeAws_restJson1StartFlowCommand = async (output, context) => {
1332
1225
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1333
1226
  return deserializeAws_restJson1StartFlowCommandError(output, context);
1334
1227
  }
1335
- const contents = {
1228
+ const contents = map({
1336
1229
  $metadata: deserializeMetadata(output),
1337
- executionId: undefined,
1338
- flowArn: undefined,
1339
- flowStatus: undefined,
1340
- };
1230
+ });
1341
1231
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1342
- if (data.executionId !== undefined && data.executionId !== null) {
1232
+ if (data.executionId != null) {
1343
1233
  contents.executionId = (0, smithy_client_1.expectString)(data.executionId);
1344
1234
  }
1345
- if (data.flowArn !== undefined && data.flowArn !== null) {
1235
+ if (data.flowArn != null) {
1346
1236
  contents.flowArn = (0, smithy_client_1.expectString)(data.flowArn);
1347
1237
  }
1348
- if (data.flowStatus !== undefined && data.flowStatus !== null) {
1238
+ if (data.flowStatus != null) {
1349
1239
  contents.flowStatus = (0, smithy_client_1.expectString)(data.flowStatus);
1350
1240
  }
1351
- return Promise.resolve(contents);
1241
+ return contents;
1352
1242
  };
1353
1243
  exports.deserializeAws_restJson1StartFlowCommand = deserializeAws_restJson1StartFlowCommand;
1354
1244
  const deserializeAws_restJson1StartFlowCommandError = async (output, context) => {
@@ -1356,7 +1246,6 @@ const deserializeAws_restJson1StartFlowCommandError = async (output, context) =>
1356
1246
  ...output,
1357
1247
  body: await parseBody(output.body, context),
1358
1248
  };
1359
- let response;
1360
1249
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1361
1250
  switch (errorCode) {
1362
1251
  case "ConflictException":
@@ -1373,33 +1262,29 @@ const deserializeAws_restJson1StartFlowCommandError = async (output, context) =>
1373
1262
  throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
1374
1263
  default:
1375
1264
  const parsedBody = parsedOutput.body;
1376
- const $metadata = deserializeMetadata(output);
1377
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1378
- response = new AppflowServiceException_1.AppflowServiceException({
1379
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1380
- $fault: "client",
1381
- $metadata,
1265
+ (0, smithy_client_1.throwDefaultError)({
1266
+ output,
1267
+ parsedBody,
1268
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1269
+ errorCode,
1382
1270
  });
1383
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1384
1271
  }
1385
1272
  };
1386
1273
  const deserializeAws_restJson1StopFlowCommand = async (output, context) => {
1387
1274
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1388
1275
  return deserializeAws_restJson1StopFlowCommandError(output, context);
1389
1276
  }
1390
- const contents = {
1277
+ const contents = map({
1391
1278
  $metadata: deserializeMetadata(output),
1392
- flowArn: undefined,
1393
- flowStatus: undefined,
1394
- };
1279
+ });
1395
1280
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1396
- if (data.flowArn !== undefined && data.flowArn !== null) {
1281
+ if (data.flowArn != null) {
1397
1282
  contents.flowArn = (0, smithy_client_1.expectString)(data.flowArn);
1398
1283
  }
1399
- if (data.flowStatus !== undefined && data.flowStatus !== null) {
1284
+ if (data.flowStatus != null) {
1400
1285
  contents.flowStatus = (0, smithy_client_1.expectString)(data.flowStatus);
1401
1286
  }
1402
- return Promise.resolve(contents);
1287
+ return contents;
1403
1288
  };
1404
1289
  exports.deserializeAws_restJson1StopFlowCommand = deserializeAws_restJson1StopFlowCommand;
1405
1290
  const deserializeAws_restJson1StopFlowCommandError = async (output, context) => {
@@ -1407,7 +1292,6 @@ const deserializeAws_restJson1StopFlowCommandError = async (output, context) =>
1407
1292
  ...output,
1408
1293
  body: await parseBody(output.body, context),
1409
1294
  };
1410
- let response;
1411
1295
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1412
1296
  switch (errorCode) {
1413
1297
  case "ConflictException":
@@ -1424,25 +1308,23 @@ const deserializeAws_restJson1StopFlowCommandError = async (output, context) =>
1424
1308
  throw await deserializeAws_restJson1UnsupportedOperationExceptionResponse(parsedOutput, context);
1425
1309
  default:
1426
1310
  const parsedBody = parsedOutput.body;
1427
- const $metadata = deserializeMetadata(output);
1428
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1429
- response = new AppflowServiceException_1.AppflowServiceException({
1430
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1431
- $fault: "client",
1432
- $metadata,
1311
+ (0, smithy_client_1.throwDefaultError)({
1312
+ output,
1313
+ parsedBody,
1314
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1315
+ errorCode,
1433
1316
  });
1434
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1435
1317
  }
1436
1318
  };
1437
1319
  const deserializeAws_restJson1TagResourceCommand = async (output, context) => {
1438
1320
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1439
1321
  return deserializeAws_restJson1TagResourceCommandError(output, context);
1440
1322
  }
1441
- const contents = {
1323
+ const contents = map({
1442
1324
  $metadata: deserializeMetadata(output),
1443
- };
1325
+ });
1444
1326
  await collectBody(output.body, context);
1445
- return Promise.resolve(contents);
1327
+ return contents;
1446
1328
  };
1447
1329
  exports.deserializeAws_restJson1TagResourceCommand = deserializeAws_restJson1TagResourceCommand;
1448
1330
  const deserializeAws_restJson1TagResourceCommandError = async (output, context) => {
@@ -1450,7 +1332,6 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1450
1332
  ...output,
1451
1333
  body: await parseBody(output.body, context),
1452
1334
  };
1453
- let response;
1454
1335
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1455
1336
  switch (errorCode) {
1456
1337
  case "InternalServerException":
@@ -1464,25 +1345,23 @@ const deserializeAws_restJson1TagResourceCommandError = async (output, context)
1464
1345
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1465
1346
  default:
1466
1347
  const parsedBody = parsedOutput.body;
1467
- const $metadata = deserializeMetadata(output);
1468
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1469
- response = new AppflowServiceException_1.AppflowServiceException({
1470
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1471
- $fault: "client",
1472
- $metadata,
1348
+ (0, smithy_client_1.throwDefaultError)({
1349
+ output,
1350
+ parsedBody,
1351
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1352
+ errorCode,
1473
1353
  });
1474
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1475
1354
  }
1476
1355
  };
1477
1356
  const deserializeAws_restJson1UnregisterConnectorCommand = async (output, context) => {
1478
1357
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1479
1358
  return deserializeAws_restJson1UnregisterConnectorCommandError(output, context);
1480
1359
  }
1481
- const contents = {
1360
+ const contents = map({
1482
1361
  $metadata: deserializeMetadata(output),
1483
- };
1362
+ });
1484
1363
  await collectBody(output.body, context);
1485
- return Promise.resolve(contents);
1364
+ return contents;
1486
1365
  };
1487
1366
  exports.deserializeAws_restJson1UnregisterConnectorCommand = deserializeAws_restJson1UnregisterConnectorCommand;
1488
1367
  const deserializeAws_restJson1UnregisterConnectorCommandError = async (output, context) => {
@@ -1490,7 +1369,6 @@ const deserializeAws_restJson1UnregisterConnectorCommandError = async (output, c
1490
1369
  ...output,
1491
1370
  body: await parseBody(output.body, context),
1492
1371
  };
1493
- let response;
1494
1372
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1495
1373
  switch (errorCode) {
1496
1374
  case "ConflictException":
@@ -1504,25 +1382,23 @@ const deserializeAws_restJson1UnregisterConnectorCommandError = async (output, c
1504
1382
  throw await deserializeAws_restJson1ResourceNotFoundExceptionResponse(parsedOutput, context);
1505
1383
  default:
1506
1384
  const parsedBody = parsedOutput.body;
1507
- const $metadata = deserializeMetadata(output);
1508
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1509
- response = new AppflowServiceException_1.AppflowServiceException({
1510
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1511
- $fault: "client",
1512
- $metadata,
1385
+ (0, smithy_client_1.throwDefaultError)({
1386
+ output,
1387
+ parsedBody,
1388
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1389
+ errorCode,
1513
1390
  });
1514
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1515
1391
  }
1516
1392
  };
1517
1393
  const deserializeAws_restJson1UntagResourceCommand = async (output, context) => {
1518
1394
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1519
1395
  return deserializeAws_restJson1UntagResourceCommandError(output, context);
1520
1396
  }
1521
- const contents = {
1397
+ const contents = map({
1522
1398
  $metadata: deserializeMetadata(output),
1523
- };
1399
+ });
1524
1400
  await collectBody(output.body, context);
1525
- return Promise.resolve(contents);
1401
+ return contents;
1526
1402
  };
1527
1403
  exports.deserializeAws_restJson1UntagResourceCommand = deserializeAws_restJson1UntagResourceCommand;
1528
1404
  const deserializeAws_restJson1UntagResourceCommandError = async (output, context) => {
@@ -1530,7 +1406,6 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1530
1406
  ...output,
1531
1407
  body: await parseBody(output.body, context),
1532
1408
  };
1533
- let response;
1534
1409
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1535
1410
  switch (errorCode) {
1536
1411
  case "InternalServerException":
@@ -1544,29 +1419,26 @@ const deserializeAws_restJson1UntagResourceCommandError = async (output, context
1544
1419
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1545
1420
  default:
1546
1421
  const parsedBody = parsedOutput.body;
1547
- const $metadata = deserializeMetadata(output);
1548
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1549
- response = new AppflowServiceException_1.AppflowServiceException({
1550
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1551
- $fault: "client",
1552
- $metadata,
1422
+ (0, smithy_client_1.throwDefaultError)({
1423
+ output,
1424
+ parsedBody,
1425
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1426
+ errorCode,
1553
1427
  });
1554
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1555
1428
  }
1556
1429
  };
1557
1430
  const deserializeAws_restJson1UpdateConnectorProfileCommand = async (output, context) => {
1558
1431
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1559
1432
  return deserializeAws_restJson1UpdateConnectorProfileCommandError(output, context);
1560
1433
  }
1561
- const contents = {
1434
+ const contents = map({
1562
1435
  $metadata: deserializeMetadata(output),
1563
- connectorProfileArn: undefined,
1564
- };
1436
+ });
1565
1437
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1566
- if (data.connectorProfileArn !== undefined && data.connectorProfileArn !== null) {
1438
+ if (data.connectorProfileArn != null) {
1567
1439
  contents.connectorProfileArn = (0, smithy_client_1.expectString)(data.connectorProfileArn);
1568
1440
  }
1569
- return Promise.resolve(contents);
1441
+ return contents;
1570
1442
  };
1571
1443
  exports.deserializeAws_restJson1UpdateConnectorProfileCommand = deserializeAws_restJson1UpdateConnectorProfileCommand;
1572
1444
  const deserializeAws_restJson1UpdateConnectorProfileCommandError = async (output, context) => {
@@ -1574,7 +1446,6 @@ const deserializeAws_restJson1UpdateConnectorProfileCommandError = async (output
1574
1446
  ...output,
1575
1447
  body: await parseBody(output.body, context),
1576
1448
  };
1577
- let response;
1578
1449
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1579
1450
  switch (errorCode) {
1580
1451
  case "ConflictException":
@@ -1594,29 +1465,26 @@ const deserializeAws_restJson1UpdateConnectorProfileCommandError = async (output
1594
1465
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1595
1466
  default:
1596
1467
  const parsedBody = parsedOutput.body;
1597
- const $metadata = deserializeMetadata(output);
1598
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1599
- response = new AppflowServiceException_1.AppflowServiceException({
1600
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1601
- $fault: "client",
1602
- $metadata,
1468
+ (0, smithy_client_1.throwDefaultError)({
1469
+ output,
1470
+ parsedBody,
1471
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1472
+ errorCode,
1603
1473
  });
1604
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1605
1474
  }
1606
1475
  };
1607
1476
  const deserializeAws_restJson1UpdateFlowCommand = async (output, context) => {
1608
1477
  if (output.statusCode !== 200 && output.statusCode >= 300) {
1609
1478
  return deserializeAws_restJson1UpdateFlowCommandError(output, context);
1610
1479
  }
1611
- const contents = {
1480
+ const contents = map({
1612
1481
  $metadata: deserializeMetadata(output),
1613
- flowStatus: undefined,
1614
- };
1482
+ });
1615
1483
  const data = (0, smithy_client_1.expectNonNull)((0, smithy_client_1.expectObject)(await parseBody(output.body, context)), "body");
1616
- if (data.flowStatus !== undefined && data.flowStatus !== null) {
1484
+ if (data.flowStatus != null) {
1617
1485
  contents.flowStatus = (0, smithy_client_1.expectString)(data.flowStatus);
1618
1486
  }
1619
- return Promise.resolve(contents);
1487
+ return contents;
1620
1488
  };
1621
1489
  exports.deserializeAws_restJson1UpdateFlowCommand = deserializeAws_restJson1UpdateFlowCommand;
1622
1490
  const deserializeAws_restJson1UpdateFlowCommandError = async (output, context) => {
@@ -1624,7 +1492,6 @@ const deserializeAws_restJson1UpdateFlowCommandError = async (output, context) =
1624
1492
  ...output,
1625
1493
  body: await parseBody(output.body, context),
1626
1494
  };
1627
- let response;
1628
1495
  const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1629
1496
  switch (errorCode) {
1630
1497
  case "ConflictException":
@@ -1650,20 +1517,19 @@ const deserializeAws_restJson1UpdateFlowCommandError = async (output, context) =
1650
1517
  throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
1651
1518
  default:
1652
1519
  const parsedBody = parsedOutput.body;
1653
- const $metadata = deserializeMetadata(output);
1654
- const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined;
1655
- response = new AppflowServiceException_1.AppflowServiceException({
1656
- name: parsedBody.code || parsedBody.Code || errorCode || statusCode || "UnknowError",
1657
- $fault: "client",
1658
- $metadata,
1520
+ (0, smithy_client_1.throwDefaultError)({
1521
+ output,
1522
+ parsedBody,
1523
+ exceptionCtor: AppflowServiceException_1.AppflowServiceException,
1524
+ errorCode,
1659
1525
  });
1660
- throw (0, smithy_client_1.decorateServiceException)(response, parsedBody);
1661
1526
  }
1662
1527
  };
1528
+ const map = smithy_client_1.map;
1663
1529
  const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
1664
- const contents = {};
1530
+ const contents = map({});
1665
1531
  const data = parsedOutput.body;
1666
- if (data.message !== undefined && data.message !== null) {
1532
+ if (data.message != null) {
1667
1533
  contents.message = (0, smithy_client_1.expectString)(data.message);
1668
1534
  }
1669
1535
  const exception = new models_0_1.AccessDeniedException({
@@ -1673,9 +1539,9 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
1673
1539
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1674
1540
  };
1675
1541
  const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, context) => {
1676
- const contents = {};
1542
+ const contents = map({});
1677
1543
  const data = parsedOutput.body;
1678
- if (data.message !== undefined && data.message !== null) {
1544
+ if (data.message != null) {
1679
1545
  contents.message = (0, smithy_client_1.expectString)(data.message);
1680
1546
  }
1681
1547
  const exception = new models_0_1.ConflictException({
@@ -1685,9 +1551,9 @@ const deserializeAws_restJson1ConflictExceptionResponse = async (parsedOutput, c
1685
1551
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1686
1552
  };
1687
1553
  const deserializeAws_restJson1ConnectorAuthenticationExceptionResponse = async (parsedOutput, context) => {
1688
- const contents = {};
1554
+ const contents = map({});
1689
1555
  const data = parsedOutput.body;
1690
- if (data.message !== undefined && data.message !== null) {
1556
+ if (data.message != null) {
1691
1557
  contents.message = (0, smithy_client_1.expectString)(data.message);
1692
1558
  }
1693
1559
  const exception = new models_0_1.ConnectorAuthenticationException({
@@ -1697,9 +1563,9 @@ const deserializeAws_restJson1ConnectorAuthenticationExceptionResponse = async (
1697
1563
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1698
1564
  };
1699
1565
  const deserializeAws_restJson1ConnectorServerExceptionResponse = async (parsedOutput, context) => {
1700
- const contents = {};
1566
+ const contents = map({});
1701
1567
  const data = parsedOutput.body;
1702
- if (data.message !== undefined && data.message !== null) {
1568
+ if (data.message != null) {
1703
1569
  contents.message = (0, smithy_client_1.expectString)(data.message);
1704
1570
  }
1705
1571
  const exception = new models_0_1.ConnectorServerException({
@@ -1709,9 +1575,9 @@ const deserializeAws_restJson1ConnectorServerExceptionResponse = async (parsedOu
1709
1575
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1710
1576
  };
1711
1577
  const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
1712
- const contents = {};
1578
+ const contents = map({});
1713
1579
  const data = parsedOutput.body;
1714
- if (data.message !== undefined && data.message !== null) {
1580
+ if (data.message != null) {
1715
1581
  contents.message = (0, smithy_client_1.expectString)(data.message);
1716
1582
  }
1717
1583
  const exception = new models_0_1.InternalServerException({
@@ -1721,9 +1587,9 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
1721
1587
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1722
1588
  };
1723
1589
  const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedOutput, context) => {
1724
- const contents = {};
1590
+ const contents = map({});
1725
1591
  const data = parsedOutput.body;
1726
- if (data.message !== undefined && data.message !== null) {
1592
+ if (data.message != null) {
1727
1593
  contents.message = (0, smithy_client_1.expectString)(data.message);
1728
1594
  }
1729
1595
  const exception = new models_0_1.ResourceNotFoundException({
@@ -1733,9 +1599,9 @@ const deserializeAws_restJson1ResourceNotFoundExceptionResponse = async (parsedO
1733
1599
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1734
1600
  };
1735
1601
  const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
1736
- const contents = {};
1602
+ const contents = map({});
1737
1603
  const data = parsedOutput.body;
1738
- if (data.message !== undefined && data.message !== null) {
1604
+ if (data.message != null) {
1739
1605
  contents.message = (0, smithy_client_1.expectString)(data.message);
1740
1606
  }
1741
1607
  const exception = new models_0_1.ServiceQuotaExceededException({
@@ -1745,9 +1611,9 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
1745
1611
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1746
1612
  };
1747
1613
  const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
1748
- const contents = {};
1614
+ const contents = map({});
1749
1615
  const data = parsedOutput.body;
1750
- if (data.message !== undefined && data.message !== null) {
1616
+ if (data.message != null) {
1751
1617
  contents.message = (0, smithy_client_1.expectString)(data.message);
1752
1618
  }
1753
1619
  const exception = new models_0_1.ThrottlingException({
@@ -1757,9 +1623,9 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
1757
1623
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1758
1624
  };
1759
1625
  const deserializeAws_restJson1UnsupportedOperationExceptionResponse = async (parsedOutput, context) => {
1760
- const contents = {};
1626
+ const contents = map({});
1761
1627
  const data = parsedOutput.body;
1762
- if (data.message !== undefined && data.message !== null) {
1628
+ if (data.message != null) {
1763
1629
  contents.message = (0, smithy_client_1.expectString)(data.message);
1764
1630
  }
1765
1631
  const exception = new models_0_1.UnsupportedOperationException({
@@ -1769,9 +1635,9 @@ const deserializeAws_restJson1UnsupportedOperationExceptionResponse = async (par
1769
1635
  return (0, smithy_client_1.decorateServiceException)(exception, parsedOutput.body);
1770
1636
  };
1771
1637
  const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
1772
- const contents = {};
1638
+ const contents = map({});
1773
1639
  const data = parsedOutput.body;
1774
- if (data.message !== undefined && data.message !== null) {
1640
+ if (data.message != null) {
1775
1641
  contents.message = (0, smithy_client_1.expectString)(data.message);
1776
1642
  }
1777
1643
  const exception = new models_0_1.ValidationException({
@@ -1905,9 +1771,6 @@ const serializeAws_restJson1ConnectorProfileNameList = (input, context) => {
1905
1771
  return input
1906
1772
  .filter((e) => e != null)
1907
1773
  .map((entry) => {
1908
- if (entry === null) {
1909
- return null;
1910
- }
1911
1774
  return entry;
1912
1775
  });
1913
1776
  };
@@ -1976,9 +1839,6 @@ const serializeAws_restJson1ConnectorTypeList = (input, context) => {
1976
1839
  return input
1977
1840
  .filter((e) => e != null)
1978
1841
  .map((entry) => {
1979
- if (entry === null) {
1980
- return null;
1981
- }
1982
1842
  return entry;
1983
1843
  });
1984
1844
  };
@@ -2131,9 +1991,6 @@ const serializeAws_restJson1DestinationFlowConfigList = (input, context) => {
2131
1991
  return input
2132
1992
  .filter((e) => e != null)
2133
1993
  .map((entry) => {
2134
- if (entry === null) {
2135
- return null;
2136
- }
2137
1994
  return serializeAws_restJson1DestinationFlowConfig(entry, context);
2138
1995
  });
2139
1996
  };
@@ -2212,9 +2069,6 @@ const serializeAws_restJson1IdFieldNameList = (input, context) => {
2212
2069
  return input
2213
2070
  .filter((e) => e != null)
2214
2071
  .map((entry) => {
2215
- if (entry === null) {
2216
- return null;
2217
- }
2218
2072
  return entry;
2219
2073
  });
2220
2074
  };
@@ -2319,9 +2173,6 @@ const serializeAws_restJson1OAuthScopeList = (input, context) => {
2319
2173
  return input
2320
2174
  .filter((e) => e != null)
2321
2175
  .map((entry) => {
2322
- if (entry === null) {
2323
- return null;
2324
- }
2325
2176
  return entry;
2326
2177
  });
2327
2178
  };
@@ -2615,9 +2466,6 @@ const serializeAws_restJson1SourceFields = (input, context) => {
2615
2466
  return input
2616
2467
  .filter((e) => e != null)
2617
2468
  .map((entry) => {
2618
- if (entry === null) {
2619
- return null;
2620
- }
2621
2469
  return entry;
2622
2470
  });
2623
2471
  };
@@ -2681,9 +2529,6 @@ const serializeAws_restJson1Tasks = (input, context) => {
2681
2529
  return input
2682
2530
  .filter((e) => e != null)
2683
2531
  .map((entry) => {
2684
- if (entry === null) {
2685
- return null;
2686
- }
2687
2532
  return serializeAws_restJson1Task(entry, context);
2688
2533
  });
2689
2534
  };