@aws-sdk/client-comprehendmedical 3.312.0 → 3.315.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,72 +1,72 @@
1
1
  import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
- import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, throwDefaultError, } from "@aws-sdk/smithy-client";
2
+ import { _json, decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, take, withBaseException, } from "@aws-sdk/smithy-client";
3
3
  import { v4 as generateIdempotencyToken } from "uuid";
4
4
  import { ComprehendMedicalServiceException as __BaseException } from "../models/ComprehendMedicalServiceException";
5
5
  import { InternalServerException, InvalidEncodingException, InvalidRequestException, ResourceNotFoundException, ServiceUnavailableException, TextSizeLimitExceededException, TooManyRequestsException, ValidationException, } from "../models/models_0";
6
6
  export const se_DescribeEntitiesDetectionV2JobCommand = async (input, context) => {
7
7
  const headers = sharedHeaders("DescribeEntitiesDetectionV2Job");
8
8
  let body;
9
- body = JSON.stringify(se_DescribeEntitiesDetectionV2JobRequest(input, context));
9
+ body = JSON.stringify(_json(input));
10
10
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
11
11
  };
12
12
  export const se_DescribeICD10CMInferenceJobCommand = async (input, context) => {
13
13
  const headers = sharedHeaders("DescribeICD10CMInferenceJob");
14
14
  let body;
15
- body = JSON.stringify(se_DescribeICD10CMInferenceJobRequest(input, context));
15
+ body = JSON.stringify(_json(input));
16
16
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
17
17
  };
18
18
  export const se_DescribePHIDetectionJobCommand = async (input, context) => {
19
19
  const headers = sharedHeaders("DescribePHIDetectionJob");
20
20
  let body;
21
- body = JSON.stringify(se_DescribePHIDetectionJobRequest(input, context));
21
+ body = JSON.stringify(_json(input));
22
22
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
23
23
  };
24
24
  export const se_DescribeRxNormInferenceJobCommand = async (input, context) => {
25
25
  const headers = sharedHeaders("DescribeRxNormInferenceJob");
26
26
  let body;
27
- body = JSON.stringify(se_DescribeRxNormInferenceJobRequest(input, context));
27
+ body = JSON.stringify(_json(input));
28
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
29
  };
30
30
  export const se_DescribeSNOMEDCTInferenceJobCommand = async (input, context) => {
31
31
  const headers = sharedHeaders("DescribeSNOMEDCTInferenceJob");
32
32
  let body;
33
- body = JSON.stringify(se_DescribeSNOMEDCTInferenceJobRequest(input, context));
33
+ body = JSON.stringify(_json(input));
34
34
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
35
35
  };
36
36
  export const se_DetectEntitiesCommand = async (input, context) => {
37
37
  const headers = sharedHeaders("DetectEntities");
38
38
  let body;
39
- body = JSON.stringify(se_DetectEntitiesRequest(input, context));
39
+ body = JSON.stringify(_json(input));
40
40
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
41
41
  };
42
42
  export const se_DetectEntitiesV2Command = async (input, context) => {
43
43
  const headers = sharedHeaders("DetectEntitiesV2");
44
44
  let body;
45
- body = JSON.stringify(se_DetectEntitiesV2Request(input, context));
45
+ body = JSON.stringify(_json(input));
46
46
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
47
47
  };
48
48
  export const se_DetectPHICommand = async (input, context) => {
49
49
  const headers = sharedHeaders("DetectPHI");
50
50
  let body;
51
- body = JSON.stringify(se_DetectPHIRequest(input, context));
51
+ body = JSON.stringify(_json(input));
52
52
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
53
53
  };
54
54
  export const se_InferICD10CMCommand = async (input, context) => {
55
55
  const headers = sharedHeaders("InferICD10CM");
56
56
  let body;
57
- body = JSON.stringify(se_InferICD10CMRequest(input, context));
57
+ body = JSON.stringify(_json(input));
58
58
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
59
59
  };
60
60
  export const se_InferRxNormCommand = async (input, context) => {
61
61
  const headers = sharedHeaders("InferRxNorm");
62
62
  let body;
63
- body = JSON.stringify(se_InferRxNormRequest(input, context));
63
+ body = JSON.stringify(_json(input));
64
64
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
65
65
  };
66
66
  export const se_InferSNOMEDCTCommand = async (input, context) => {
67
67
  const headers = sharedHeaders("InferSNOMEDCT");
68
68
  let body;
69
- body = JSON.stringify(se_InferSNOMEDCTRequest(input, context));
69
+ body = JSON.stringify(_json(input));
70
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
71
  };
