@aws-sdk/client-textract 3.312.0 → 3.316.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.
@@ -1,5 +1,5 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, BadDocumentException, DocumentTooLargeException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, InternalServerError, InvalidJobIdException, InvalidKMSKeyException, InvalidParameterException, InvalidS3ObjectException, LimitExceededException, ProvisionedThroughputExceededException, ThrottlingException, UnsupportedDocumentException, } from "../models/models_0";
4
4
  import { TextractServiceException as __BaseException } from "../models/TextractServiceException";
5
5
  export const se_AnalyzeDocumentCommand = async (input, context) => {
@@ -29,55 +29,55 @@ export const se_DetectDocumentTextCommand = async (input, context) => {
29
29
  export const se_GetDocumentAnalysisCommand = async (input, context) => {
30
30
  const headers = sharedHeaders("GetDocumentAnalysis");
31
31
  let body;
32
- body = JSON.stringify(se_GetDocumentAnalysisRequest(input, context));
32
+ body = JSON.stringify(_json(input));
33
33
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
34
34
  };
35
35
  export const se_GetDocumentTextDetectionCommand = async (input, context) => {
36
36
  const headers = sharedHeaders("GetDocumentTextDetection");
37
37
  let body;
38
- body = JSON.stringify(se_GetDocumentTextDetectionRequest(input, context));
38
+ body = JSON.stringify(_json(input));
39
39
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
40
40
  };
41
41
  export const se_GetExpenseAnalysisCommand = async (input, context) => {
42
42
  const headers = sharedHeaders("GetExpenseAnalysis");
43
43
  let body;
44
- body = JSON.stringify(se_GetExpenseAnalysisRequest(input, context));
44
+ body = JSON.stringify(_json(input));
45
45
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
46
46
  };
47
47
  export const se_GetLendingAnalysisCommand = async (input, context) => {
48
48
  const headers = sharedHeaders("GetLendingAnalysis");
49
49
  let body;
50
- body = JSON.stringify(se_GetLendingAnalysisRequest(input, context));
50
+ body = JSON.stringify(_json(input));
51
51
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
52
  };
53
53
  export const se_GetLendingAnalysisSummaryCommand = async (input, context) => {
54
54
  const headers = sharedHeaders("GetLendingAnalysisSummary");
55
55
  let body;
56
- body = JSON.stringify(se_GetLendingAnalysisSummaryRequest(input, context));
56
+ body = JSON.stringify(_json(input));
57
57
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
58
58
  };
59
59
  export const se_StartDocumentAnalysisCommand = async (input, context) => {
60
60
  const headers = sharedHeaders("StartDocumentAnalysis");
61
61
  let body;
62
- body = JSON.stringify(se_StartDocumentAnalysisRequest(input, context));
62
+ body = JSON.stringify(_json(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  export const se_StartDocumentTextDetectionCommand = async (input, context) => {
66
66
  const headers = sharedHeaders("StartDocumentTextDetection");
67
67
  let body;
68
- body = JSON.stringify(se_StartDocumentTextDetectionRequest(input, context));
68
+ body = JSON.stringify(_json(input));
69
69
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
70
70
  };
71
71
  export const se_StartExpenseAnalysisCommand = async (input, context) => {
72
72
  const headers = sharedHeaders("StartExpenseAnalysis");
73
73
  let body;
74
- body = JSON.stringify(se_StartExpenseAnalysisRequest(input, context));
74
+ body = JSON.stringify(_json(input));
75
75
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
76
76
  };
77
77
  export const se_StartLendingAnalysisCommand = async (input, context) => {
78
78
  const headers = sharedHeaders("StartLendingAnalysis");
79
79
  let body;
80
- body = JSON.stringify(se_StartLendingAnalysisRequest(input, context));
80
+ body = JSON.stringify(_json(input));
81
81
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
82
82
  };
83
83
  export const de_AnalyzeDocumentCommand = async (output, context) => {
@@ -91,7 +91,7 @@ export const de_AnalyzeDocumentCommand = async (output, context) => {
91
91
  $metadata: deserializeMetadata(output),
92
92
  ...contents,
93
93
  };
94
- return Promise.resolve(response);
94
+ return response;
95
95
  };
96
96
  const de_AnalyzeDocumentCommandError = async (output, context) => {
97
97
  const parsedOutput = {
@@ -132,10 +132,9 @@ const de_AnalyzeDocumentCommandError = async (output, context) => {
132
132
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
133
133
  default:
134
134
  const parsedBody = parsedOutput.body;
135
- throwDefaultError({
135
+ return throwDefaultError({
136
136
  output,
137
137
  parsedBody,
138
- exceptionCtor: __BaseException,
139
138
  errorCode,
140
139
  });
141
140
  }
@@ -151,7 +150,7 @@ export const de_AnalyzeExpenseCommand = async (output, context) => {
151
150
  $metadata: deserializeMetadata(output),
152
151
  ...contents,
153
152
  };
154
- return Promise.resolve(response);
153
+ return response;
155
154
  };
156
155
  const de_AnalyzeExpenseCommandError = async (output, context) => {
157
156
  const parsedOutput = {
@@ -189,10 +188,9 @@ const de_AnalyzeExpenseCommandError = async (output, context) => {
189
188
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
190
189
  default:
191
190
  const parsedBody = parsedOutput.body;
192
- throwDefaultError({
191
+ return throwDefaultError({
193
192
  output,
194
193
  parsedBody,
195
- exceptionCtor: __BaseException,
196
194
  errorCode,
197
195
  });
198
196
  }
@@ -208,7 +206,7 @@ export const de_AnalyzeIDCommand = async (output, context) => {
208
206
  $metadata: deserializeMetadata(output),
209
207
  ...contents,
210
208
  };
211
- return Promise.resolve(response);
209
+ return response;
212
210
  };
213
211
  const de_AnalyzeIDCommandError = async (output, context) => {
214
212
  const parsedOutput = {
@@ -246,10 +244,9 @@ const de_AnalyzeIDCommandError = async (output, context) => {
246
244
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
247
245
  default:
248
246
  const parsedBody = parsedOutput.body;
249
- throwDefaultError({
247
+ return throwDefaultError({
250
248
  output,
251
249
  parsedBody,
252
- exceptionCtor: __BaseException,
253
250
  errorCode,
254
251
  });
255
252
  }
@@ -265,7 +262,7 @@ export const de_DetectDocumentTextCommand = async (output, context) => {
265
262
  $metadata: deserializeMetadata(output),
266
263
  ...contents,
267
264
  };
268
- return Promise.resolve(response);
265
+ return response;
269
266
  };
270
267
  const de_DetectDocumentTextCommandError = async (output, context) => {
271
268
  const parsedOutput = {
@@ -303,10 +300,9 @@ const de_DetectDocumentTextCommandError = async (output, context) => {
303
300
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
304
301
  default:
305
302
  const parsedBody = parsedOutput.body;
306
- throwDefaultError({
303
+ return throwDefaultError({
307
304
  output,
308
305
  parsedBody,
309
- exceptionCtor: __BaseException,
310
306
  errorCode,
311
307
  });
312
308
  }
@@ -322,7 +318,7 @@ export const de_GetDocumentAnalysisCommand = async (output, context) => {
322
318
  $metadata: deserializeMetadata(output),
323
319
  ...contents,
324
320
  };
325
- return Promise.resolve(response);
321
+ return response;
326
322
  };
327
323
  const de_GetDocumentAnalysisCommandError = async (output, context) => {
328
324
  const parsedOutput = {
@@ -357,10 +353,9 @@ const de_GetDocumentAnalysisCommandError = async (output, context) => {
357
353
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
358
354
  default:
359
355
  const parsedBody = parsedOutput.body;
360
- throwDefaultError({
356
+ return throwDefaultError({
361
357
  output,
362
358
  parsedBody,
363
- exceptionCtor: __BaseException,
364
359
  errorCode,
365
360
  });
366
361
  }
@@ -376,7 +371,7 @@ export const de_GetDocumentTextDetectionCommand = async (output, context) => {
376
371
  $metadata: deserializeMetadata(output),
377
372
  ...contents,
378
373
  };
379
- return Promise.resolve(response);
374
+ return response;
380
375
  };
381
376
  const de_GetDocumentTextDetectionCommandError = async (output, context) => {
382
377
  const parsedOutput = {
@@ -411,10 +406,9 @@ const de_GetDocumentTextDetectionCommandError = async (output, context) => {
411
406
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
412
407
  default:
413
408
  const parsedBody = parsedOutput.body;
414
- throwDefaultError({
409
+ return throwDefaultError({
415
410
  output,
416
411
  parsedBody,
417
- exceptionCtor: __BaseException,
418
412
  errorCode,
419
413
  });
420
414
  }
@@ -430,7 +424,7 @@ export const de_GetExpenseAnalysisCommand = async (output, context) => {
430
424
  $metadata: deserializeMetadata(output),
431
425
  ...contents,
432
426
  };
433
- return Promise.resolve(response);
427
+ return response;
434
428
  };
435
429
  const de_GetExpenseAnalysisCommandError = async (output, context) => {
436
430
  const parsedOutput = {
@@ -465,10 +459,9 @@ const de_GetExpenseAnalysisCommandError = async (output, context) => {
465
459
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
466
460
  default:
467
461
  const parsedBody = parsedOutput.body;
468
- throwDefaultError({
462
+ return throwDefaultError({
469
463
  output,
470
464
  parsedBody,
471
- exceptionCtor: __BaseException,
472
465
  errorCode,
473
466
  });
474
467
  }
@@ -484,7 +477,7 @@ export const de_GetLendingAnalysisCommand = async (output, context) => {
484
477
  $metadata: deserializeMetadata(output),
485
478
  ...contents,
486
479
  };
487
- return Promise.resolve(response);
480
+ return response;
488
481
  };
489
482
  const de_GetLendingAnalysisCommandError = async (output, context) => {
490
483
  const parsedOutput = {
@@ -519,10 +512,9 @@ const de_GetLendingAnalysisCommandError = async (output, context) => {
519
512
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
520
513
  default:
521
514
  const parsedBody = parsedOutput.body;
522
- throwDefaultError({
515
+ return throwDefaultError({
523
516
  output,
524
517
  parsedBody,
525
- exceptionCtor: __BaseException,
526
518
  errorCode,
527
519
  });
528
520
  }
@@ -533,12 +525,12 @@ export const de_GetLendingAnalysisSummaryCommand = async (output, context) => {
533
525
  }
534
526
  const data = await parseBody(output.body, context);
535
527
  let contents = {};
536
- contents = de_GetLendingAnalysisSummaryResponse(data, context);
528
+ contents = _json(data);
537
529
  const response = {
538
530
  $metadata: deserializeMetadata(output),
539
531
  ...contents,
540
532
  };
541
- return Promise.resolve(response);
533
+ return response;
542
534
  };
543
535
  const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
544
536
  const parsedOutput = {
@@ -573,10 +565,9 @@ const de_GetLendingAnalysisSummaryCommandError = async (output, context) => {
573
565
  throw await de_ThrottlingExceptionRes(parsedOutput, context);
574
566
  default:
575
567
  const parsedBody = parsedOutput.body;
576
- throwDefaultError({
568
+ return throwDefaultError({
577
569
  output,
578
570
  parsedBody,
579
- exceptionCtor: __BaseException,
580
571
  errorCode,
581
572
  });
582
573
  }
@@ -587,12 +578,12 @@ export const de_StartDocumentAnalysisCommand = async (output, context) => {
587
578
  }
588
579
  const data = await parseBody(output.body, context);
589
580
  let contents = {};
590
- contents = de_StartDocumentAnalysisResponse(data, context);
581
+ contents = _json(data);
591
582
  const response = {
592
583
  $metadata: deserializeMetadata(output),
593
584
  ...contents,
594
585
  };
595
- return Promise.resolve(response);
586
+ return response;
596
587
  };
597
588
  const de_StartDocumentAnalysisCommandError = async (output, context) => {
598
589
  const parsedOutput = {
@@ -639,10 +630,9 @@ const de_StartDocumentAnalysisCommandError = async (output, context) => {
639
630
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
640
631
  default:
641
632
  const parsedBody = parsedOutput.body;
642
- throwDefaultError({
633
+ return throwDefaultError({
643
634
  output,
644
635
  parsedBody,
645
- exceptionCtor: __BaseException,
646
636
  errorCode,
647
637
  });
648
638
  }
@@ -653,12 +643,12 @@ export const de_StartDocumentTextDetectionCommand = async (output, context) => {
653
643
  }
654
644
  const data = await parseBody(output.body, context);
655
645
  let contents = {};
656
- contents = de_StartDocumentTextDetectionResponse(data, context);
646
+ contents = _json(data);
657
647
  const response = {
658
648
  $metadata: deserializeMetadata(output),
659
649
  ...contents,
660
650
  };
661
- return Promise.resolve(response);
651
+ return response;
662
652
  };
663
653
  const de_StartDocumentTextDetectionCommandError = async (output, context) => {
664
654
  const parsedOutput = {
@@ -705,10 +695,9 @@ const de_StartDocumentTextDetectionCommandError = async (output, context) => {
705
695
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
706
696
  default:
707
697
  const parsedBody = parsedOutput.body;
708
- throwDefaultError({
698
+ return throwDefaultError({
709
699
  output,
710
700
  parsedBody,
711
- exceptionCtor: __BaseException,
712
701
  errorCode,
713
702
  });
714
703
  }
@@ -719,12 +708,12 @@ export const de_StartExpenseAnalysisCommand = async (output, context) => {
719
708
  }
720
709
  const data = await parseBody(output.body, context);
721
710
  let contents = {};
722
- contents = de_StartExpenseAnalysisResponse(data, context);
711
+ contents = _json(data);
723
712
  const response = {
724
713
  $metadata: deserializeMetadata(output),
725
714
  ...contents,
726
715
  };
727
- return Promise.resolve(response);
716
+ return response;
728
717
  };
729
718
  const de_StartExpenseAnalysisCommandError = async (output, context) => {
730
719
  const parsedOutput = {
@@ -771,10 +760,9 @@ const de_StartExpenseAnalysisCommandError = async (output, context) => {
771
760
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
772
761
  default:
773
762
  const parsedBody = parsedOutput.body;
774
- throwDefaultError({
763
+ return throwDefaultError({
775
764
  output,
776
765
  parsedBody,
777
- exceptionCtor: __BaseException,
778
766
  errorCode,
779
767
  });
780
768
  }
@@ -785,12 +773,12 @@ export const de_StartLendingAnalysisCommand = async (output, context) => {
785
773
  }
786
774
  const data = await parseBody(output.body, context);
787
775
  let contents = {};
788
- contents = de_StartLendingAnalysisResponse(data, context);
776
+ contents = _json(data);
789
777
  const response = {
790
778
  $metadata: deserializeMetadata(output),
791
779
  ...contents,
792
780
  };
793
- return Promise.resolve(response);
781
+ return response;
794
782
  };
795
783
  const de_StartLendingAnalysisCommandError = async (output, context) => {
796
784
  const parsedOutput = {
@@ -837,17 +825,16 @@ const de_StartLendingAnalysisCommandError = async (output, context) => {
837
825
  throw await de_UnsupportedDocumentExceptionRes(parsedOutput, context);
838
826
  default:
839
827
  const parsedBody = parsedOutput.body;
840
- throwDefaultError({
828
+ return throwDefaultError({
841
829
  output,
842
830
  parsedBody,
843
- exceptionCtor: __BaseException,
844
831
  errorCode,
845
832
  });
846
833
  }
847
834
  };
848
835
  const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
849
836
  const body = parsedOutput.body;
850
- const deserialized = de_AccessDeniedException(body, context);
837
+ const deserialized = _json(body);
851
838
  const exception = new AccessDeniedException({
852
839
  $metadata: deserializeMetadata(parsedOutput),
853
840
  ...deserialized,
@@ -856,7 +843,7 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
856
843
  };
857
844
  const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
858
845
  const body = parsedOutput.body;
859
- const deserialized = de_BadDocumentException(body, context);
846
+ const deserialized = _json(body);
860
847
  const exception = new BadDocumentException({
861
848
  $metadata: deserializeMetadata(parsedOutput),
862
849
  ...deserialized,
@@ -865,7 +852,7 @@ const de_BadDocumentExceptionRes = async (parsedOutput, context) => {
865
852
  };
866
853
  const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
867
854
  const body = parsedOutput.body;
868
- const deserialized = de_DocumentTooLargeException(body, context);
855
+ const deserialized = _json(body);
869
856
  const exception = new DocumentTooLargeException({
870
857
  $metadata: deserializeMetadata(parsedOutput),
871
858
  ...deserialized,
@@ -874,7 +861,7 @@ const de_DocumentTooLargeExceptionRes = async (parsedOutput, context) => {
874
861
  };
875
862
  const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
876
863
  const body = parsedOutput.body;
877
- const deserialized = de_HumanLoopQuotaExceededException(body, context);
864
+ const deserialized = _json(body);
878
865
  const exception = new HumanLoopQuotaExceededException({
879
866
  $metadata: deserializeMetadata(parsedOutput),
880
867
  ...deserialized,
@@ -883,7 +870,7 @@ const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
883
870
  };
884
871
  const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context) => {
885
872
  const body = parsedOutput.body;
886
- const deserialized = de_IdempotentParameterMismatchException(body, context);
873
+ const deserialized = _json(body);
887
874
  const exception = new IdempotentParameterMismatchException({
888
875
  $metadata: deserializeMetadata(parsedOutput),
889
876
  ...deserialized,
@@ -892,7 +879,7 @@ const de_IdempotentParameterMismatchExceptionRes = async (parsedOutput, context)
892
879
  };
893
880
  const de_InternalServerErrorRes = async (parsedOutput, context) => {
894
881
  const body = parsedOutput.body;
895
- const deserialized = de_InternalServerError(body, context);
882
+ const deserialized = _json(body);
896
883
  const exception = new InternalServerError({
897
884
  $metadata: deserializeMetadata(parsedOutput),
898
885
  ...deserialized,
@@ -901,7 +888,7 @@ const de_InternalServerErrorRes = async (parsedOutput, context) => {
901
888
  };
902
889
  const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
903
890
  const body = parsedOutput.body;
904
- const deserialized = de_InvalidJobIdException(body, context);
891
+ const deserialized = _json(body);
905
892
  const exception = new InvalidJobIdException({
906
893
  $metadata: deserializeMetadata(parsedOutput),
907
894
  ...deserialized,
@@ -910,7 +897,7 @@ const de_InvalidJobIdExceptionRes = async (parsedOutput, context) => {
910
897
  };
911
898
  const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
912
899
  const body = parsedOutput.body;
913
- const deserialized = de_InvalidKMSKeyException(body, context);
900
+ const deserialized = _json(body);
914
901
  const exception = new InvalidKMSKeyException({
915
902
  $metadata: deserializeMetadata(parsedOutput),
916
903
  ...deserialized,
@@ -919,7 +906,7 @@ const de_InvalidKMSKeyExceptionRes = async (parsedOutput, context) => {
919
906
  };
920
907
  const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
921
908
  const body = parsedOutput.body;
922
- const deserialized = de_InvalidParameterException(body, context);
909
+ const deserialized = _json(body);
923
910
  const exception = new InvalidParameterException({
924
911
  $metadata: deserializeMetadata(parsedOutput),
925
912
  ...deserialized,
@@ -928,7 +915,7 @@ const de_InvalidParameterExceptionRes = async (parsedOutput, context) => {
928
915
  };
929
916
  const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
930
917
  const body = parsedOutput.body;
931
- const deserialized = de_InvalidS3ObjectException(body, context);
918
+ const deserialized = _json(body);
932
919
  const exception = new InvalidS3ObjectException({
933
920
  $metadata: deserializeMetadata(parsedOutput),
934
921
  ...deserialized,
@@ -937,7 +924,7 @@ const de_InvalidS3ObjectExceptionRes = async (parsedOutput, context) => {
937
924
  };
938
925
  const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
939
926
  const body = parsedOutput.body;
940
- const deserialized = de_LimitExceededException(body, context);
927
+ const deserialized = _json(body);
941
928
  const exception = new LimitExceededException({
942
929
  $metadata: deserializeMetadata(parsedOutput),
943
930
  ...deserialized,
@@ -946,7 +933,7 @@ const de_LimitExceededExceptionRes = async (parsedOutput, context) => {
946
933
  };
947
934
  const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, context) => {
948
935
  const body = parsedOutput.body;
949
- const deserialized = de_ProvisionedThroughputExceededException(body, context);
936
+ const deserialized = _json(body);
950
937
  const exception = new ProvisionedThroughputExceededException({
951
938
  $metadata: deserializeMetadata(parsedOutput),
952
939
  ...deserialized,
@@ -955,7 +942,7 @@ const de_ProvisionedThroughputExceededExceptionRes = async (parsedOutput, contex
955
942
  };
956
943
  const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
957
944
  const body = parsedOutput.body;
958
- const deserialized = de_ThrottlingException(body, context);
945
+ const deserialized = _json(body);
959
946
  const exception = new ThrottlingException({
960
947
  $metadata: deserializeMetadata(parsedOutput),
961
948
  ...deserialized,
@@ -964,7 +951,7 @@ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
964
951
  };
965
952
  const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
966
953
  const body = parsedOutput.body;
967
- const deserialized = de_UnsupportedDocumentException(body, context);
954
+ const deserialized = _json(body);
968
955
  const exception = new UnsupportedDocumentException({
969
956
  $metadata: deserializeMetadata(parsedOutput),
970
957
  ...deserialized,
@@ -972,45 +959,33 @@ const de_UnsupportedDocumentExceptionRes = async (parsedOutput, context) => {
972
959
  return __decorateServiceException(exception, body);
973
960
  };
974
961
  const se_AnalyzeDocumentRequest = (input, context) => {
975
- return {
976
- ...(input.Document != null && { Document: se_Document(input.Document, context) }),
977
- ...(input.FeatureTypes != null && { FeatureTypes: se_FeatureTypes(input.FeatureTypes, context) }),
978
- ...(input.HumanLoopConfig != null && { HumanLoopConfig: se_HumanLoopConfig(input.HumanLoopConfig, context) }),
979
- ...(input.QueriesConfig != null && { QueriesConfig: se_QueriesConfig(input.QueriesConfig, context) }),
980
- };
962
+ return take(input, {
963
+ Document: (_) => se_Document(_, context),
964
+ FeatureTypes: _json,
965
+ HumanLoopConfig: _json,
966
+ QueriesConfig: _json,
967
+ });
981
968
  };
982
969
  const se_AnalyzeExpenseRequest = (input, context) => {
983
- return {
984
- ...(input.Document != null && { Document: se_Document(input.Document, context) }),
985
- };
970
+ return take(input, {
971
+ Document: (_) => se_Document(_, context),
972
+ });
986
973
  };
987
974
  const se_AnalyzeIDRequest = (input, context) => {
988
- return {
989
- ...(input.DocumentPages != null && { DocumentPages: se_DocumentPages(input.DocumentPages, context) }),
990
- };
991
- };
992
- const se_ContentClassifiers = (input, context) => {
993
- return input
994
- .filter((e) => e != null)
995
- .map((entry) => {
996
- return entry;
975
+ return take(input, {
976
+ DocumentPages: (_) => se_DocumentPages(_, context),
997
977
  });
998
978
  };
999
979
  const se_DetectDocumentTextRequest = (input, context) => {
1000
- return {
1001
- ...(input.Document != null && { Document: se_Document(input.Document, context) }),
1002
- };
980
+ return take(input, {
981
+ Document: (_) => se_Document(_, context),
982
+ });
1003
983
  };
1004
984
  const se_Document = (input, context) => {
1005
- return {
1006
- ...(input.Bytes != null && { Bytes: context.base64Encoder(input.Bytes) }),
1007
- ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }),
1008
- };
1009
- };
1010
- const se_DocumentLocation = (input, context) => {
1011
- return {
1012
- ...(input.S3Object != null && { S3Object: se_S3Object(input.S3Object, context) }),
1013
- };
985
+ return take(input, {
986
+ Bytes: context.base64Encoder,
987
+ S3Object: _json,
988
+ });
1014
989
  };
1015
990
  const se_DocumentPages = (input, context) => {
1016
991
  return input
@@ -1019,514 +994,218 @@ const se_DocumentPages = (input, context) => {
1019
994
  return se_Document(entry, context);
1020
995
  });
1021
996
  };
1022
- const se_FeatureTypes = (input, context) => {
1023
- return input
1024
- .filter((e) => e != null)
1025
- .map((entry) => {
1026
- return entry;
1027
- });
1028
- };
1029
- const se_GetDocumentAnalysisRequest = (input, context) => {
1030
- return {
1031
- ...(input.JobId != null && { JobId: input.JobId }),
1032
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1033
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1034
- };
1035
- };
1036
- const se_GetDocumentTextDetectionRequest = (input, context) => {
1037
- return {
1038
- ...(input.JobId != null && { JobId: input.JobId }),
1039
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1040
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1041
- };
1042
- };
1043
- const se_GetExpenseAnalysisRequest = (input, context) => {
1044
- return {
1045
- ...(input.JobId != null && { JobId: input.JobId }),
1046
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1047
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1048
- };
1049
- };
1050
- const se_GetLendingAnalysisRequest = (input, context) => {
1051
- return {
1052
- ...(input.JobId != null && { JobId: input.JobId }),
1053
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1054
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1055
- };
1056
- };
1057
- const se_GetLendingAnalysisSummaryRequest = (input, context) => {
1058
- return {
1059
- ...(input.JobId != null && { JobId: input.JobId }),
1060
- };
1061
- };
1062
- const se_HumanLoopConfig = (input, context) => {
1063
- return {
1064
- ...(input.DataAttributes != null && { DataAttributes: se_HumanLoopDataAttributes(input.DataAttributes, context) }),
1065
- ...(input.FlowDefinitionArn != null && { FlowDefinitionArn: input.FlowDefinitionArn }),
1066
- ...(input.HumanLoopName != null && { HumanLoopName: input.HumanLoopName }),
1067
- };
1068
- };
1069
- const se_HumanLoopDataAttributes = (input, context) => {
1070
- return {
1071
- ...(input.ContentClassifiers != null && {
1072
- ContentClassifiers: se_ContentClassifiers(input.ContentClassifiers, context),
1073
- }),
1074
- };
1075
- };
1076
- const se_NotificationChannel = (input, context) => {
1077
- return {
1078
- ...(input.RoleArn != null && { RoleArn: input.RoleArn }),
1079
- ...(input.SNSTopicArn != null && { SNSTopicArn: input.SNSTopicArn }),
1080
- };
1081
- };
1082
- const se_OutputConfig = (input, context) => {
1083
- return {
1084
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
1085
- ...(input.S3Prefix != null && { S3Prefix: input.S3Prefix }),
1086
- };
1087
- };
1088
- const se_Queries = (input, context) => {
1089
- return input
1090
- .filter((e) => e != null)
1091
- .map((entry) => {
1092
- return se_Query(entry, context);
1093
- });
1094
- };
1095
- const se_QueriesConfig = (input, context) => {
1096
- return {
1097
- ...(input.Queries != null && { Queries: se_Queries(input.Queries, context) }),
1098
- };
1099
- };
1100
- const se_Query = (input, context) => {
1101
- return {
1102
- ...(input.Alias != null && { Alias: input.Alias }),
1103
- ...(input.Pages != null && { Pages: se_QueryPages(input.Pages, context) }),
1104
- ...(input.Text != null && { Text: input.Text }),
1105
- };
1106
- };
1107
- const se_QueryPages = (input, context) => {
1108
- return input
1109
- .filter((e) => e != null)
1110
- .map((entry) => {
1111
- return entry;
1112
- });
1113
- };
1114
- const se_S3Object = (input, context) => {
1115
- return {
1116
- ...(input.Bucket != null && { Bucket: input.Bucket }),
1117
- ...(input.Name != null && { Name: input.Name }),
1118
- ...(input.Version != null && { Version: input.Version }),
1119
- };
1120
- };
1121
- const se_StartDocumentAnalysisRequest = (input, context) => {
1122
- return {
1123
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1124
- ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
1125
- ...(input.FeatureTypes != null && { FeatureTypes: se_FeatureTypes(input.FeatureTypes, context) }),
1126
- ...(input.JobTag != null && { JobTag: input.JobTag }),
1127
- ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1128
- ...(input.NotificationChannel != null && {
1129
- NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
1130
- }),
1131
- ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
1132
- ...(input.QueriesConfig != null && { QueriesConfig: se_QueriesConfig(input.QueriesConfig, context) }),
1133
- };
1134
- };
1135
- const se_StartDocumentTextDetectionRequest = (input, context) => {
1136
- return {
1137
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1138
- ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
1139
- ...(input.JobTag != null && { JobTag: input.JobTag }),
1140
- ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1141
- ...(input.NotificationChannel != null && {
1142
- NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
1143
- }),
1144
- ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
1145
- };
1146
- };
1147
- const se_StartExpenseAnalysisRequest = (input, context) => {
1148
- return {
1149
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1150
- ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
1151
- ...(input.JobTag != null && { JobTag: input.JobTag }),
1152
- ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1153
- ...(input.NotificationChannel != null && {
1154
- NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
1155
- }),
1156
- ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
1157
- };
1158
- };
1159
- const se_StartLendingAnalysisRequest = (input, context) => {
1160
- return {
1161
- ...(input.ClientRequestToken != null && { ClientRequestToken: input.ClientRequestToken }),
1162
- ...(input.DocumentLocation != null && { DocumentLocation: se_DocumentLocation(input.DocumentLocation, context) }),
1163
- ...(input.JobTag != null && { JobTag: input.JobTag }),
1164
- ...(input.KMSKeyId != null && { KMSKeyId: input.KMSKeyId }),
1165
- ...(input.NotificationChannel != null && {
1166
- NotificationChannel: se_NotificationChannel(input.NotificationChannel, context),
1167
- }),
1168
- ...(input.OutputConfig != null && { OutputConfig: se_OutputConfig(input.OutputConfig, context) }),
1169
- };
1170
- };
1171
- const de_AccessDeniedException = (output, context) => {
1172
- return {
1173
- Code: __expectString(output.Code),
1174
- Message: __expectString(output.Message),
1175
- };
1176
- };
1177
997
  const de_AnalyzeDocumentResponse = (output, context) => {
1178
- return {
1179
- AnalyzeDocumentModelVersion: __expectString(output.AnalyzeDocumentModelVersion),
1180
- Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
1181
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1182
- HumanLoopActivationOutput: output.HumanLoopActivationOutput != null
1183
- ? de_HumanLoopActivationOutput(output.HumanLoopActivationOutput, context)
1184
- : undefined,
1185
- };
998
+ return take(output, {
999
+ AnalyzeDocumentModelVersion: __expectString,
1000
+ Blocks: (_) => de_BlockList(_, context),
1001
+ DocumentMetadata: _json,
1002
+ HumanLoopActivationOutput: (_) => de_HumanLoopActivationOutput(_, context),
1003
+ });
1186
1004
  };
1187
1005
  const de_AnalyzeExpenseResponse = (output, context) => {
1188
- return {
1189
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1190
- ExpenseDocuments: output.ExpenseDocuments != null ? de_ExpenseDocumentList(output.ExpenseDocuments, context) : undefined,
1191
- };
1006
+ return take(output, {
1007
+ DocumentMetadata: _json,
1008
+ ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
1009
+ });
1192
1010
  };
1193
1011
  const de_AnalyzeIDDetections = (output, context) => {
1194
- return {
1195
- Confidence: __limitedParseFloat32(output.Confidence),
1196
- NormalizedValue: output.NormalizedValue != null ? de_NormalizedValue(output.NormalizedValue, context) : undefined,
1197
- Text: __expectString(output.Text),
1198
- };
1012
+ return take(output, {
1013
+ Confidence: __limitedParseFloat32,
1014
+ NormalizedValue: _json,
1015
+ Text: __expectString,
1016
+ });
1199
1017
  };
1200
1018
  const de_AnalyzeIDResponse = (output, context) => {
1201
- return {
1202
- AnalyzeIDModelVersion: __expectString(output.AnalyzeIDModelVersion),
1203
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1204
- IdentityDocuments: output.IdentityDocuments != null ? de_IdentityDocumentList(output.IdentityDocuments, context) : undefined,
1205
- };
1206
- };
1207
- const de_BadDocumentException = (output, context) => {
1208
- return {
1209
- Code: __expectString(output.Code),
1210
- Message: __expectString(output.Message),
1211
- };
1019
+ return take(output, {
1020
+ AnalyzeIDModelVersion: __expectString,
1021
+ DocumentMetadata: _json,
1022
+ IdentityDocuments: (_) => de_IdentityDocumentList(_, context),
1023
+ });
1212
1024
  };
1213
1025
  const de_Block = (output, context) => {
1214
- return {
1215
- BlockType: __expectString(output.BlockType),
1216
- ColumnIndex: __expectInt32(output.ColumnIndex),
1217
- ColumnSpan: __expectInt32(output.ColumnSpan),
1218
- Confidence: __limitedParseFloat32(output.Confidence),
1219
- EntityTypes: output.EntityTypes != null ? de_EntityTypes(output.EntityTypes, context) : undefined,
1220
- Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined,
1221
- Id: __expectString(output.Id),
1222
- Page: __expectInt32(output.Page),
1223
- Query: output.Query != null ? de_Query(output.Query, context) : undefined,
1224
- Relationships: output.Relationships != null ? de_RelationshipList(output.Relationships, context) : undefined,
1225
- RowIndex: __expectInt32(output.RowIndex),
1226
- RowSpan: __expectInt32(output.RowSpan),
1227
- SelectionStatus: __expectString(output.SelectionStatus),
1228
- Text: __expectString(output.Text),
1229
- TextType: __expectString(output.TextType),
1230
- };
1026
+ return take(output, {
1027
+ BlockType: __expectString,
1028
+ ColumnIndex: __expectInt32,
1029
+ ColumnSpan: __expectInt32,
1030
+ Confidence: __limitedParseFloat32,
1031
+ EntityTypes: _json,
1032
+ Geometry: (_) => de_Geometry(_, context),
1033
+ Id: __expectString,
1034
+ Page: __expectInt32,
1035
+ Query: _json,
1036
+ Relationships: _json,
1037
+ RowIndex: __expectInt32,
1038
+ RowSpan: __expectInt32,
1039
+ SelectionStatus: __expectString,
1040
+ Text: __expectString,
1041
+ TextType: __expectString,
1042
+ });
1231
1043
  };
1232
1044
  const de_BlockList = (output, context) => {
1233
1045
  const retVal = (output || [])
1234
1046
  .filter((e) => e != null)
1235
1047
  .map((entry) => {
1236
- if (entry === null) {
1237
- return null;
1238
- }
1239
1048
  return de_Block(entry, context);
1240
1049
  });
1241
1050
  return retVal;
1242
1051
  };
1243
1052
  const de_BoundingBox = (output, context) => {
1244
- return {
1245
- Height: __limitedParseFloat32(output.Height),
1246
- Left: __limitedParseFloat32(output.Left),
1247
- Top: __limitedParseFloat32(output.Top),
1248
- Width: __limitedParseFloat32(output.Width),
1249
- };
1250
- };
1251
- const de_DetectDocumentTextResponse = (output, context) => {
1252
- return {
1253
- Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
1254
- DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion),
1255
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1256
- };
1257
- };
1258
- const de_DetectedSignature = (output, context) => {
1259
- return {
1260
- Page: __expectInt32(output.Page),
1261
- };
1262
- };
1263
- const de_DetectedSignatureList = (output, context) => {
1264
- const retVal = (output || [])
1265
- .filter((e) => e != null)
1266
- .map((entry) => {
1267
- if (entry === null) {
1268
- return null;
1269
- }
1270
- return de_DetectedSignature(entry, context);
1271
- });
1272
- return retVal;
1273
- };
1274
- const de_DocumentGroup = (output, context) => {
1275
- return {
1276
- DetectedSignatures: output.DetectedSignatures != null ? de_DetectedSignatureList(output.DetectedSignatures, context) : undefined,
1277
- SplitDocuments: output.SplitDocuments != null ? de_SplitDocumentList(output.SplitDocuments, context) : undefined,
1278
- Type: __expectString(output.Type),
1279
- UndetectedSignatures: output.UndetectedSignatures != null
1280
- ? de_UndetectedSignatureList(output.UndetectedSignatures, context)
1281
- : undefined,
1282
- };
1283
- };
1284
- const de_DocumentGroupList = (output, context) => {
1285
- const retVal = (output || [])
1286
- .filter((e) => e != null)
1287
- .map((entry) => {
1288
- if (entry === null) {
1289
- return null;
1290
- }
1291
- return de_DocumentGroup(entry, context);
1053
+ return take(output, {
1054
+ Height: __limitedParseFloat32,
1055
+ Left: __limitedParseFloat32,
1056
+ Top: __limitedParseFloat32,
1057
+ Width: __limitedParseFloat32,
1292
1058
  });
1293
- return retVal;
1294
1059
  };
1295
- const de_DocumentMetadata = (output, context) => {
1296
- return {
1297
- Pages: __expectInt32(output.Pages),
1298
- };
1299
- };
1300
- const de_DocumentTooLargeException = (output, context) => {
1301
- return {
1302
- Code: __expectString(output.Code),
1303
- Message: __expectString(output.Message),
1304
- };
1305
- };
1306
- const de_EntityTypes = (output, context) => {
1307
- const retVal = (output || [])
1308
- .filter((e) => e != null)
1309
- .map((entry) => {
1310
- if (entry === null) {
1311
- return null;
1312
- }
1313
- return __expectString(entry);
1060
+ const de_DetectDocumentTextResponse = (output, context) => {
1061
+ return take(output, {
1062
+ Blocks: (_) => de_BlockList(_, context),
1063
+ DetectDocumentTextModelVersion: __expectString,
1064
+ DocumentMetadata: _json,
1314
1065
  });
1315
- return retVal;
1316
1066
  };
1317
1067
  const de_ExpenseCurrency = (output, context) => {
1318
- return {
1319
- Code: __expectString(output.Code),
1320
- Confidence: __limitedParseFloat32(output.Confidence),
1321
- };
1068
+ return take(output, {
1069
+ Code: __expectString,
1070
+ Confidence: __limitedParseFloat32,
1071
+ });
1322
1072
  };
1323
1073
  const de_ExpenseDetection = (output, context) => {
1324
- return {
1325
- Confidence: __limitedParseFloat32(output.Confidence),
1326
- Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined,
1327
- Text: __expectString(output.Text),
1328
- };
1074
+ return take(output, {
1075
+ Confidence: __limitedParseFloat32,
1076
+ Geometry: (_) => de_Geometry(_, context),
1077
+ Text: __expectString,
1078
+ });
1329
1079
  };
1330
1080
  const de_ExpenseDocument = (output, context) => {
1331
- return {
1332
- Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
1333
- ExpenseIndex: __expectInt32(output.ExpenseIndex),
1334
- LineItemGroups: output.LineItemGroups != null ? de_LineItemGroupList(output.LineItemGroups, context) : undefined,
1335
- SummaryFields: output.SummaryFields != null ? de_ExpenseFieldList(output.SummaryFields, context) : undefined,
1336
- };
1081
+ return take(output, {
1082
+ Blocks: (_) => de_BlockList(_, context),
1083
+ ExpenseIndex: __expectInt32,
1084
+ LineItemGroups: (_) => de_LineItemGroupList(_, context),
1085
+ SummaryFields: (_) => de_ExpenseFieldList(_, context),
1086
+ });
1337
1087
  };
1338
1088
  const de_ExpenseDocumentList = (output, context) => {
1339
1089
  const retVal = (output || [])
1340
1090
  .filter((e) => e != null)
1341
1091
  .map((entry) => {
1342
- if (entry === null) {
1343
- return null;
1344
- }
1345
1092
  return de_ExpenseDocument(entry, context);
1346
1093
  });
1347
1094
  return retVal;
1348
1095
  };
1349
1096
  const de_ExpenseField = (output, context) => {
1350
- return {
1351
- Currency: output.Currency != null ? de_ExpenseCurrency(output.Currency, context) : undefined,
1352
- GroupProperties: output.GroupProperties != null ? de_ExpenseGroupPropertyList(output.GroupProperties, context) : undefined,
1353
- LabelDetection: output.LabelDetection != null ? de_ExpenseDetection(output.LabelDetection, context) : undefined,
1354
- PageNumber: __expectInt32(output.PageNumber),
1355
- Type: output.Type != null ? de_ExpenseType(output.Type, context) : undefined,
1356
- ValueDetection: output.ValueDetection != null ? de_ExpenseDetection(output.ValueDetection, context) : undefined,
1357
- };
1097
+ return take(output, {
1098
+ Currency: (_) => de_ExpenseCurrency(_, context),
1099
+ GroupProperties: _json,
1100
+ LabelDetection: (_) => de_ExpenseDetection(_, context),
1101
+ PageNumber: __expectInt32,
1102
+ Type: (_) => de_ExpenseType(_, context),
1103
+ ValueDetection: (_) => de_ExpenseDetection(_, context),
1104
+ });
1358
1105
  };
1359
1106
  const de_ExpenseFieldList = (output, context) => {
1360
1107
  const retVal = (output || [])
1361
1108
  .filter((e) => e != null)
1362
1109
  .map((entry) => {
1363
- if (entry === null) {
1364
- return null;
1365
- }
1366
1110
  return de_ExpenseField(entry, context);
1367
1111
  });
1368
1112
  return retVal;
1369
1113
  };
1370
- const de_ExpenseGroupProperty = (output, context) => {
1371
- return {
1372
- Id: __expectString(output.Id),
1373
- Types: output.Types != null ? de_StringList(output.Types, context) : undefined,
1374
- };
1375
- };
1376
- const de_ExpenseGroupPropertyList = (output, context) => {
1377
- const retVal = (output || [])
1378
- .filter((e) => e != null)
1379
- .map((entry) => {
1380
- if (entry === null) {
1381
- return null;
1382
- }
1383
- return de_ExpenseGroupProperty(entry, context);
1384
- });
1385
- return retVal;
1386
- };
1387
1114
  const de_ExpenseType = (output, context) => {
1388
- return {
1389
- Confidence: __limitedParseFloat32(output.Confidence),
1390
- Text: __expectString(output.Text),
1391
- };
1115
+ return take(output, {
1116
+ Confidence: __limitedParseFloat32,
1117
+ Text: __expectString,
1118
+ });
1392
1119
  };
1393
1120
  const de_Extraction = (output, context) => {
1394
- return {
1395
- ExpenseDocument: output.ExpenseDocument != null ? de_ExpenseDocument(output.ExpenseDocument, context) : undefined,
1396
- IdentityDocument: output.IdentityDocument != null ? de_IdentityDocument(output.IdentityDocument, context) : undefined,
1397
- LendingDocument: output.LendingDocument != null ? de_LendingDocument(output.LendingDocument, context) : undefined,
1398
- };
1121
+ return take(output, {
1122
+ ExpenseDocument: (_) => de_ExpenseDocument(_, context),
1123
+ IdentityDocument: (_) => de_IdentityDocument(_, context),
1124
+ LendingDocument: (_) => de_LendingDocument(_, context),
1125
+ });
1399
1126
  };
1400
1127
  const de_ExtractionList = (output, context) => {
1401
1128
  const retVal = (output || [])
1402
1129
  .filter((e) => e != null)
1403
1130
  .map((entry) => {
1404
- if (entry === null) {
1405
- return null;
1406
- }
1407
1131
  return de_Extraction(entry, context);
1408
1132
  });
1409
1133
  return retVal;
1410
1134
  };
1411
1135
  const de_Geometry = (output, context) => {
1412
- return {
1413
- BoundingBox: output.BoundingBox != null ? de_BoundingBox(output.BoundingBox, context) : undefined,
1414
- Polygon: output.Polygon != null ? de_Polygon(output.Polygon, context) : undefined,
1415
- };
1136
+ return take(output, {
1137
+ BoundingBox: (_) => de_BoundingBox(_, context),
1138
+ Polygon: (_) => de_Polygon(_, context),
1139
+ });
1416
1140
  };
1417
1141
  const de_GetDocumentAnalysisResponse = (output, context) => {
1418
- return {
1419
- AnalyzeDocumentModelVersion: __expectString(output.AnalyzeDocumentModelVersion),
1420
- Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
1421
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1422
- JobStatus: __expectString(output.JobStatus),
1423
- NextToken: __expectString(output.NextToken),
1424
- StatusMessage: __expectString(output.StatusMessage),
1425
- Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
1426
- };
1142
+ return take(output, {
1143
+ AnalyzeDocumentModelVersion: __expectString,
1144
+ Blocks: (_) => de_BlockList(_, context),
1145
+ DocumentMetadata: _json,
1146
+ JobStatus: __expectString,
1147
+ NextToken: __expectString,
1148
+ StatusMessage: __expectString,
1149
+ Warnings: _json,
1150
+ });
1427
1151
  };
1428
1152
  const de_GetDocumentTextDetectionResponse = (output, context) => {
1429
- return {
1430
- Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
1431
- DetectDocumentTextModelVersion: __expectString(output.DetectDocumentTextModelVersion),
1432
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1433
- JobStatus: __expectString(output.JobStatus),
1434
- NextToken: __expectString(output.NextToken),
1435
- StatusMessage: __expectString(output.StatusMessage),
1436
- Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
1437
- };
1153
+ return take(output, {
1154
+ Blocks: (_) => de_BlockList(_, context),
1155
+ DetectDocumentTextModelVersion: __expectString,
1156
+ DocumentMetadata: _json,
1157
+ JobStatus: __expectString,
1158
+ NextToken: __expectString,
1159
+ StatusMessage: __expectString,
1160
+ Warnings: _json,
1161
+ });
1438
1162
  };
1439
1163
  const de_GetExpenseAnalysisResponse = (output, context) => {
1440
- return {
1441
- AnalyzeExpenseModelVersion: __expectString(output.AnalyzeExpenseModelVersion),
1442
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1443
- ExpenseDocuments: output.ExpenseDocuments != null ? de_ExpenseDocumentList(output.ExpenseDocuments, context) : undefined,
1444
- JobStatus: __expectString(output.JobStatus),
1445
- NextToken: __expectString(output.NextToken),
1446
- StatusMessage: __expectString(output.StatusMessage),
1447
- Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
1448
- };
1164
+ return take(output, {
1165
+ AnalyzeExpenseModelVersion: __expectString,
1166
+ DocumentMetadata: _json,
1167
+ ExpenseDocuments: (_) => de_ExpenseDocumentList(_, context),
1168
+ JobStatus: __expectString,
1169
+ NextToken: __expectString,
1170
+ StatusMessage: __expectString,
1171
+ Warnings: _json,
1172
+ });
1449
1173
  };
1450
1174
  const de_GetLendingAnalysisResponse = (output, context) => {
1451
- return {
1452
- AnalyzeLendingModelVersion: __expectString(output.AnalyzeLendingModelVersion),
1453
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1454
- JobStatus: __expectString(output.JobStatus),
1455
- NextToken: __expectString(output.NextToken),
1456
- Results: output.Results != null ? de_LendingResultList(output.Results, context) : undefined,
1457
- StatusMessage: __expectString(output.StatusMessage),
1458
- Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
1459
- };
1460
- };
1461
- const de_GetLendingAnalysisSummaryResponse = (output, context) => {
1462
- return {
1463
- AnalyzeLendingModelVersion: __expectString(output.AnalyzeLendingModelVersion),
1464
- DocumentMetadata: output.DocumentMetadata != null ? de_DocumentMetadata(output.DocumentMetadata, context) : undefined,
1465
- JobStatus: __expectString(output.JobStatus),
1466
- StatusMessage: __expectString(output.StatusMessage),
1467
- Summary: output.Summary != null ? de_LendingSummary(output.Summary, context) : undefined,
1468
- Warnings: output.Warnings != null ? de_Warnings(output.Warnings, context) : undefined,
1469
- };
1175
+ return take(output, {
1176
+ AnalyzeLendingModelVersion: __expectString,
1177
+ DocumentMetadata: _json,
1178
+ JobStatus: __expectString,
1179
+ NextToken: __expectString,
1180
+ Results: (_) => de_LendingResultList(_, context),
1181
+ StatusMessage: __expectString,
1182
+ Warnings: _json,
1183
+ });
1470
1184
  };
1471
1185
  const de_HumanLoopActivationOutput = (output, context) => {
1472
- return {
1473
- HumanLoopActivationConditionsEvaluationResults: output.HumanLoopActivationConditionsEvaluationResults != null
1474
- ? new __LazyJsonString(output.HumanLoopActivationConditionsEvaluationResults)
1475
- : undefined,
1476
- HumanLoopActivationReasons: output.HumanLoopActivationReasons != null
1477
- ? de_HumanLoopActivationReasons(output.HumanLoopActivationReasons, context)
1478
- : undefined,
1479
- HumanLoopArn: __expectString(output.HumanLoopArn),
1480
- };
1481
- };
1482
- const de_HumanLoopActivationReasons = (output, context) => {
1483
- const retVal = (output || [])
1484
- .filter((e) => e != null)
1485
- .map((entry) => {
1486
- if (entry === null) {
1487
- return null;
1488
- }
1489
- return __expectString(entry);
1186
+ return take(output, {
1187
+ HumanLoopActivationConditionsEvaluationResults: (_) => new __LazyJsonString(_),
1188
+ HumanLoopActivationReasons: _json,
1189
+ HumanLoopArn: __expectString,
1490
1190
  });
1491
- return retVal;
1492
- };
1493
- const de_HumanLoopQuotaExceededException = (output, context) => {
1494
- return {
1495
- Code: __expectString(output.Code),
1496
- Message: __expectString(output.Message),
1497
- QuotaCode: __expectString(output.QuotaCode),
1498
- ResourceType: __expectString(output.ResourceType),
1499
- ServiceCode: __expectString(output.ServiceCode),
1500
- };
1501
- };
1502
- const de_IdempotentParameterMismatchException = (output, context) => {
1503
- return {
1504
- Code: __expectString(output.Code),
1505
- Message: __expectString(output.Message),
1506
- };
1507
1191
  };
1508
1192
  const de_IdentityDocument = (output, context) => {
1509
- return {
1510
- Blocks: output.Blocks != null ? de_BlockList(output.Blocks, context) : undefined,
1511
- DocumentIndex: __expectInt32(output.DocumentIndex),
1512
- IdentityDocumentFields: output.IdentityDocumentFields != null
1513
- ? de_IdentityDocumentFieldList(output.IdentityDocumentFields, context)
1514
- : undefined,
1515
- };
1193
+ return take(output, {
1194
+ Blocks: (_) => de_BlockList(_, context),
1195
+ DocumentIndex: __expectInt32,
1196
+ IdentityDocumentFields: (_) => de_IdentityDocumentFieldList(_, context),
1197
+ });
1516
1198
  };
1517
1199
  const de_IdentityDocumentField = (output, context) => {
1518
- return {
1519
- Type: output.Type != null ? de_AnalyzeIDDetections(output.Type, context) : undefined,
1520
- ValueDetection: output.ValueDetection != null ? de_AnalyzeIDDetections(output.ValueDetection, context) : undefined,
1521
- };
1200
+ return take(output, {
1201
+ Type: (_) => de_AnalyzeIDDetections(_, context),
1202
+ ValueDetection: (_) => de_AnalyzeIDDetections(_, context),
1203
+ });
1522
1204
  };
1523
1205
  const de_IdentityDocumentFieldList = (output, context) => {
1524
1206
  const retVal = (output || [])
1525
1207
  .filter((e) => e != null)
1526
1208
  .map((entry) => {
1527
- if (entry === null) {
1528
- return null;
1529
- }
1530
1209
  return de_IdentityDocumentField(entry, context);
1531
1210
  });
1532
1211
  return retVal;
@@ -1535,147 +1214,77 @@ const de_IdentityDocumentList = (output, context) => {
1535
1214
  const retVal = (output || [])
1536
1215
  .filter((e) => e != null)
1537
1216
  .map((entry) => {
1538
- if (entry === null) {
1539
- return null;
1540
- }
1541
1217
  return de_IdentityDocument(entry, context);
1542
1218
  });
1543
1219
  return retVal;
1544
1220
  };
1545
- const de_IdList = (output, context) => {
1546
- const retVal = (output || [])
1547
- .filter((e) => e != null)
1548
- .map((entry) => {
1549
- if (entry === null) {
1550
- return null;
1551
- }
1552
- return __expectString(entry);
1553
- });
1554
- return retVal;
1555
- };
1556
- const de_InternalServerError = (output, context) => {
1557
- return {
1558
- Code: __expectString(output.Code),
1559
- Message: __expectString(output.Message),
1560
- };
1561
- };
1562
- const de_InvalidJobIdException = (output, context) => {
1563
- return {
1564
- Code: __expectString(output.Code),
1565
- Message: __expectString(output.Message),
1566
- };
1567
- };
1568
- const de_InvalidKMSKeyException = (output, context) => {
1569
- return {
1570
- Code: __expectString(output.Code),
1571
- Message: __expectString(output.Message),
1572
- };
1573
- };
1574
- const de_InvalidParameterException = (output, context) => {
1575
- return {
1576
- Code: __expectString(output.Code),
1577
- Message: __expectString(output.Message),
1578
- };
1579
- };
1580
- const de_InvalidS3ObjectException = (output, context) => {
1581
- return {
1582
- Code: __expectString(output.Code),
1583
- Message: __expectString(output.Message),
1584
- };
1585
- };
1586
1221
  const de_LendingDetection = (output, context) => {
1587
- return {
1588
- Confidence: __limitedParseFloat32(output.Confidence),
1589
- Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined,
1590
- SelectionStatus: __expectString(output.SelectionStatus),
1591
- Text: __expectString(output.Text),
1592
- };
1222
+ return take(output, {
1223
+ Confidence: __limitedParseFloat32,
1224
+ Geometry: (_) => de_Geometry(_, context),
1225
+ SelectionStatus: __expectString,
1226
+ Text: __expectString,
1227
+ });
1593
1228
  };
1594
1229
  const de_LendingDetectionList = (output, context) => {
1595
1230
  const retVal = (output || [])
1596
1231
  .filter((e) => e != null)
1597
1232
  .map((entry) => {
1598
- if (entry === null) {
1599
- return null;
1600
- }
1601
1233
  return de_LendingDetection(entry, context);
1602
1234
  });
1603
1235
  return retVal;
1604
1236
  };
1605
1237
  const de_LendingDocument = (output, context) => {
1606
- return {
1607
- LendingFields: output.LendingFields != null ? de_LendingFieldList(output.LendingFields, context) : undefined,
1608
- SignatureDetections: output.SignatureDetections != null ? de_SignatureDetectionList(output.SignatureDetections, context) : undefined,
1609
- };
1238
+ return take(output, {
1239
+ LendingFields: (_) => de_LendingFieldList(_, context),
1240
+ SignatureDetections: (_) => de_SignatureDetectionList(_, context),
1241
+ });
1610
1242
  };
1611
1243
  const de_LendingField = (output, context) => {
1612
- return {
1613
- KeyDetection: output.KeyDetection != null ? de_LendingDetection(output.KeyDetection, context) : undefined,
1614
- Type: __expectString(output.Type),
1615
- ValueDetections: output.ValueDetections != null ? de_LendingDetectionList(output.ValueDetections, context) : undefined,
1616
- };
1244
+ return take(output, {
1245
+ KeyDetection: (_) => de_LendingDetection(_, context),
1246
+ Type: __expectString,
1247
+ ValueDetections: (_) => de_LendingDetectionList(_, context),
1248
+ });
1617
1249
  };
1618
1250
  const de_LendingFieldList = (output, context) => {
1619
1251
  const retVal = (output || [])
1620
1252
  .filter((e) => e != null)
1621
1253
  .map((entry) => {
1622
- if (entry === null) {
1623
- return null;
1624
- }
1625
1254
  return de_LendingField(entry, context);
1626
1255
  });
1627
1256
  return retVal;
1628
1257
  };
1629
1258
  const de_LendingResult = (output, context) => {
1630
- return {
1631
- Extractions: output.Extractions != null ? de_ExtractionList(output.Extractions, context) : undefined,
1632
- Page: __expectInt32(output.Page),
1633
- PageClassification: output.PageClassification != null ? de_PageClassification(output.PageClassification, context) : undefined,
1634
- };
1259
+ return take(output, {
1260
+ Extractions: (_) => de_ExtractionList(_, context),
1261
+ Page: __expectInt32,
1262
+ PageClassification: (_) => de_PageClassification(_, context),
1263
+ });
1635
1264
  };
1636
1265
  const de_LendingResultList = (output, context) => {
1637
1266
  const retVal = (output || [])
1638
1267
  .filter((e) => e != null)
1639
1268
  .map((entry) => {
1640
- if (entry === null) {
1641
- return null;
1642
- }
1643
1269
  return de_LendingResult(entry, context);
1644
1270
  });
1645
1271
  return retVal;
1646
1272
  };
1647
- const de_LendingSummary = (output, context) => {
1648
- return {
1649
- DocumentGroups: output.DocumentGroups != null ? de_DocumentGroupList(output.DocumentGroups, context) : undefined,
1650
- UndetectedDocumentTypes: output.UndetectedDocumentTypes != null
1651
- ? de_UndetectedDocumentTypeList(output.UndetectedDocumentTypes, context)
1652
- : undefined,
1653
- };
1654
- };
1655
- const de_LimitExceededException = (output, context) => {
1656
- return {
1657
- Code: __expectString(output.Code),
1658
- Message: __expectString(output.Message),
1659
- };
1660
- };
1661
1273
  const de_LineItemFields = (output, context) => {
1662
- return {
1663
- LineItemExpenseFields: output.LineItemExpenseFields != null ? de_ExpenseFieldList(output.LineItemExpenseFields, context) : undefined,
1664
- };
1274
+ return take(output, {
1275
+ LineItemExpenseFields: (_) => de_ExpenseFieldList(_, context),
1276
+ });
1665
1277
  };
1666
1278
  const de_LineItemGroup = (output, context) => {
1667
- return {
1668
- LineItemGroupIndex: __expectInt32(output.LineItemGroupIndex),
1669
- LineItems: output.LineItems != null ? de_LineItemList(output.LineItems, context) : undefined,
1670
- };
1279
+ return take(output, {
1280
+ LineItemGroupIndex: __expectInt32,
1281
+ LineItems: (_) => de_LineItemList(_, context),
1282
+ });
1671
1283
  };
1672
1284
  const de_LineItemGroupList = (output, context) => {
1673
1285
  const retVal = (output || [])
1674
1286
  .filter((e) => e != null)
1675
1287
  .map((entry) => {
1676
- if (entry === null) {
1677
- return null;
1678
- }
1679
1288
  return de_LineItemGroup(entry, context);
1680
1289
  });
1681
1290
  return retVal;
@@ -1684,243 +1293,58 @@ const de_LineItemList = (output, context) => {
1684
1293
  const retVal = (output || [])
1685
1294
  .filter((e) => e != null)
1686
1295
  .map((entry) => {
1687
- if (entry === null) {
1688
- return null;
1689
- }
1690
1296
  return de_LineItemFields(entry, context);
1691
1297
  });
1692
1298
  return retVal;
1693
1299
  };
1694
- const de_NormalizedValue = (output, context) => {
1695
- return {
1696
- Value: __expectString(output.Value),
1697
- ValueType: __expectString(output.ValueType),
1698
- };
1699
- };
1700
1300
  const de_PageClassification = (output, context) => {
1701
- return {
1702
- PageNumber: output.PageNumber != null ? de_PredictionList(output.PageNumber, context) : undefined,
1703
- PageType: output.PageType != null ? de_PredictionList(output.PageType, context) : undefined,
1704
- };
1705
- };
1706
- const de_PageList = (output, context) => {
1707
- const retVal = (output || [])
1708
- .filter((e) => e != null)
1709
- .map((entry) => {
1710
- if (entry === null) {
1711
- return null;
1712
- }
1713
- return __expectInt32(entry);
1301
+ return take(output, {
1302
+ PageNumber: (_) => de_PredictionList(_, context),
1303
+ PageType: (_) => de_PredictionList(_, context),
1714
1304
  });
1715
- return retVal;
1716
- };
1717
- const de_Pages = (output, context) => {
1718
- const retVal = (output || [])
1719
- .filter((e) => e != null)
1720
- .map((entry) => {
1721
- if (entry === null) {
1722
- return null;
1723
- }
1724
- return __expectInt32(entry);
1725
- });
1726
- return retVal;
1727
1305
  };
1728
1306
  const de_Point = (output, context) => {
1729
- return {
1730
- X: __limitedParseFloat32(output.X),
1731
- Y: __limitedParseFloat32(output.Y),
1732
- };
1307
+ return take(output, {
1308
+ X: __limitedParseFloat32,
1309
+ Y: __limitedParseFloat32,
1310
+ });
1733
1311
  };
1734
1312
  const de_Polygon = (output, context) => {
1735
1313
  const retVal = (output || [])
1736
1314
  .filter((e) => e != null)
1737
1315
  .map((entry) => {
1738
- if (entry === null) {
1739
- return null;
1740
- }
1741
1316
  return de_Point(entry, context);
1742
1317
  });
1743
1318
  return retVal;
1744
1319
  };
1745
1320
  const de_Prediction = (output, context) => {
1746
- return {
1747
- Confidence: __limitedParseFloat32(output.Confidence),
1748
- Value: __expectString(output.Value),
1749
- };
1321
+ return take(output, {
1322
+ Confidence: __limitedParseFloat32,
1323
+ Value: __expectString,
1324
+ });
1750
1325
  };
1751
1326
  const de_PredictionList = (output, context) => {
1752
1327
  const retVal = (output || [])
1753
1328
  .filter((e) => e != null)
1754
1329
  .map((entry) => {
1755
- if (entry === null) {
1756
- return null;
1757
- }
1758
1330
  return de_Prediction(entry, context);
1759
1331
  });
1760
1332
  return retVal;
1761
1333
  };
1762
- const de_ProvisionedThroughputExceededException = (output, context) => {
1763
- return {
1764
- Code: __expectString(output.Code),
1765
- Message: __expectString(output.Message),
1766
- };
1767
- };
1768
- const de_Query = (output, context) => {
1769
- return {
1770
- Alias: __expectString(output.Alias),
1771
- Pages: output.Pages != null ? de_QueryPages(output.Pages, context) : undefined,
1772
- Text: __expectString(output.Text),
1773
- };
1774
- };
1775
- const de_QueryPages = (output, context) => {
1776
- const retVal = (output || [])
1777
- .filter((e) => e != null)
1778
- .map((entry) => {
1779
- if (entry === null) {
1780
- return null;
1781
- }
1782
- return __expectString(entry);
1783
- });
1784
- return retVal;
1785
- };
1786
- const de_Relationship = (output, context) => {
1787
- return {
1788
- Ids: output.Ids != null ? de_IdList(output.Ids, context) : undefined,
1789
- Type: __expectString(output.Type),
1790
- };
1791
- };
1792
- const de_RelationshipList = (output, context) => {
1793
- const retVal = (output || [])
1794
- .filter((e) => e != null)
1795
- .map((entry) => {
1796
- if (entry === null) {
1797
- return null;
1798
- }
1799
- return de_Relationship(entry, context);
1800
- });
1801
- return retVal;
1802
- };
1803
1334
  const de_SignatureDetection = (output, context) => {
1804
- return {
1805
- Confidence: __limitedParseFloat32(output.Confidence),
1806
- Geometry: output.Geometry != null ? de_Geometry(output.Geometry, context) : undefined,
1807
- };
1335
+ return take(output, {
1336
+ Confidence: __limitedParseFloat32,
1337
+ Geometry: (_) => de_Geometry(_, context),
1338
+ });
1808
1339
  };
1809
1340
  const de_SignatureDetectionList = (output, context) => {
1810
1341
  const retVal = (output || [])
1811
1342
  .filter((e) => e != null)
1812
1343
  .map((entry) => {
1813
- if (entry === null) {
1814
- return null;
1815
- }
1816
1344
  return de_SignatureDetection(entry, context);
1817
1345
  });
1818
1346
  return retVal;
1819
1347
  };
1820
- const de_SplitDocument = (output, context) => {
1821
- return {
1822
- Index: __expectInt32(output.Index),
1823
- Pages: output.Pages != null ? de_PageList(output.Pages, context) : undefined,
1824
- };
1825
- };
1826
- const de_SplitDocumentList = (output, context) => {
1827
- const retVal = (output || [])
1828
- .filter((e) => e != null)
1829
- .map((entry) => {
1830
- if (entry === null) {
1831
- return null;
1832
- }
1833
- return de_SplitDocument(entry, context);
1834
- });
1835
- return retVal;
1836
- };
1837
- const de_StartDocumentAnalysisResponse = (output, context) => {
1838
- return {
1839
- JobId: __expectString(output.JobId),
1840
- };
1841
- };
1842
- const de_StartDocumentTextDetectionResponse = (output, context) => {
1843
- return {
1844
- JobId: __expectString(output.JobId),
1845
- };
1846
- };
1847
- const de_StartExpenseAnalysisResponse = (output, context) => {
1848
- return {
1849
- JobId: __expectString(output.JobId),
1850
- };
1851
- };
1852
- const de_StartLendingAnalysisResponse = (output, context) => {
1853
- return {
1854
- JobId: __expectString(output.JobId),
1855
- };
1856
- };
1857
- const de_StringList = (output, context) => {
1858
- const retVal = (output || [])
1859
- .filter((e) => e != null)
1860
- .map((entry) => {
1861
- if (entry === null) {
1862
- return null;
1863
- }
1864
- return __expectString(entry);
1865
- });
1866
- return retVal;
1867
- };
1868
- const de_ThrottlingException = (output, context) => {
1869
- return {
1870
- Code: __expectString(output.Code),
1871
- Message: __expectString(output.Message),
1872
- };
1873
- };
1874
- const de_UndetectedDocumentTypeList = (output, context) => {
1875
- const retVal = (output || [])
1876
- .filter((e) => e != null)
1877
- .map((entry) => {
1878
- if (entry === null) {
1879
- return null;
1880
- }
1881
- return __expectString(entry);
1882
- });
1883
- return retVal;
1884
- };
1885
- const de_UndetectedSignature = (output, context) => {
1886
- return {
1887
- Page: __expectInt32(output.Page),
1888
- };
1889
- };
1890
- const de_UndetectedSignatureList = (output, context) => {
1891
- const retVal = (output || [])
1892
- .filter((e) => e != null)
1893
- .map((entry) => {
1894
- if (entry === null) {
1895
- return null;
1896
- }
1897
- return de_UndetectedSignature(entry, context);
1898
- });
1899
- return retVal;
1900
- };
1901
- const de_UnsupportedDocumentException = (output, context) => {
1902
- return {
1903
- Code: __expectString(output.Code),
1904
- Message: __expectString(output.Message),
1905
- };
1906
- };
1907
- const de_Warning = (output, context) => {
1908
- return {
1909
- ErrorCode: __expectString(output.ErrorCode),
1910
- Pages: output.Pages != null ? de_Pages(output.Pages, context) : undefined,
1911
- };
1912
- };
1913
- const de_Warnings = (output, context) => {
1914
- const retVal = (output || [])
1915
- .filter((e) => e != null)
1916
- .map((entry) => {
1917
- if (entry === null) {
1918
- return null;
1919
- }
1920
- return de_Warning(entry, context);
1921
- });
1922
- return retVal;
1923
- };
1924
1348
  const deserializeMetadata = (output) => ({
1925
1349
  httpStatusCode: output.statusCode,
1926
1350
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -1934,6 +1358,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
1934
1358
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
1935
1359
  };
1936
1360
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1361
+ const throwDefaultError = withBaseException(__BaseException);
1937
1362
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
1938
1363
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
1939
1364
  const contents = {