72
72
  export const se_ListEntitiesDetectionV2JobsCommand = async (input, context) => {
@@ -132,31 +132,31 @@ export const se_StartSNOMEDCTInferenceJobCommand = async (input, context) => {
132
132
  export const se_StopEntitiesDetectionV2JobCommand = async (input, context) => {
133
133
  const headers = sharedHeaders("StopEntitiesDetectionV2Job");
134
134
  let body;
135
- body = JSON.stringify(se_StopEntitiesDetectionV2JobRequest(input, context));
135
+ body = JSON.stringify(_json(input));
136
136
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
137
137
  };
138
138
  export const se_StopICD10CMInferenceJobCommand = async (input, context) => {
139
139
  const headers = sharedHeaders("StopICD10CMInferenceJob");
140
140
  let body;
141
- body = JSON.stringify(se_StopICD10CMInferenceJobRequest(input, context));
141
+ body = JSON.stringify(_json(input));
142
142
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
143
143
  };
144
144
  export const se_StopPHIDetectionJobCommand = async (input, context) => {
145
145
  const headers = sharedHeaders("StopPHIDetectionJob");
146
146
  let body;
147
- body = JSON.stringify(se_StopPHIDetectionJobRequest(input, context));
147
+ body = JSON.stringify(_json(input));
148
148
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
149
149
  };
150
150
  export const se_StopRxNormInferenceJobCommand = async (input, context) => {
151
151
  const headers = sharedHeaders("StopRxNormInferenceJob");
152
152
  let body;
153
- body = JSON.stringify(se_StopRxNormInferenceJobRequest(input, context));
153
+ body = JSON.stringify(_json(input));
154
154
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
155
155
  };
156
156
  export const se_StopSNOMEDCTInferenceJobCommand = async (input, context) => {
157
157
  const headers = sharedHeaders("StopSNOMEDCTInferenceJob");
158
158
  let body;
159
- body = JSON.stringify(se_StopSNOMEDCTInferenceJobRequest(input, context));
159
+ body = JSON.stringify(_json(input));
160
160
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
161
161
  };
162
162
  export const de_DescribeEntitiesDetectionV2JobCommand = async (output, context) => {
@@ -170,7 +170,7 @@ export const de_DescribeEntitiesDetectionV2JobCommand = async (output, context)
170
170
  $metadata: deserializeMetadata(output),
171
171
  ...contents,
172
172
  };
173
- return Promise.resolve(response);
173
+ return response;
174
174
  };
175
175
  const de_DescribeEntitiesDetectionV2JobCommandError = async (output, context) => {
176
176
  const parsedOutput = {
@@ -193,10 +193,9 @@ const de_DescribeEntitiesDetectionV2JobCommandError = async (output, context) =>
193
193
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
194
194
  default:
195
195
  const parsedBody = parsedOutput.body;
196
- throwDefaultError({
196
+ return throwDefaultError({
197
197
  output,
198
198
  parsedBody,
199
- exceptionCtor: __BaseException,
200
199
  errorCode,
201
200
  });
202
201
  }
@@ -212,7 +211,7 @@ export const de_DescribeICD10CMInferenceJobCommand = async (output, context) =>
212
211
  $metadata: deserializeMetadata(output),
213
212
  ...contents,
214
213
  };
215
- return Promise.resolve(response);
214
+ return response;
216
215
  };
217
216
  const de_DescribeICD10CMInferenceJobCommandError = async (output, context) => {
218
217
  const parsedOutput = {
@@ -235,10 +234,9 @@ const de_DescribeICD10CMInferenceJobCommandError = async (output, context) => {
235
234
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
236
235
  default:
237
236
  const parsedBody = parsedOutput.body;
238
- throwDefaultError({
237
+ return throwDefaultError({
239
238
  output,
240
239
  parsedBody,
241
- exceptionCtor: __BaseException,
242
240
  errorCode,
243
241
  });
244
242
  }
@@ -254,7 +252,7 @@ export const de_DescribePHIDetectionJobCommand = async (output, context) => {
254
252
  $metadata: deserializeMetadata(output),
255
253
  ...contents,
256
254
  };
257
- return Promise.resolve(response);
255
+ return response;
258
256
  };
259
257
  const de_DescribePHIDetectionJobCommandError = async (output, context) => {
260
258
  const parsedOutput = {
@@ -277,10 +275,9 @@ const de_DescribePHIDetectionJobCommandError = async (output, context) => {
277
275
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
278
276
  default:
279
277
  const parsedBody = parsedOutput.body;
280
- throwDefaultError({
278
+ return throwDefaultError({
281
279
  output,
282
280
  parsedBody,
283
- exceptionCtor: __BaseException,
284
281
  errorCode,
285
282
  });
286
283
  }
@@ -296,7 +293,7 @@ export const de_DescribeRxNormInferenceJobCommand = async (output, context) => {
296
293
  $metadata: deserializeMetadata(output),
297
294
  ...contents,
298
295
  };
299
- return Promise.resolve(response);
296
+ return response;
300
297
  };
301
298
  const de_DescribeRxNormInferenceJobCommandError = async (output, context) => {
302
299
  const parsedOutput = {
@@ -319,10 +316,9 @@ const de_DescribeRxNormInferenceJobCommandError = async (output, context) => {
319
316
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
320
317
  default:
321
318
  const parsedBody = parsedOutput.body;
322
- throwDefaultError({
319
+ return throwDefaultError({
323
320
  output,
324
321
  parsedBody,
325
- exceptionCtor: __BaseException,
326
322
  errorCode,
327
323
  });
328
324
  }
@@ -338,7 +334,7 @@ export const de_DescribeSNOMEDCTInferenceJobCommand = async (output, context) =>
338
334
  $metadata: deserializeMetadata(output),
339
335
  ...contents,
340
336
  };
341
- return Promise.resolve(response);
337
+ return response;
342
338
  };
343
339
  const de_DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
344
340
  const parsedOutput = {
@@ -361,10 +357,9 @@ const de_DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
361
357
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
362
358
  default:
363
359
  const parsedBody = parsedOutput.body;
364
- throwDefaultError({
360
+ return throwDefaultError({
365
361
  output,
366
362
  parsedBody,
367
- exceptionCtor: __BaseException,
368
363
  errorCode,
369
364
  });
370
365
  }
@@ -380,7 +375,7 @@ export const de_DetectEntitiesCommand = async (output, context) => {
380
375
  $metadata: deserializeMetadata(output),
381
376
  ...contents,
382
377
  };
383
- return Promise.resolve(response);
378
+ return response;
384
379
  };
385
380
  const de_DetectEntitiesCommandError = async (output, context) => {
386
381
  const parsedOutput = {
@@ -409,10 +404,9 @@ const de_DetectEntitiesCommandError = async (output, context) => {
409
404
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
410
405
  default:
411
406
  const parsedBody = parsedOutput.body;
412
- throwDefaultError({
407
+ return throwDefaultError({
413
408
  output,
414
409
  parsedBody,
415
- exceptionCtor: __BaseException,
416
410
  errorCode,
417
411
  });
418
412
  }
@@ -428,7 +422,7 @@ export const de_DetectEntitiesV2Command = async (output, context) => {
428
422
  $metadata: deserializeMetadata(output),
429
423
  ...contents,
430
424
  };
431
- return Promise.resolve(response);
425
+ return response;
432
426
  };
433
427
  const de_DetectEntitiesV2CommandError = async (output, context) => {
434
428
  const parsedOutput = {
@@ -457,10 +451,9 @@ const de_DetectEntitiesV2CommandError = async (output, context) => {
457
451
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
458
452
  default:
459
453
  const parsedBody = parsedOutput.body;
460
- throwDefaultError({
454
+ return throwDefaultError({
461
455
  output,
462
456
  parsedBody,
463
- exceptionCtor: __BaseException,
464
457
  errorCode,
465
458
  });
466
459
  }
@@ -476,7 +469,7 @@ export const de_DetectPHICommand = async (output, context) => {
476
469
  $metadata: deserializeMetadata(output),
477
470
  ...contents,
478
471
  };
479
- return Promise.resolve(response);
472
+ return response;
480
473
  };
481
474
  const de_DetectPHICommandError = async (output, context) => {
482
475
  const parsedOutput = {
@@ -505,10 +498,9 @@ const de_DetectPHICommandError = async (output, context) => {
505
498
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
506
499
  default:
507
500
  const parsedBody = parsedOutput.body;
508
- throwDefaultError({
501
+ return throwDefaultError({
509
502
  output,
510
503
  parsedBody,
511
- exceptionCtor: __BaseException,
512
504
  errorCode,
513
505
  });
514
506
  }
@@ -524,7 +516,7 @@ export const de_InferICD10CMCommand = async (output, context) => {
524
516
  $metadata: deserializeMetadata(output),
525
517
  ...contents,
526
518
  };
527
- return Promise.resolve(response);
519
+ return response;
528
520
  };
529
521
  const de_InferICD10CMCommandError = async (output, context) => {
530
522
  const parsedOutput = {
@@ -553,10 +545,9 @@ const de_InferICD10CMCommandError = async (output, context) => {
553
545
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
554
546
  default:
555
547
  const parsedBody = parsedOutput.body;
556
- throwDefaultError({
548
+ return throwDefaultError({
557
549
  output,
558
550
  parsedBody,
559
- exceptionCtor: __BaseException,
560
551
  errorCode,
561
552
  });
562
553
  }
@@ -572,7 +563,7 @@ export const de_InferRxNormCommand = async (output, context) => {
572
563
  $metadata: deserializeMetadata(output),
573
564
  ...contents,
574
565
  };
575
- return Promise.resolve(response);
566
+ return response;
576
567
  };
577
568
  const de_InferRxNormCommandError = async (output, context) => {
578
569
  const parsedOutput = {
@@ -601,10 +592,9 @@ const de_InferRxNormCommandError = async (output, context) => {
601
592
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
602
593
  default:
603
594
  const parsedBody = parsedOutput.body;
604
- throwDefaultError({
595
+ return throwDefaultError({
605
596
  output,
606
597
  parsedBody,
607
- exceptionCtor: __BaseException,
608
598
  errorCode,
609
599
  });
610
600
  }
@@ -620,7 +610,7 @@ export const de_InferSNOMEDCTCommand = async (output, context) => {
620
610
  $metadata: deserializeMetadata(output),
621
611
  ...contents,
622
612
  };
623
- return Promise.resolve(response);
613
+ return response;
624
614
  };
625
615
  const de_InferSNOMEDCTCommandError = async (output, context) => {
626
616
  const parsedOutput = {
@@ -649,10 +639,9 @@ const de_InferSNOMEDCTCommandError = async (output, context) => {
649
639
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
650
640
  default:
651
641
  const parsedBody = parsedOutput.body;
652
- throwDefaultError({
642
+ return throwDefaultError({
653
643
  output,
654
644
  parsedBody,
655
- exceptionCtor: __BaseException,
656
645
  errorCode,
657
646
  });
658
647
  }
@@ -668,7 +657,7 @@ export const de_ListEntitiesDetectionV2JobsCommand = async (output, context) =>
668
657
  $metadata: deserializeMetadata(output),
669
658
  ...contents,
670
659
  };
671
- return Promise.resolve(response);
660
+ return response;
672
661
  };
673
662
  const de_ListEntitiesDetectionV2JobsCommandError = async (output, context) => {
674
663
  const parsedOutput = {
@@ -691,10 +680,9 @@ const de_ListEntitiesDetectionV2JobsCommandError = async (output, context) => {
691
680
  throw await de_ValidationExceptionRes(parsedOutput, context);
692
681
  default:
693
682
  const parsedBody = parsedOutput.body;
694
- throwDefaultError({
683
+ return throwDefaultError({
695
684
  output,
696
685
  parsedBody,
697
- exceptionCtor: __BaseException,
698
686
  errorCode,
699
687
  });
700
688
  }
@@ -710,7 +698,7 @@ export const de_ListICD10CMInferenceJobsCommand = async (output, context) => {
710
698
  $metadata: deserializeMetadata(output),
711
699
  ...contents,
712
700
  };
713
- return Promise.resolve(response);
701
+ return response;
714
702
  };
715
703
  const de_ListICD10CMInferenceJobsCommandError = async (output, context) => {
716
704
  const parsedOutput = {
@@ -733,10 +721,9 @@ const de_ListICD10CMInferenceJobsCommandError = async (output, context) => {
733
721
  throw await de_ValidationExceptionRes(parsedOutput, context);
734
722
  default:
735
723
  const parsedBody = parsedOutput.body;
736
- throwDefaultError({
724
+ return throwDefaultError({
737
725
  output,
738
726
  parsedBody,
739
- exceptionCtor: __BaseException,
740
727
  errorCode,
741
728
  });
742
729
  }
@@ -752,7 +739,7 @@ export const de_ListPHIDetectionJobsCommand = async (output, context) => {
752
739
  $metadata: deserializeMetadata(output),
753
740
  ...contents,
754
741
  };
755
- return Promise.resolve(response);
742
+ return response;
756
743
  };
757
744
  const de_ListPHIDetectionJobsCommandError = async (output, context) => {
758
745
  const parsedOutput = {
@@ -775,10 +762,9 @@ const de_ListPHIDetectionJobsCommandError = async (output, context) => {
775
762
  throw await de_ValidationExceptionRes(parsedOutput, context);
776
763
  default:
777
764
  const parsedBody = parsedOutput.body;
778
- throwDefaultError({
765
+ return throwDefaultError({
779
766
  output,
780
767
  parsedBody,
781
- exceptionCtor: __BaseException,
782
768
  errorCode,
783
769
  });
784
770
  }
@@ -794,7 +780,7 @@ export const de_ListRxNormInferenceJobsCommand = async (output, context) => {
794
780
  $metadata: deserializeMetadata(output),
795
781
  ...contents,
796
782
  };
797
- return Promise.resolve(response);
783
+ return response;
798
784
  };
799
785
  const de_ListRxNormInferenceJobsCommandError = async (output, context) => {
800
786
  const parsedOutput = {
@@ -817,10 +803,9 @@ const de_ListRxNormInferenceJobsCommandError = async (output, context) => {
817
803
  throw await de_ValidationExceptionRes(parsedOutput, context);
818
804
  default:
819
805
  const parsedBody = parsedOutput.body;
820
- throwDefaultError({
806
+ return throwDefaultError({
821
807
  output,
822
808
  parsedBody,
823
- exceptionCtor: __BaseException,
824
809
  errorCode,
825
810
  });
826
811
  }
@@ -836,7 +821,7 @@ export const de_ListSNOMEDCTInferenceJobsCommand = async (output, context) => {
836
821
  $metadata: deserializeMetadata(output),
837
822
  ...contents,
838
823
  };
839
- return Promise.resolve(response);
824
+ return response;
840
825
  };
841
826
  const de_ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
842
827
  const parsedOutput = {
@@ -859,10 +844,9 @@ const de_ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
859
844
  throw await de_ValidationExceptionRes(parsedOutput, context);
860
845
  default:
861
846
  const parsedBody = parsedOutput.body;
862
- throwDefaultError({
847
+ return throwDefaultError({
863
848
  output,
864
849
  parsedBody,
865
- exceptionCtor: __BaseException,
866
850
  errorCode,
867
851
  });
868
852
  }
@@ -873,12 +857,12 @@ export const de_StartEntitiesDetectionV2JobCommand = async (output, context) =>
873
857
  }
874
858
  const data = await parseBody(output.body, context);
875
859
  let contents = {};
876
- contents = de_StartEntitiesDetectionV2JobResponse(data, context);
860
+ contents = _json(data);
877
861
  const response = {
878
862
  $metadata: deserializeMetadata(output),
879
863
  ...contents,
880
864
  };
881
- return Promise.resolve(response);
865
+ return response;
882
866
  };
883
867
  const de_StartEntitiesDetectionV2JobCommandError = async (output, context) => {
884
868
  const parsedOutput = {
@@ -901,10 +885,9 @@ const de_StartEntitiesDetectionV2JobCommandError = async (output, context) => {
901
885
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
902
886
  default:
903
887
  const parsedBody = parsedOutput.body;
904
- throwDefaultError({
888
+ return throwDefaultError({
905
889
  output,
906
890
  parsedBody,
907
- exceptionCtor: __BaseException,
908
891
  errorCode,
909
892
  });
910
893
  }
@@ -915,12 +898,12 @@ export const de_StartICD10CMInferenceJobCommand = async (output, context) => {
915
898
  }
916
899
  const data = await parseBody(output.body, context);
917
900
  let contents = {};
918
- contents = de_StartICD10CMInferenceJobResponse(data, context);
901
+ contents = _json(data);
919
902
  const response = {
920
903
  $metadata: deserializeMetadata(output),
921
904
  ...contents,
922
905
  };
923
- return Promise.resolve(response);
906
+ return response;
924
907
  };
925
908
  const de_StartICD10CMInferenceJobCommandError = async (output, context) => {
926
909
  const parsedOutput = {
@@ -943,10 +926,9 @@ const de_StartICD10CMInferenceJobCommandError = async (output, context) => {
943
926
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
944
927
  default:
945
928
  const parsedBody = parsedOutput.body;
946
- throwDefaultError({
929
+ return throwDefaultError({
947
930
  output,
948
931
  parsedBody,
949
- exceptionCtor: __BaseException,
950
932
  errorCode,
951
933
  });
952
934
  }
@@ -957,12 +939,12 @@ export const de_StartPHIDetectionJobCommand = async (output, context) => {
957
939
  }
958
940
  const data = await parseBody(output.body, context);
959
941
  let contents = {};
960
- contents = de_StartPHIDetectionJobResponse(data, context);
942
+ contents = _json(data);
961
943
  const response = {
962
944
  $metadata: deserializeMetadata(output),
963
945
  ...contents,
964
946
  };
965
- return Promise.resolve(response);
947
+ return response;
966
948
  };
967
949
  const de_StartPHIDetectionJobCommandError = async (output, context) => {
968
950
  const parsedOutput = {
@@ -985,10 +967,9 @@ const de_StartPHIDetectionJobCommandError = async (output, context) => {
985
967
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
986
968
  default:
987
969
  const parsedBody = parsedOutput.body;
988
- throwDefaultError({
970
+ return throwDefaultError({
989
971
  output,
990
972
  parsedBody,
991
- exceptionCtor: __BaseException,
992
973
  errorCode,
993
974
  });
994
975
  }
@@ -999,12 +980,12 @@ export const de_StartRxNormInferenceJobCommand = async (output, context) => {
999
980
  }
1000
981
  const data = await parseBody(output.body, context);
1001
982
  let contents = {};
1002
- contents = de_StartRxNormInferenceJobResponse(data, context);
983
+ contents = _json(data);
1003
984
  const response = {
1004
985
  $metadata: deserializeMetadata(output),
1005
986
  ...contents,
1006
987
  };
1007
- return Promise.resolve(response);
988
+ return response;
1008
989
  };
1009
990
  const de_StartRxNormInferenceJobCommandError = async (output, context) => {
1010
991
  const parsedOutput = {
@@ -1027,10 +1008,9 @@ const de_StartRxNormInferenceJobCommandError = async (output, context) => {
1027
1008
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1028
1009
  default:
1029
1010
  const parsedBody = parsedOutput.body;
1030
- throwDefaultError({
1011
+ return throwDefaultError({
1031
1012
  output,
1032
1013
  parsedBody,
1033
- exceptionCtor: __BaseException,
1034
1014
  errorCode,
1035
1015
  });
1036
1016
  }
@@ -1041,12 +1021,12 @@ export const de_StartSNOMEDCTInferenceJobCommand = async (output, context) => {
1041
1021
  }
1042
1022
  const data = await parseBody(output.body, context);
1043
1023
  let contents = {};
1044
- contents = de_StartSNOMEDCTInferenceJobResponse(data, context);
1024
+ contents = _json(data);
1045
1025
  const response = {
1046
1026
  $metadata: deserializeMetadata(output),
1047
1027
  ...contents,
1048
1028
  };
1049
- return Promise.resolve(response);
1029
+ return response;
1050
1030
  };
1051
1031
  const de_StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
1052
1032
  const parsedOutput = {
@@ -1069,10 +1049,9 @@ const de_StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
1069
1049
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1070
1050
  default:
1071
1051
  const parsedBody = parsedOutput.body;
1072
- throwDefaultError({
1052
+ return throwDefaultError({
1073
1053
  output,
1074
1054
  parsedBody,
1075
- exceptionCtor: __BaseException,
1076
1055
  errorCode,
1077
1056
  });
1078
1057
  }
@@ -1083,12 +1062,12 @@ export const de_StopEntitiesDetectionV2JobCommand = async (output, context) => {
1083
1062
  }
1084
1063
  const data = await parseBody(output.body, context);
1085
1064
  let contents = {};
1086
- contents = de_StopEntitiesDetectionV2JobResponse(data, context);
1065
+ contents = _json(data);
1087
1066
  const response = {
1088
1067
  $metadata: deserializeMetadata(output),
1089
1068
  ...contents,
1090
1069
  };
1091
- return Promise.resolve(response);
1070
+ return response;
1092
1071
  };
1093
1072
  const de_StopEntitiesDetectionV2JobCommandError = async (output, context) => {
1094
1073
  const parsedOutput = {
@@ -1108,10 +1087,9 @@ const de_StopEntitiesDetectionV2JobCommandError = async (output, context) => {
1108
1087
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1109
1088
  default:
1110
1089
  const parsedBody = parsedOutput.body;
1111
- throwDefaultError({
1090
+ return throwDefaultError({
1112
1091
  output,
1113
1092
  parsedBody,
1114
- exceptionCtor: __BaseException,
1115
1093
  errorCode,
1116
1094
  });
1117
1095
  }
@@ -1122,12 +1100,12 @@ export const de_StopICD10CMInferenceJobCommand = async (output, context) => {
1122
1100
  }
1123
1101
  const data = await parseBody(output.body, context);
1124
1102
  let contents = {};
1125
- contents = de_StopICD10CMInferenceJobResponse(data, context);
1103
+ contents = _json(data);
1126
1104
  const response = {
1127
1105
  $metadata: deserializeMetadata(output),
1128
1106
  ...contents,
1129
1107
  };
1130
- return Promise.resolve(response);
1108
+ return response;
1131
1109
  };
1132
1110
  const de_StopICD10CMInferenceJobCommandError = async (output, context) => {
1133
1111
  const parsedOutput = {
@@ -1147,10 +1125,9 @@ const de_StopICD10CMInferenceJobCommandError = async (output, context) => {
1147
1125
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1148
1126
  default:
1149
1127
  const parsedBody = parsedOutput.body;
1150
- throwDefaultError({
1128
+ return throwDefaultError({
1151
1129
  output,
1152
1130
  parsedBody,
1153
- exceptionCtor: __BaseException,
1154
1131
  errorCode,
1155
1132
  });
1156
1133
  }
@@ -1161,12 +1138,12 @@ export const de_StopPHIDetectionJobCommand = async (output, context) => {
1161
1138
  }
1162
1139
  const data = await parseBody(output.body, context);
1163
1140
  let contents = {};
1164
- contents = de_StopPHIDetectionJobResponse(data, context);
1141
+ contents = _json(data);
1165
1142
  const response = {
1166
1143
  $metadata: deserializeMetadata(output),
1167
1144
  ...contents,
1168
1145
  };
1169
- return Promise.resolve(response);
1146
+ return response;
1170
1147
  };
1171
1148
  const de_StopPHIDetectionJobCommandError = async (output, context) => {
1172
1149
  const parsedOutput = {
@@ -1186,10 +1163,9 @@ const de_StopPHIDetectionJobCommandError = async (output, context) => {
1186
1163
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1187
1164
  default:
1188
1165
  const parsedBody = parsedOutput.body;
1189
- throwDefaultError({
1166
+ return throwDefaultError({
1190
1167
  output,
1191
1168
  parsedBody,
1192
- exceptionCtor: __BaseException,
1193
1169
  errorCode,
1194
1170
  });
1195
1171
  }
@@ -1200,12 +1176,12 @@ export const de_StopRxNormInferenceJobCommand = async (output, context) => {
1200
1176
  }
1201
1177
  const data = await parseBody(output.body, context);
1202
1178
  let contents = {};
1203
- contents = de_StopRxNormInferenceJobResponse(data, context);
1179
+ contents = _json(data);
1204
1180
  const response = {
1205
1181
  $metadata: deserializeMetadata(output),
1206
1182
  ...contents,
1207
1183
  };
1208
- return Promise.resolve(response);
1184
+ return response;
1209
1185
  };
1210
1186
  const de_StopRxNormInferenceJobCommandError = async (output, context) => {
1211
1187
  const parsedOutput = {
@@ -1225,10 +1201,9 @@ const de_StopRxNormInferenceJobCommandError = async (output, context) => {
1225
1201
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1226
1202
  default:
1227
1203
  const parsedBody = parsedOutput.body;
1228
- throwDefaultError({
1204
+ return throwDefaultError({
1229
1205
  output,
1230
1206
  parsedBody,
1231
- exceptionCtor: __BaseException,
1232
1207
  errorCode,
1233
1208
  });
1234
1209
  }
@@ -1239,12 +1214,12 @@ export const de_StopSNOMEDCTInferenceJobCommand = async (output, context) => {
1239
1214
  }
1240
1215
  const data = await parseBody(output.body, context);
1241
1216
  let contents = {};
1242
- contents = de_StopSNOMEDCTInferenceJobResponse(data, context);
1217
+ contents = _json(data);
1243
1218
  const response = {
1244
1219
  $metadata: deserializeMetadata(output),
1245
1220
  ...contents,
1246
1221
  };
1247
- return Promise.resolve(response);
1222
+ return response;
1248
1223
  };
1249
1224
  const de_StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
1250
1225
  const parsedOutput = {
@@ -1267,17 +1242,16 @@ const de_StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
1267
1242
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1268
1243
  default:
1269
1244
  const parsedBody = parsedOutput.body;
1270
- throwDefaultError({
1245
+ return throwDefaultError({
1271
1246
  output,
1272
1247
  parsedBody,
1273
- exceptionCtor: __BaseException,
1274
1248
  errorCode,
1275
1249
  });
1276
1250
  }
1277
1251
  };
1278
1252
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1279
1253
  const body = parsedOutput.body;
1280
- const deserialized = de_InternalServerException(body, context);
1254
+ const deserialized = _json(body);
1281
1255
  const exception = new InternalServerException({
1282
1256
  $metadata: deserializeMetadata(parsedOutput),
1283
1257
  ...deserialized,
@@ -1286,7 +1260,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1286
1260
  };
1287
1261
  const de_InvalidEncodingExceptionRes = async (parsedOutput, context) => {
1288
1262
  const body = parsedOutput.body;
1289
- const deserialized = de_InvalidEncodingException(body, context);
1263
+ const deserialized = _json(body);
1290
1264
  const exception = new InvalidEncodingException({
1291
1265
  $metadata: deserializeMetadata(parsedOutput),
1292
1266
  ...deserialized,
@@ -1295,7 +1269,7 @@ const de_InvalidEncodingExceptionRes = async (parsedOutput, context) => {
1295
1269
  };
1296
1270
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1297
1271
  const body = parsedOutput.body;
1298
- const deserialized = de_InvalidRequestException(body, context);
1272
+ const deserialized = _json(body);
1299
1273
  const exception = new InvalidRequestException({
1300
1274
  $metadata: deserializeMetadata(parsedOutput),
1301
1275
  ...deserialized,
@@ -1304,7 +1278,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1304
1278
  };
1305
1279
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1306
1280
  const body = parsedOutput.body;
1307
- const deserialized = de_ResourceNotFoundException(body, context);
1281
+ const deserialized = _json(body);
1308
1282
  const exception = new ResourceNotFoundException({
1309
1283
  $metadata: deserializeMetadata(parsedOutput),
1310
1284
  ...deserialized,
@@ -1313,7 +1287,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1313
1287
  };
1314
1288
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1315
1289
  const body = parsedOutput.body;
1316
- const deserialized = de_ServiceUnavailableException(body, context);
1290
+ const deserialized = _json(body);
1317
1291
  const exception = new ServiceUnavailableException({
1318
1292
  $metadata: deserializeMetadata(parsedOutput),
1319
1293
  ...deserialized,
@@ -1322,7 +1296,7 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1322
1296
  };
1323
1297
  const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1324
1298
  const body = parsedOutput.body;
1325
- const deserialized = de_TextSizeLimitExceededException(body, context);
1299
+ const deserialized = _json(body);
1326
1300
  const exception = new TextSizeLimitExceededException({
1327
1301
  $metadata: deserializeMetadata(parsedOutput),
1328
1302
  ...deserialized,
@@ -1331,7 +1305,7 @@ const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1331
1305
  };
1332
1306
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1333
1307
  const body = parsedOutput.body;
1334
- const deserialized = de_TooManyRequestsException(body, context);
1308
+ const deserialized = _json(body);
1335
1309
  const exception = new TooManyRequestsException({
1336
1310
  $metadata: deserializeMetadata(parsedOutput),
1337
1311
  ...deserialized,
@@ -1340,7 +1314,7 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1340
1314
  };
1341
1315
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1342
1316
  const body = parsedOutput.body;
1343
- const deserialized = de_ValidationException(body, context);
1317
+ const deserialized = _json(body);
1344
1318
  const exception = new ValidationException({
1345
1319
  $metadata: deserializeMetadata(parsedOutput),
1346
1320
  ...deserialized,
@@ -1348,798 +1322,519 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
1348
1322
  return __decorateServiceException(exception, body);
1349
1323
  };
1350
1324
  const se_ComprehendMedicalAsyncJobFilter = (input, context) => {
1351
- return {
1352
- ...(input.JobName != null && { JobName: input.JobName }),
1353
- ...(input.JobStatus != null && { JobStatus: input.JobStatus }),
1354
- ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }),
1355
- ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }),
1356
- };
1357
- };
1358
- const se_DescribeEntitiesDetectionV2JobRequest = (input, context) => {
1359
- return {
1360
- ...(input.JobId != null && { JobId: input.JobId }),
1361
- };
1362
- };
1363
- const se_DescribeICD10CMInferenceJobRequest = (input, context) => {
1364
- return {
1365
- ...(input.JobId != null && { JobId: input.JobId }),
1366
- };
1367
- };
1368
- const se_DescribePHIDetectionJobRequest = (input, context) => {
1369
- return {
1370
- ...(input.JobId != null && { JobId: input.JobId }),
1371
- };
1372
- };
1373
- const se_DescribeRxNormInferenceJobRequest = (input, context) => {
1374
- return {
1375
- ...(input.JobId != null && { JobId: input.JobId }),
1376
- };
1377
- };
1378
- const se_DescribeSNOMEDCTInferenceJobRequest = (input, context) => {
1379
- return {
1380
- ...(input.JobId != null && { JobId: input.JobId }),
1381
- };
1382
- };
1383
- const se_DetectEntitiesRequest = (input, context) => {
1384
- return {
1385
- ...(input.Text != null && { Text: input.Text }),
1386
- };
1387
- };
1388
- const se_DetectEntitiesV2Request = (input, context) => {
1389
- return {
1390
- ...(input.Text != null && { Text: input.Text }),
1391
- };
1392
- };
1393
- const se_DetectPHIRequest = (input, context) => {
1394
- return {
1395
- ...(input.Text != null && { Text: input.Text }),
1396
- };
1397
- };
1398
- const se_InferICD10CMRequest = (input, context) => {
1399
- return {
1400
- ...(input.Text != null && { Text: input.Text }),
1401
- };
1402
- };
1403
- const se_InferRxNormRequest = (input, context) => {
1404
- return {
1405
- ...(input.Text != null && { Text: input.Text }),
1406
- };
1407
- };
1408
- const se_InferSNOMEDCTRequest = (input, context) => {
1409
- return {
1410
- ...(input.Text != null && { Text: input.Text }),
1411
- };
1412
- };
1413
- const se_InputDataConfig = (input, context) => {
1414
- return {
1415
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
1416
- ...(input.S3Key != null && { S3Key: input.S3Key }),
1417
- };
1325
+ return take(input, {
1326
+ JobName: [],
1327
+ JobStatus: [],
1328
+ SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000),
1329
+ SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000),
1330
+ });
1418
1331
  };
1419
1332
  const se_ListEntitiesDetectionV2JobsRequest = (input, context) => {
1420
- return {
1421
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1422
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1423
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1424
- };
1333
+ return take(input, {
1334
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1335
+ MaxResults: [],
1336
+ NextToken: [],
1337
+ });
1425
1338
  };
1426
1339
  const se_ListICD10CMInferenceJobsRequest = (input, context) => {
1427
- return {
1428
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1429
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1430
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1431
- };
1340
+ return take(input, {
1341
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1342
+ MaxResults: [],
1343
+ NextToken: [],
1344
+ });
1432
1345
  };
1433
1346
  const se_ListPHIDetectionJobsRequest = (input, context) => {
1434
- return {
1435
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1436
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1437
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1438
- };
1347
+ return take(input, {
1348
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1349
+ MaxResults: [],
1350
+ NextToken: [],
1351
+ });
1439
1352
  };
1440
1353
  const se_ListRxNormInferenceJobsRequest = (input, context) => {
1441
- return {
1442
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1443
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1444
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1445
- };
1354
+ return take(input, {
1355
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1356
+ MaxResults: [],
1357
+ NextToken: [],
1358
+ });
1446
1359
  };
1447
1360
  const se_ListSNOMEDCTInferenceJobsRequest = (input, context) => {
1448
- return {
1449
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1450
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1451
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1452
- };
1453
- };
1454
- const se_OutputDataConfig = (input, context) => {
1455
- return {
1456
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
1457
- ...(input.S3Key != null && { S3Key: input.S3Key }),
1458
- };
1361
+ return take(input, {
1362
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1363
+ MaxResults: [],
1364
+ NextToken: [],
1365
+ });
1459
1366
  };
1460
1367
  const se_StartEntitiesDetectionV2JobRequest = (input, context) => {
1461
- return {
1462
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
1463
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1464
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1465
- ...(input.JobName != null && { JobName: input.JobName }),
1466
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1467
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1468
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1469
- };
1368
+ return take(input, {
1369
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
1370
+ DataAccessRoleArn: [],
1371
+ InputDataConfig: _json,
1372
+ JobName: [],
1373
+ KMSKey: [],
1374
+ LanguageCode: [],
1375
+ OutputDataConfig: _json,
1376
+ });
1470
1377
  };
1471
1378
  const se_StartICD10CMInferenceJobRequest = (input, context) => {
1472
- return {
1473
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
1474
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1475
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1476
- ...(input.JobName != null && { JobName: input.JobName }),
1477
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1478
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1479
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1480
- };
1379
+ return take(input, {
1380
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
1381
+ DataAccessRoleArn: [],
1382
+ InputDataConfig: _json,
1383
+ JobName: [],
1384
+ KMSKey: [],
1385
+ LanguageCode: [],
1386
+ OutputDataConfig: _json,
1387
+ });
1481
1388
  };
1482
1389
  const se_StartPHIDetectionJobRequest = (input, context) => {
1483
- return {
1484
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
1485
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1486
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1487
- ...(input.JobName != null && { JobName: input.JobName }),
1488
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1489
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1490
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1491
- };
1390
+ return take(input, {
1391
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
1392
+ DataAccessRoleArn: [],
1393
+ InputDataConfig: _json,
1394
+ JobName: [],
1395
+ KMSKey: [],
1396
+ LanguageCode: [],
1397
+ OutputDataConfig: _json,
1398
+ });
1492
1399
  };
1493
1400
  const se_StartRxNormInferenceJobRequest = (input, context) => {
1494
- return {
1495
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
1496
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1497
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1498
- ...(input.JobName != null && { JobName: input.JobName }),
1499
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1500
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1501
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1502
- };
1401
+ return take(input, {
1402
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
1403
+ DataAccessRoleArn: [],
1404
+ InputDataConfig: _json,
1405
+ JobName: [],
1406
+ KMSKey: [],
1407
+ LanguageCode: [],
1408
+ OutputDataConfig: _json,
1409
+ });
1503
1410
  };
1504
1411
  const se_StartSNOMEDCTInferenceJobRequest = (input, context) => {
1505
- return {
1506
- ClientRequestToken: input.ClientRequestToken ?? generateIdempotencyToken(),
1507
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1508
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1509
- ...(input.JobName != null && { JobName: input.JobName }),
1510
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1511
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1512
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1513
- };
1514
- };
1515
- const se_StopEntitiesDetectionV2JobRequest = (input, context) => {
1516
- return {
1517
- ...(input.JobId != null && { JobId: input.JobId }),
1518
- };
1519
- };
1520
- const se_StopICD10CMInferenceJobRequest = (input, context) => {
1521
- return {
1522
- ...(input.JobId != null && { JobId: input.JobId }),
1523
- };
1524
- };
1525
- const se_StopPHIDetectionJobRequest = (input, context) => {
1526
- return {
1527
- ...(input.JobId != null && { JobId: input.JobId }),
1528
- };
1529
- };
1530
- const se_StopRxNormInferenceJobRequest = (input, context) => {
1531
- return {
1532
- ...(input.JobId != null && { JobId: input.JobId }),
1533
- };
1534
- };
1535
- const se_StopSNOMEDCTInferenceJobRequest = (input, context) => {
1536
- return {
1537
- ...(input.JobId != null && { JobId: input.JobId }),
1538
- };
1412
+ return take(input, {
1413
+ ClientRequestToken: (_) => _ ?? generateIdempotencyToken(),
1414
+ DataAccessRoleArn: [],
1415
+ InputDataConfig: _json,
1416
+ JobName: [],
1417
+ KMSKey: [],
1418
+ LanguageCode: [],
1419
+ OutputDataConfig: _json,
1420
+ });
1539
1421
  };
1540
1422
  const de_Attribute = (output, context) => {
1541
- return {
1542
- BeginOffset: __expectInt32(output.BeginOffset),
1543
- Category: __expectString(output.Category),
1544
- EndOffset: __expectInt32(output.EndOffset),
1545
- Id: __expectInt32(output.Id),
1546
- RelationshipScore: __limitedParseFloat32(output.RelationshipScore),
1547
- RelationshipType: __expectString(output.RelationshipType),
1548
- Score: __limitedParseFloat32(output.Score),
1549
- Text: __expectString(output.Text),
1550
- Traits: output.Traits != null ? de_TraitList(output.Traits, context) : undefined,
1551
- Type: __expectString(output.Type),
1552
- };
1423
+ return take(output, {
1424
+ BeginOffset: __expectInt32,
1425
+ Category: __expectString,
1426
+ EndOffset: __expectInt32,
1427
+ Id: __expectInt32,
1428
+ RelationshipScore: __limitedParseFloat32,
1429
+ RelationshipType: __expectString,
1430
+ Score: __limitedParseFloat32,
1431
+ Text: __expectString,
1432
+ Traits: (_) => de_TraitList(_, context),
1433
+ Type: __expectString,
1434
+ });
1553
1435
  };
1554
1436
  const de_AttributeList = (output, context) => {
1555
1437
  const retVal = (output || [])
1556
1438
  .filter((e) => e != null)
1557
1439
  .map((entry) => {
1558
- if (entry === null) {
1559
- return null;
1560
- }
1561
1440
  return de_Attribute(entry, context);
1562
1441
  });
1563
1442
  return retVal;
1564
1443
  };
1565
- const de_Characters = (output, context) => {
1566
- return {
1567
- OriginalTextCharacters: __expectInt32(output.OriginalTextCharacters),
1568
- };
1569
- };
1570
1444
  const de_ComprehendMedicalAsyncJobProperties = (output, context) => {
1571
- return {
1572
- DataAccessRoleArn: __expectString(output.DataAccessRoleArn),
1573
- EndTime: output.EndTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.EndTime))) : undefined,
1574
- ExpirationTime: output.ExpirationTime != null
1575
- ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.ExpirationTime)))
1576
- : undefined,
1577
- InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined,
1578
- JobId: __expectString(output.JobId),
1579
- JobName: __expectString(output.JobName),
1580
- JobStatus: __expectString(output.JobStatus),
1581
- KMSKey: __expectString(output.KMSKey),
1582
- LanguageCode: __expectString(output.LanguageCode),
1583
- ManifestFilePath: __expectString(output.ManifestFilePath),
1584
- Message: __expectString(output.Message),
1585
- ModelVersion: __expectString(output.ModelVersion),
1586
- OutputDataConfig: output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined,
1587
- SubmitTime: output.SubmitTime != null ? __expectNonNull(__parseEpochTimestamp(__expectNumber(output.SubmitTime))) : undefined,
1588
- };
1445
+ return take(output, {
1446
+ DataAccessRoleArn: __expectString,
1447
+ EndTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1448
+ ExpirationTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1449
+ InputDataConfig: _json,
1450
+ JobId: __expectString,
1451
+ JobName: __expectString,
1452
+ JobStatus: __expectString,
1453
+ KMSKey: __expectString,
1454
+ LanguageCode: __expectString,
1455
+ ManifestFilePath: __expectString,
1456
+ Message: __expectString,
1457
+ ModelVersion: __expectString,
1458
+ OutputDataConfig: _json,
1459
+ SubmitTime: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
1460
+ });
1589
1461
  };
1590
1462
  const de_ComprehendMedicalAsyncJobPropertiesList = (output, context) => {
1591
1463
  const retVal = (output || [])
1592
1464
  .filter((e) => e != null)
1593
1465
  .map((entry) => {
1594
- if (entry === null) {
1595
- return null;
1596
- }
1597
1466
  return de_ComprehendMedicalAsyncJobProperties(entry, context);
1598
1467
  });
1599
1468
  return retVal;
1600
1469
  };
1601
1470
  const de_DescribeEntitiesDetectionV2JobResponse = (output, context) => {
1602
- return {
1603
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1604
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1605
- : undefined,
1606
- };
1471
+ return take(output, {
1472
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1473
+ });
1607
1474
  };
1608
1475
  const de_DescribeICD10CMInferenceJobResponse = (output, context) => {
1609
- return {
1610
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1611
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1612
- : undefined,
1613
- };
1476
+ return take(output, {
1477
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1478
+ });
1614
1479
  };
1615
1480
  const de_DescribePHIDetectionJobResponse = (output, context) => {
1616
- return {
1617
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1618
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1619
- : undefined,
1620
- };
1481
+ return take(output, {
1482
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1483
+ });
1621
1484
  };
1622
1485
  const de_DescribeRxNormInferenceJobResponse = (output, context) => {
1623
- return {
1624
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1625
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1626
- : undefined,
1627
- };
1486
+ return take(output, {
1487
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1488
+ });
1628
1489
  };
1629
1490
  const de_DescribeSNOMEDCTInferenceJobResponse = (output, context) => {
1630
- return {
1631
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1632
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1633
- : undefined,
1634
- };
1491
+ return take(output, {
1492
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1493
+ });
1635
1494
  };
1636
1495
  const de_DetectEntitiesResponse = (output, context) => {
1637
- return {
1638
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
1639
- ModelVersion: __expectString(output.ModelVersion),
1640
- PaginationToken: __expectString(output.PaginationToken),
1641
- UnmappedAttributes: output.UnmappedAttributes != null ? de_UnmappedAttributeList(output.UnmappedAttributes, context) : undefined,
1642
- };
1496
+ return take(output, {
1497
+ Entities: (_) => de_EntityList(_, context),
1498
+ ModelVersion: __expectString,
1499
+ PaginationToken: __expectString,
1500
+ UnmappedAttributes: (_) => de_UnmappedAttributeList(_, context),
1501
+ });
1643
1502
  };
1644
1503
  const de_DetectEntitiesV2Response = (output, context) => {
1645
- return {
1646
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
1647
- ModelVersion: __expectString(output.ModelVersion),
1648
- PaginationToken: __expectString(output.PaginationToken),
1649
- UnmappedAttributes: output.UnmappedAttributes != null ? de_UnmappedAttributeList(output.UnmappedAttributes, context) : undefined,
1650
- };
1504
+ return take(output, {
1505
+ Entities: (_) => de_EntityList(_, context),
1506
+ ModelVersion: __expectString,
1507
+ PaginationToken: __expectString,
1508
+ UnmappedAttributes: (_) => de_UnmappedAttributeList(_, context),
1509
+ });
1651
1510
  };
1652
1511
  const de_DetectPHIResponse = (output, context) => {
1653
- return {
1654
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
1655
- ModelVersion: __expectString(output.ModelVersion),
1656
- PaginationToken: __expectString(output.PaginationToken),
1657
- };
1512
+ return take(output, {
1513
+ Entities: (_) => de_EntityList(_, context),
1514
+ ModelVersion: __expectString,
1515
+ PaginationToken: __expectString,
1516
+ });
1658
1517
  };
1659
1518
  const de_Entity = (output, context) => {
1660
- return {
1661
- Attributes: output.Attributes != null ? de_AttributeList(output.Attributes, context) : undefined,
1662
- BeginOffset: __expectInt32(output.BeginOffset),
1663
- Category: __expectString(output.Category),
1664
- EndOffset: __expectInt32(output.EndOffset),
1665
- Id: __expectInt32(output.Id),
1666
- Score: __limitedParseFloat32(output.Score),
1667
- Text: __expectString(output.Text),
1668
- Traits: output.Traits != null ? de_TraitList(output.Traits, context) : undefined,
1669
- Type: __expectString(output.Type),
1670
- };
1519
+ return take(output, {
1520
+ Attributes: (_) => de_AttributeList(_, context),
1521
+ BeginOffset: __expectInt32,
1522
+ Category: __expectString,
1523
+ EndOffset: __expectInt32,
1524
+ Id: __expectInt32,
1525
+ Score: __limitedParseFloat32,
1526
+ Text: __expectString,
1527
+ Traits: (_) => de_TraitList(_, context),
1528
+ Type: __expectString,
1529
+ });
1671
1530
  };
1672
1531
  const de_EntityList = (output, context) => {
1673
1532
  const retVal = (output || [])
1674
1533
  .filter((e) => e != null)
1675
1534
  .map((entry) => {
1676
- if (entry === null) {
1677
- return null;
1678
- }
1679
1535
  return de_Entity(entry, context);
1680
1536
  });
1681
1537
  return retVal;
1682
1538
  };
1683
1539
  const de_ICD10CMAttribute = (output, context) => {
1684
- return {
1685
- BeginOffset: __expectInt32(output.BeginOffset),
1686
- Category: __expectString(output.Category),
1687
- EndOffset: __expectInt32(output.EndOffset),
1688
- Id: __expectInt32(output.Id),
1689
- RelationshipScore: __limitedParseFloat32(output.RelationshipScore),
1690
- RelationshipType: __expectString(output.RelationshipType),
1691
- Score: __limitedParseFloat32(output.Score),
1692
- Text: __expectString(output.Text),
1693
- Traits: output.Traits != null ? de_ICD10CMTraitList(output.Traits, context) : undefined,
1694
- Type: __expectString(output.Type),
1695
- };
1540
+ return take(output, {
1541
+ BeginOffset: __expectInt32,
1542
+ Category: __expectString,
1543
+ EndOffset: __expectInt32,
1544
+ Id: __expectInt32,
1545
+ RelationshipScore: __limitedParseFloat32,
1546
+ RelationshipType: __expectString,
1547
+ Score: __limitedParseFloat32,
1548
+ Text: __expectString,
1549
+ Traits: (_) => de_ICD10CMTraitList(_, context),
1550
+ Type: __expectString,
1551
+ });
1696
1552
  };
1697
1553
  const de_ICD10CMAttributeList = (output, context) => {
1698
1554
  const retVal = (output || [])
1699
1555
  .filter((e) => e != null)
1700
1556
  .map((entry) => {
1701
- if (entry === null) {
1702
- return null;
1703
- }
1704
1557
  return de_ICD10CMAttribute(entry, context);
1705
1558
  });
1706
1559
  return retVal;
1707
1560
  };
1708
1561
  const de_ICD10CMConcept = (output, context) => {
1709
- return {
1710
- Code: __expectString(output.Code),
1711
- Description: __expectString(output.Description),
1712
- Score: __limitedParseFloat32(output.Score),
1713
- };
1562
+ return take(output, {
1563
+ Code: __expectString,
1564
+ Description: __expectString,
1565
+ Score: __limitedParseFloat32,
1566
+ });
1714
1567
  };
1715
1568
  const de_ICD10CMConceptList = (output, context) => {
1716
1569
  const retVal = (output || [])
1717
1570
  .filter((e) => e != null)
1718
1571
  .map((entry) => {
1719
- if (entry === null) {
1720
- return null;
1721
- }
1722
1572
  return de_ICD10CMConcept(entry, context);
1723
1573
  });
1724
1574
  return retVal;
1725
1575
  };
1726
1576
  const de_ICD10CMEntity = (output, context) => {
1727
- return {
1728
- Attributes: output.Attributes != null ? de_ICD10CMAttributeList(output.Attributes, context) : undefined,
1729
- BeginOffset: __expectInt32(output.BeginOffset),
1730
- Category: __expectString(output.Category),
1731
- EndOffset: __expectInt32(output.EndOffset),
1732
- ICD10CMConcepts: output.ICD10CMConcepts != null ? de_ICD10CMConceptList(output.ICD10CMConcepts, context) : undefined,
1733
- Id: __expectInt32(output.Id),
1734
- Score: __limitedParseFloat32(output.Score),
1735
- Text: __expectString(output.Text),
1736
- Traits: output.Traits != null ? de_ICD10CMTraitList(output.Traits, context) : undefined,
1737
- Type: __expectString(output.Type),
1738
- };
1577
+ return take(output, {
1578
+ Attributes: (_) => de_ICD10CMAttributeList(_, context),
1579
+ BeginOffset: __expectInt32,
1580
+ Category: __expectString,
1581
+ EndOffset: __expectInt32,
1582
+ ICD10CMConcepts: (_) => de_ICD10CMConceptList(_, context),
1583
+ Id: __expectInt32,
1584
+ Score: __limitedParseFloat32,
1585
+ Text: __expectString,
1586
+ Traits: (_) => de_ICD10CMTraitList(_, context),
1587
+ Type: __expectString,
1588
+ });
1739
1589
  };
1740
1590
  const de_ICD10CMEntityList = (output, context) => {
1741
1591
  const retVal = (output || [])
1742
1592
  .filter((e) => e != null)
1743
1593
  .map((entry) => {
1744
- if (entry === null) {
1745
- return null;
1746
- }
1747
1594
  return de_ICD10CMEntity(entry, context);
1748
1595
  });
1749
1596
  return retVal;
1750
1597
  };
1751
1598
  const de_ICD10CMTrait = (output, context) => {
1752
- return {
1753
- Name: __expectString(output.Name),
1754
- Score: __limitedParseFloat32(output.Score),
1755
- };
1599
+ return take(output, {
1600
+ Name: __expectString,
1601
+ Score: __limitedParseFloat32,
1602
+ });
1756
1603
  };
1757
1604
  const de_ICD10CMTraitList = (output, context) => {
1758
1605
  const retVal = (output || [])
1759
1606
  .filter((e) => e != null)
1760
1607
  .map((entry) => {
1761
- if (entry === null) {
1762
- return null;
1763
- }
1764
1608
  return de_ICD10CMTrait(entry, context);
1765
1609
  });
1766
1610
  return retVal;
1767
1611
  };
1768
1612
  const de_InferICD10CMResponse = (output, context) => {
1769
- return {
1770
- Entities: output.Entities != null ? de_ICD10CMEntityList(output.Entities, context) : undefined,
1771
- ModelVersion: __expectString(output.ModelVersion),
1772
- PaginationToken: __expectString(output.PaginationToken),
1773
- };
1613
+ return take(output, {
1614
+ Entities: (_) => de_ICD10CMEntityList(_, context),
1615
+ ModelVersion: __expectString,
1616
+ PaginationToken: __expectString,
1617
+ });
1774
1618
  };
1775
1619
  const de_InferRxNormResponse = (output, context) => {
1776
- return {
1777
- Entities: output.Entities != null ? de_RxNormEntityList(output.Entities, context) : undefined,
1778
- ModelVersion: __expectString(output.ModelVersion),
1779
- PaginationToken: __expectString(output.PaginationToken),
1780
- };
1620
+ return take(output, {
1621
+ Entities: (_) => de_RxNormEntityList(_, context),
1622
+ ModelVersion: __expectString,
1623
+ PaginationToken: __expectString,
1624
+ });
1781
1625
  };
1782
1626
  const de_InferSNOMEDCTResponse = (output, context) => {
1783
- return {
1784
- Characters: output.Characters != null ? de_Characters(output.Characters, context) : undefined,
1785
- Entities: output.Entities != null ? de_SNOMEDCTEntityList(output.Entities, context) : undefined,
1786
- ModelVersion: __expectString(output.ModelVersion),
1787
- PaginationToken: __expectString(output.PaginationToken),
1788
- SNOMEDCTDetails: output.SNOMEDCTDetails != null ? de_SNOMEDCTDetails(output.SNOMEDCTDetails, context) : undefined,
1789
- };
1790
- };
1791
- const de_InputDataConfig = (output, context) => {
1792
- return {
1793
- S3Bucket: __expectString(output.S3Bucket),
1794
- S3Key: __expectString(output.S3Key),
1795
- };
1796
- };
1797
- const de_InternalServerException = (output, context) => {
1798
- return {
1799
- Message: __expectString(output.Message),
1800
- };
1801
- };
1802
- const de_InvalidEncodingException = (output, context) => {
1803
- return {
1804
- Message: __expectString(output.Message),
1805
- };
1806
- };
1807
- const de_InvalidRequestException = (output, context) => {
1808
- return {
1809
- Message: __expectString(output.Message),
1810
- };
1627
+ return take(output, {
1628
+ Characters: _json,
1629
+ Entities: (_) => de_SNOMEDCTEntityList(_, context),
1630
+ ModelVersion: __expectString,
1631
+ PaginationToken: __expectString,
1632
+ SNOMEDCTDetails: _json,
1633
+ });
1811
1634
  };
1812
1635
  const de_ListEntitiesDetectionV2JobsResponse = (output, context) => {
1813
- return {
1814
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1815
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1816
- : undefined,
1817
- NextToken: __expectString(output.NextToken),
1818
- };
1636
+ return take(output, {
1637
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1638
+ NextToken: __expectString,
1639
+ });
1819
1640
  };
1820
1641
  const de_ListICD10CMInferenceJobsResponse = (output, context) => {
1821
- return {
1822
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1823
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1824
- : undefined,
1825
- NextToken: __expectString(output.NextToken),
1826
- };
1642
+ return take(output, {
1643
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1644
+ NextToken: __expectString,
1645
+ });
1827
1646
  };
1828
1647
  const de_ListPHIDetectionJobsResponse = (output, context) => {
1829
- return {
1830
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1831
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1832
- : undefined,
1833
- NextToken: __expectString(output.NextToken),
1834
- };
1648
+ return take(output, {
1649
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1650
+ NextToken: __expectString,
1651
+ });
1835
1652
  };
1836
1653
  const de_ListRxNormInferenceJobsResponse = (output, context) => {
1837
- return {
1838
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1839
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1840
- : undefined,
1841
- NextToken: __expectString(output.NextToken),
1842
- };
1654
+ return take(output, {
1655
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1656
+ NextToken: __expectString,
1657
+ });
1843
1658
  };
1844
1659
  const de_ListSNOMEDCTInferenceJobsResponse = (output, context) => {
1845
- return {
1846
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1847
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1848
- : undefined,
1849
- NextToken: __expectString(output.NextToken),
1850
- };
1851
- };
1852
- const de_OutputDataConfig = (output, context) => {
1853
- return {
1854
- S3Bucket: __expectString(output.S3Bucket),
1855
- S3Key: __expectString(output.S3Key),
1856
- };
1857
- };
1858
- const de_ResourceNotFoundException = (output, context) => {
1859
- return {
1860
- Message: __expectString(output.Message),
1861
- };
1660
+ return take(output, {
1661
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1662
+ NextToken: __expectString,
1663
+ });
1862
1664
  };
1863
1665
  const de_RxNormAttribute = (output, context) => {
1864
- return {
1865
- BeginOffset: __expectInt32(output.BeginOffset),
1866
- EndOffset: __expectInt32(output.EndOffset),
1867
- Id: __expectInt32(output.Id),
1868
- RelationshipScore: __limitedParseFloat32(output.RelationshipScore),
1869
- Score: __limitedParseFloat32(output.Score),
1870
- Text: __expectString(output.Text),
1871
- Traits: output.Traits != null ? de_RxNormTraitList(output.Traits, context) : undefined,
1872
- Type: __expectString(output.Type),
1873
- };
1666
+ return take(output, {
1667
+ BeginOffset: __expectInt32,
1668
+ EndOffset: __expectInt32,
1669
+ Id: __expectInt32,
1670
+ RelationshipScore: __limitedParseFloat32,
1671
+ Score: __limitedParseFloat32,
1672
+ Text: __expectString,
1673
+ Traits: (_) => de_RxNormTraitList(_, context),
1674
+ Type: __expectString,
1675
+ });
1874
1676
  };
1875
1677
  const de_RxNormAttributeList = (output, context) => {
1876
1678
  const retVal = (output || [])
1877
1679
  .filter((e) => e != null)
1878
1680
  .map((entry) => {
1879
- if (entry === null) {
1880
- return null;
1881
- }
1882
1681
  return de_RxNormAttribute(entry, context);
1883
1682
  });
1884
1683
  return retVal;
1885
1684
  };
1886
1685
  const de_RxNormConcept = (output, context) => {
1887
- return {
1888
- Code: __expectString(output.Code),
1889
- Description: __expectString(output.Description),
1890
- Score: __limitedParseFloat32(output.Score),
1891
- };
1686
+ return take(output, {
1687
+ Code: __expectString,
1688
+ Description: __expectString,
1689
+ Score: __limitedParseFloat32,
1690
+ });
1892
1691
  };
1893
1692
  const de_RxNormConceptList = (output, context) => {
1894
1693
  const retVal = (output || [])
1895
1694
  .filter((e) => e != null)
1896
1695
  .map((entry) => {
1897
- if (entry === null) {
1898
- return null;
1899
- }
1900
1696
  return de_RxNormConcept(entry, context);
1901
1697
  });
1902
1698
  return retVal;
1903
1699
  };
1904
1700
  const de_RxNormEntity = (output, context) => {
1905
- return {
1906
- Attributes: output.Attributes != null ? de_RxNormAttributeList(output.Attributes, context) : undefined,
1907
- BeginOffset: __expectInt32(output.BeginOffset),
1908
- Category: __expectString(output.Category),
1909
- EndOffset: __expectInt32(output.EndOffset),
1910
- Id: __expectInt32(output.Id),
1911
- RxNormConcepts: output.RxNormConcepts != null ? de_RxNormConceptList(output.RxNormConcepts, context) : undefined,
1912
- Score: __limitedParseFloat32(output.Score),
1913
- Text: __expectString(output.Text),
1914
- Traits: output.Traits != null ? de_RxNormTraitList(output.Traits, context) : undefined,
1915
- Type: __expectString(output.Type),
1916
- };
1701
+ return take(output, {
1702
+ Attributes: (_) => de_RxNormAttributeList(_, context),
1703
+ BeginOffset: __expectInt32,
1704
+ Category: __expectString,
1705
+ EndOffset: __expectInt32,
1706
+ Id: __expectInt32,
1707
+ RxNormConcepts: (_) => de_RxNormConceptList(_, context),
1708
+ Score: __limitedParseFloat32,
1709
+ Text: __expectString,
1710
+ Traits: (_) => de_RxNormTraitList(_, context),
1711
+ Type: __expectString,
1712
+ });
1917
1713
  };
1918
1714
  const de_RxNormEntityList = (output, context) => {
1919
1715
  const retVal = (output || [])
1920
1716
  .filter((e) => e != null)
1921
1717
  .map((entry) => {
1922
- if (entry === null) {
1923
- return null;
1924
- }
1925
1718
  return de_RxNormEntity(entry, context);
1926
1719
  });
1927
1720
  return retVal;
1928
1721
  };
1929
1722
  const de_RxNormTrait = (output, context) => {
1930
- return {
1931
- Name: __expectString(output.Name),
1932
- Score: __limitedParseFloat32(output.Score),
1933
- };
1723
+ return take(output, {
1724
+ Name: __expectString,
1725
+ Score: __limitedParseFloat32,
1726
+ });
1934
1727
  };
1935
1728
  const de_RxNormTraitList = (output, context) => {
1936
1729
  const retVal = (output || [])
1937
1730
  .filter((e) => e != null)
1938
1731
  .map((entry) => {
1939
- if (entry === null) {
1940
- return null;
1941
- }
1942
1732
  return de_RxNormTrait(entry, context);
1943
1733
  });
1944
1734
  return retVal;
1945
1735
  };
1946
- const de_ServiceUnavailableException = (output, context) => {
1947
- return {
1948
- Message: __expectString(output.Message),
1949
- };
1950
- };
1951
1736
  const de_SNOMEDCTAttribute = (output, context) => {
1952
- return {
1953
- BeginOffset: __expectInt32(output.BeginOffset),
1954
- Category: __expectString(output.Category),
1955
- EndOffset: __expectInt32(output.EndOffset),
1956
- Id: __expectInt32(output.Id),
1957
- RelationshipScore: __limitedParseFloat32(output.RelationshipScore),
1958
- RelationshipType: __expectString(output.RelationshipType),
1959
- SNOMEDCTConcepts: output.SNOMEDCTConcepts != null ? de_SNOMEDCTConceptList(output.SNOMEDCTConcepts, context) : undefined,
1960
- Score: __limitedParseFloat32(output.Score),
1961
- Text: __expectString(output.Text),
1962
- Traits: output.Traits != null ? de_SNOMEDCTTraitList(output.Traits, context) : undefined,
1963
- Type: __expectString(output.Type),
1964
- };
1737
+ return take(output, {
1738
+ BeginOffset: __expectInt32,
1739
+ Category: __expectString,
1740
+ EndOffset: __expectInt32,
1741
+ Id: __expectInt32,
1742
+ RelationshipScore: __limitedParseFloat32,
1743
+ RelationshipType: __expectString,
1744
+ SNOMEDCTConcepts: (_) => de_SNOMEDCTConceptList(_, context),
1745
+ Score: __limitedParseFloat32,
1746
+ Text: __expectString,
1747
+ Traits: (_) => de_SNOMEDCTTraitList(_, context),
1748
+ Type: __expectString,
1749
+ });
1965
1750
  };
1966
1751
  const de_SNOMEDCTAttributeList = (output, context) => {
1967
1752
  const retVal = (output || [])
1968
1753
  .filter((e) => e != null)
1969
1754
  .map((entry) => {
1970
- if (entry === null) {
1971
- return null;
1972
- }
1973
1755
  return de_SNOMEDCTAttribute(entry, context);
1974
1756
  });
1975
1757
  return retVal;
1976
1758
  };
1977
1759
  const de_SNOMEDCTConcept = (output, context) => {
1978
- return {
1979
- Code: __expectString(output.Code),
1980
- Description: __expectString(output.Description),
1981
- Score: __limitedParseFloat32(output.Score),
1982
- };
1760
+ return take(output, {
1761
+ Code: __expectString,
1762
+ Description: __expectString,
1763
+ Score: __limitedParseFloat32,
1764
+ });
1983
1765
  };
1984
1766
  const de_SNOMEDCTConceptList = (output, context) => {
1985
1767
  const retVal = (output || [])
1986
1768
  .filter((e) => e != null)
1987
1769
  .map((entry) => {
1988
- if (entry === null) {
1989
- return null;
1990
- }
1991
1770
  return de_SNOMEDCTConcept(entry, context);
1992
1771
  });
1993
1772
  return retVal;
1994
1773
  };
1995
- const de_SNOMEDCTDetails = (output, context) => {
1996
- return {
1997
- Edition: __expectString(output.Edition),
1998
- Language: __expectString(output.Language),
1999
- VersionDate: __expectString(output.VersionDate),
2000
- };
2001
- };
2002
1774
  const de_SNOMEDCTEntity = (output, context) => {
2003
- return {
2004
- Attributes: output.Attributes != null ? de_SNOMEDCTAttributeList(output.Attributes, context) : undefined,
2005
- BeginOffset: __expectInt32(output.BeginOffset),
2006
- Category: __expectString(output.Category),
2007
- EndOffset: __expectInt32(output.EndOffset),
2008
- Id: __expectInt32(output.Id),
2009
- SNOMEDCTConcepts: output.SNOMEDCTConcepts != null ? de_SNOMEDCTConceptList(output.SNOMEDCTConcepts, context) : undefined,
2010
- Score: __limitedParseFloat32(output.Score),
2011
- Text: __expectString(output.Text),
2012
- Traits: output.Traits != null ? de_SNOMEDCTTraitList(output.Traits, context) : undefined,
2013
- Type: __expectString(output.Type),
2014
- };
1775
+ return take(output, {
1776
+ Attributes: (_) => de_SNOMEDCTAttributeList(_, context),
1777
+ BeginOffset: __expectInt32,
1778
+ Category: __expectString,
1779
+ EndOffset: __expectInt32,
1780
+ Id: __expectInt32,
1781
+ SNOMEDCTConcepts: (_) => de_SNOMEDCTConceptList(_, context),
1782
+ Score: __limitedParseFloat32,
1783
+ Text: __expectString,
1784
+ Traits: (_) => de_SNOMEDCTTraitList(_, context),
1785
+ Type: __expectString,
1786
+ });
2015
1787
  };
2016
1788
  const de_SNOMEDCTEntityList = (output, context) => {
2017
1789
  const retVal = (output || [])
2018
1790
  .filter((e) => e != null)
2019
1791
  .map((entry) => {
2020
- if (entry === null) {
2021
- return null;
2022
- }
2023
1792
  return de_SNOMEDCTEntity(entry, context);
2024
1793
  });
2025
1794
  return retVal;
2026
1795
  };
2027
1796
  const de_SNOMEDCTTrait = (output, context) => {
2028
- return {
2029
- Name: __expectString(output.Name),
2030
- Score: __limitedParseFloat32(output.Score),
2031
- };
1797
+ return take(output, {
1798
+ Name: __expectString,
1799
+ Score: __limitedParseFloat32,
1800
+ });
2032
1801
  };
2033
1802
  const de_SNOMEDCTTraitList = (output, context) => {
2034
1803
  const retVal = (output || [])
2035
1804
  .filter((e) => e != null)
2036
1805
  .map((entry) => {
2037
- if (entry === null) {
2038
- return null;
2039
- }
2040
1806
  return de_SNOMEDCTTrait(entry, context);
2041
1807
  });
2042
1808
  return retVal;
2043
1809
  };
2044
- const de_StartEntitiesDetectionV2JobResponse = (output, context) => {
2045
- return {
2046
- JobId: __expectString(output.JobId),
2047
- };
2048
- };
2049
- const de_StartICD10CMInferenceJobResponse = (output, context) => {
2050
- return {
2051
- JobId: __expectString(output.JobId),
2052
- };
2053
- };
2054
- const de_StartPHIDetectionJobResponse = (output, context) => {
2055
- return {
2056
- JobId: __expectString(output.JobId),
2057
- };
2058
- };
2059
- const de_StartRxNormInferenceJobResponse = (output, context) => {
2060
- return {
2061
- JobId: __expectString(output.JobId),
2062
- };
2063
- };
2064
- const de_StartSNOMEDCTInferenceJobResponse = (output, context) => {
2065
- return {
2066
- JobId: __expectString(output.JobId),
2067
- };
2068
- };
2069
- const de_StopEntitiesDetectionV2JobResponse = (output, context) => {
2070
- return {
2071
- JobId: __expectString(output.JobId),
2072
- };
2073
- };
2074
- const de_StopICD10CMInferenceJobResponse = (output, context) => {
2075
- return {
2076
- JobId: __expectString(output.JobId),
2077
- };
2078
- };
2079
- const de_StopPHIDetectionJobResponse = (output, context) => {
2080
- return {
2081
- JobId: __expectString(output.JobId),
2082
- };
2083
- };
2084
- const de_StopRxNormInferenceJobResponse = (output, context) => {
2085
- return {
2086
- JobId: __expectString(output.JobId),
2087
- };
2088
- };
2089
- const de_StopSNOMEDCTInferenceJobResponse = (output, context) => {
2090
- return {
2091
- JobId: __expectString(output.JobId),
2092
- };
2093
- };
2094
- const de_TextSizeLimitExceededException = (output, context) => {
2095
- return {
2096
- Message: __expectString(output.Message),
2097
- };
2098
- };
2099
- const de_TooManyRequestsException = (output, context) => {
2100
- return {
2101
- Message: __expectString(output.Message),
2102
- };
2103
- };
2104
1810
  const de_Trait = (output, context) => {
2105
- return {
2106
- Name: __expectString(output.Name),
2107
- Score: __limitedParseFloat32(output.Score),
2108
- };
1811
+ return take(output, {
1812
+ Name: __expectString,
1813
+ Score: __limitedParseFloat32,
1814
+ });
2109
1815
  };
2110
1816
  const de_TraitList = (output, context) => {
2111
1817
  const retVal = (output || [])
2112
1818
  .filter((e) => e != null)
2113
1819
  .map((entry) => {
2114
- if (entry === null) {
2115
- return null;
2116
- }
2117
1820
  return de_Trait(entry, context);
2118
1821
  });
2119
1822
  return retVal;
2120
1823
  };
2121
1824
  const de_UnmappedAttribute = (output, context) => {
2122
- return {
2123
- Attribute: output.Attribute != null ? de_Attribute(output.Attribute, context) : undefined,
2124
- Type: __expectString(output.Type),
2125
- };
1825
+ return take(output, {
1826
+ Attribute: (_) => de_Attribute(_, context),
1827
+ Type: __expectString,
1828
+ });
2126
1829
  };
2127
1830
  const de_UnmappedAttributeList = (output, context) => {
2128
1831
  const retVal = (output || [])
2129
1832
  .filter((e) => e != null)
2130
1833
  .map((entry) => {
2131
- if (entry === null) {
2132
- return null;
2133
- }
2134
1834
  return de_UnmappedAttribute(entry, context);
2135
1835
  });
2136
1836
  return retVal;
2137
1837
  };
2138
- const de_ValidationException = (output, context) => {
2139
- return {
2140
- Message: __expectString(output.Message),
2141
- };
2142
- };
2143
1838
  const deserializeMetadata = (output) => ({
2144
1839
  httpStatusCode: output.statusCode,
2145
1840
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -2153,6 +1848,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2153
1848
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2154
1849
  };
2155
1850
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1851
+ const throwDefaultError = withBaseException(__BaseException);
2156
1852
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2157
1853
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2158
1854
  const contents = {