@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.
@@ -10,77 +10,77 @@ const models_0_1 = require("../models/models_0");
10
10
  const se_DescribeEntitiesDetectionV2JobCommand = async (input, context) => {
11
11
  const headers = sharedHeaders("DescribeEntitiesDetectionV2Job");
12
12
  let body;
13
- body = JSON.stringify(se_DescribeEntitiesDetectionV2JobRequest(input, context));
13
+ body = JSON.stringify((0, smithy_client_1._json)(input));
14
14
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
15
15
  };
16
16
  exports.se_DescribeEntitiesDetectionV2JobCommand = se_DescribeEntitiesDetectionV2JobCommand;
17
17
  const se_DescribeICD10CMInferenceJobCommand = async (input, context) => {
18
18
  const headers = sharedHeaders("DescribeICD10CMInferenceJob");
19
19
  let body;
20
- body = JSON.stringify(se_DescribeICD10CMInferenceJobRequest(input, context));
20
+ body = JSON.stringify((0, smithy_client_1._json)(input));
21
21
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
22
22
  };
23
23
  exports.se_DescribeICD10CMInferenceJobCommand = se_DescribeICD10CMInferenceJobCommand;
24
24
  const se_DescribePHIDetectionJobCommand = async (input, context) => {
25
25
  const headers = sharedHeaders("DescribePHIDetectionJob");
26
26
  let body;
27
- body = JSON.stringify(se_DescribePHIDetectionJobRequest(input, context));
27
+ body = JSON.stringify((0, smithy_client_1._json)(input));
28
28
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
29
29
  };
30
30
  exports.se_DescribePHIDetectionJobCommand = se_DescribePHIDetectionJobCommand;
31
31
  const se_DescribeRxNormInferenceJobCommand = async (input, context) => {
32
32
  const headers = sharedHeaders("DescribeRxNormInferenceJob");
33
33
  let body;
34
- body = JSON.stringify(se_DescribeRxNormInferenceJobRequest(input, context));
34
+ body = JSON.stringify((0, smithy_client_1._json)(input));
35
35
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
36
36
  };
37
37
  exports.se_DescribeRxNormInferenceJobCommand = se_DescribeRxNormInferenceJobCommand;
38
38
  const se_DescribeSNOMEDCTInferenceJobCommand = async (input, context) => {
39
39
  const headers = sharedHeaders("DescribeSNOMEDCTInferenceJob");
40
40
  let body;
41
- body = JSON.stringify(se_DescribeSNOMEDCTInferenceJobRequest(input, context));
41
+ body = JSON.stringify((0, smithy_client_1._json)(input));
42
42
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
43
43
  };
44
44
  exports.se_DescribeSNOMEDCTInferenceJobCommand = se_DescribeSNOMEDCTInferenceJobCommand;
45
45
  const se_DetectEntitiesCommand = async (input, context) => {
46
46
  const headers = sharedHeaders("DetectEntities");
47
47
  let body;
48
- body = JSON.stringify(se_DetectEntitiesRequest(input, context));
48
+ body = JSON.stringify((0, smithy_client_1._json)(input));
49
49
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
50
50
  };
51
51
  exports.se_DetectEntitiesCommand = se_DetectEntitiesCommand;
52
52
  const se_DetectEntitiesV2Command = async (input, context) => {
53
53
  const headers = sharedHeaders("DetectEntitiesV2");
54
54
  let body;
55
- body = JSON.stringify(se_DetectEntitiesV2Request(input, context));
55
+ body = JSON.stringify((0, smithy_client_1._json)(input));
56
56
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
57
57
  };
58
58
  exports.se_DetectEntitiesV2Command = se_DetectEntitiesV2Command;
59
59
  const se_DetectPHICommand = async (input, context) => {
60
60
  const headers = sharedHeaders("DetectPHI");
61
61
  let body;
62
- body = JSON.stringify(se_DetectPHIRequest(input, context));
62
+ body = JSON.stringify((0, smithy_client_1._json)(input));
63
63
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
64
64
  };
65
65
  exports.se_DetectPHICommand = se_DetectPHICommand;
66
66
  const se_InferICD10CMCommand = async (input, context) => {
67
67
  const headers = sharedHeaders("InferICD10CM");
68
68
  let body;
69
- body = JSON.stringify(se_InferICD10CMRequest(input, context));
69
+ body = JSON.stringify((0, smithy_client_1._json)(input));
70
70
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
71
71
  };
72
72
  exports.se_InferICD10CMCommand = se_InferICD10CMCommand;
73
73
  const se_InferRxNormCommand = async (input, context) => {
74
74
  const headers = sharedHeaders("InferRxNorm");
75
75
  let body;
76
- body = JSON.stringify(se_InferRxNormRequest(input, context));
76
+ body = JSON.stringify((0, smithy_client_1._json)(input));
77
77
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
78
78
  };
79
79
  exports.se_InferRxNormCommand = se_InferRxNormCommand;
80
80
  const se_InferSNOMEDCTCommand = async (input, context) => {
81
81
  const headers = sharedHeaders("InferSNOMEDCT");
82
82
  let body;
83
- body = JSON.stringify(se_InferSNOMEDCTRequest(input, context));
83
+ body = JSON.stringify((0, smithy_client_1._json)(input));
84
84
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
85
85
  };
86
86
  exports.se_InferSNOMEDCTCommand = se_InferSNOMEDCTCommand;
@@ -157,35 +157,35 @@ exports.se_StartSNOMEDCTInferenceJobCommand = se_StartSNOMEDCTInferenceJobComman
157
157
  const se_StopEntitiesDetectionV2JobCommand = async (input, context) => {
158
158
  const headers = sharedHeaders("StopEntitiesDetectionV2Job");
159
159
  let body;
160
- body = JSON.stringify(se_StopEntitiesDetectionV2JobRequest(input, context));
160
+ body = JSON.stringify((0, smithy_client_1._json)(input));
161
161
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
162
162
  };
163
163
  exports.se_StopEntitiesDetectionV2JobCommand = se_StopEntitiesDetectionV2JobCommand;
164
164
  const se_StopICD10CMInferenceJobCommand = async (input, context) => {
165
165
  const headers = sharedHeaders("StopICD10CMInferenceJob");
166
166
  let body;
167
- body = JSON.stringify(se_StopICD10CMInferenceJobRequest(input, context));
167
+ body = JSON.stringify((0, smithy_client_1._json)(input));
168
168
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
169
169
  };
170
170
  exports.se_StopICD10CMInferenceJobCommand = se_StopICD10CMInferenceJobCommand;
171
171
  const se_StopPHIDetectionJobCommand = async (input, context) => {
172
172
  const headers = sharedHeaders("StopPHIDetectionJob");
173
173
  let body;
174
- body = JSON.stringify(se_StopPHIDetectionJobRequest(input, context));
174
+ body = JSON.stringify((0, smithy_client_1._json)(input));
175
175
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
176
176
  };
177
177
  exports.se_StopPHIDetectionJobCommand = se_StopPHIDetectionJobCommand;
178
178
  const se_StopRxNormInferenceJobCommand = async (input, context) => {
179
179
  const headers = sharedHeaders("StopRxNormInferenceJob");
180
180
  let body;
181
- body = JSON.stringify(se_StopRxNormInferenceJobRequest(input, context));
181
+ body = JSON.stringify((0, smithy_client_1._json)(input));
182
182
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
183
183
  };
184
184
  exports.se_StopRxNormInferenceJobCommand = se_StopRxNormInferenceJobCommand;
185
185
  const se_StopSNOMEDCTInferenceJobCommand = async (input, context) => {
186
186
  const headers = sharedHeaders("StopSNOMEDCTInferenceJob");
187
187
  let body;
188
- body = JSON.stringify(se_StopSNOMEDCTInferenceJobRequest(input, context));
188
+ body = JSON.stringify((0, smithy_client_1._json)(input));
189
189
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
190
190
  };
191
191
  exports.se_StopSNOMEDCTInferenceJobCommand = se_StopSNOMEDCTInferenceJobCommand;
@@ -200,7 +200,7 @@ const de_DescribeEntitiesDetectionV2JobCommand = async (output, context) => {
200
200
  $metadata: deserializeMetadata(output),
201
201
  ...contents,
202
202
  };
203
- return Promise.resolve(response);
203
+ return response;
204
204
  };
205
205
  exports.de_DescribeEntitiesDetectionV2JobCommand = de_DescribeEntitiesDetectionV2JobCommand;
206
206
  const de_DescribeEntitiesDetectionV2JobCommandError = async (output, context) => {
@@ -224,10 +224,9 @@ const de_DescribeEntitiesDetectionV2JobCommandError = async (output, context) =>
224
224
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
225
225
  default:
226
226
  const parsedBody = parsedOutput.body;
227
- (0, smithy_client_1.throwDefaultError)({
227
+ return throwDefaultError({
228
228
  output,
229
229
  parsedBody,
230
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
231
230
  errorCode,
232
231
  });
233
232
  }
@@ -243,7 +242,7 @@ const de_DescribeICD10CMInferenceJobCommand = async (output, context) => {
243
242
  $metadata: deserializeMetadata(output),
244
243
  ...contents,
245
244
  };
246
- return Promise.resolve(response);
245
+ return response;
247
246
  };
248
247
  exports.de_DescribeICD10CMInferenceJobCommand = de_DescribeICD10CMInferenceJobCommand;
249
248
  const de_DescribeICD10CMInferenceJobCommandError = async (output, context) => {
@@ -267,10 +266,9 @@ const de_DescribeICD10CMInferenceJobCommandError = async (output, context) => {
267
266
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
268
267
  default:
269
268
  const parsedBody = parsedOutput.body;
270
- (0, smithy_client_1.throwDefaultError)({
269
+ return throwDefaultError({
271
270
  output,
272
271
  parsedBody,
273
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
274
272
  errorCode,
275
273
  });
276
274
  }
@@ -286,7 +284,7 @@ const de_DescribePHIDetectionJobCommand = async (output, context) => {
286
284
  $metadata: deserializeMetadata(output),
287
285
  ...contents,
288
286
  };
289
- return Promise.resolve(response);
287
+ return response;
290
288
  };
291
289
  exports.de_DescribePHIDetectionJobCommand = de_DescribePHIDetectionJobCommand;
292
290
  const de_DescribePHIDetectionJobCommandError = async (output, context) => {
@@ -310,10 +308,9 @@ const de_DescribePHIDetectionJobCommandError = async (output, context) => {
310
308
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
311
309
  default:
312
310
  const parsedBody = parsedOutput.body;
313
- (0, smithy_client_1.throwDefaultError)({
311
+ return throwDefaultError({
314
312
  output,
315
313
  parsedBody,
316
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
317
314
  errorCode,
318
315
  });
319
316
  }
@@ -329,7 +326,7 @@ const de_DescribeRxNormInferenceJobCommand = async (output, context) => {
329
326
  $metadata: deserializeMetadata(output),
330
327
  ...contents,
331
328
  };
332
- return Promise.resolve(response);
329
+ return response;
333
330
  };
334
331
  exports.de_DescribeRxNormInferenceJobCommand = de_DescribeRxNormInferenceJobCommand;
335
332
  const de_DescribeRxNormInferenceJobCommandError = async (output, context) => {
@@ -353,10 +350,9 @@ const de_DescribeRxNormInferenceJobCommandError = async (output, context) => {
353
350
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
354
351
  default:
355
352
  const parsedBody = parsedOutput.body;
356
- (0, smithy_client_1.throwDefaultError)({
353
+ return throwDefaultError({
357
354
  output,
358
355
  parsedBody,
359
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
360
356
  errorCode,
361
357
  });
362
358
  }
@@ -372,7 +368,7 @@ const de_DescribeSNOMEDCTInferenceJobCommand = async (output, context) => {
372
368
  $metadata: deserializeMetadata(output),
373
369
  ...contents,
374
370
  };
375
- return Promise.resolve(response);
371
+ return response;
376
372
  };
377
373
  exports.de_DescribeSNOMEDCTInferenceJobCommand = de_DescribeSNOMEDCTInferenceJobCommand;
378
374
  const de_DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
@@ -396,10 +392,9 @@ const de_DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
396
392
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
397
393
  default:
398
394
  const parsedBody = parsedOutput.body;
399
- (0, smithy_client_1.throwDefaultError)({
395
+ return throwDefaultError({
400
396
  output,
401
397
  parsedBody,
402
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
403
398
  errorCode,
404
399
  });
405
400
  }
@@ -415,7 +410,7 @@ const de_DetectEntitiesCommand = async (output, context) => {
415
410
  $metadata: deserializeMetadata(output),
416
411
  ...contents,
417
412
  };
418
- return Promise.resolve(response);
413
+ return response;
419
414
  };
420
415
  exports.de_DetectEntitiesCommand = de_DetectEntitiesCommand;
421
416
  const de_DetectEntitiesCommandError = async (output, context) => {
@@ -445,10 +440,9 @@ const de_DetectEntitiesCommandError = async (output, context) => {
445
440
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
446
441
  default:
447
442
  const parsedBody = parsedOutput.body;
448
- (0, smithy_client_1.throwDefaultError)({
443
+ return throwDefaultError({
449
444
  output,
450
445
  parsedBody,
451
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
452
446
  errorCode,
453
447
  });
454
448
  }
@@ -464,7 +458,7 @@ const de_DetectEntitiesV2Command = async (output, context) => {
464
458
  $metadata: deserializeMetadata(output),
465
459
  ...contents,
466
460
  };
467
- return Promise.resolve(response);
461
+ return response;
468
462
  };
469
463
  exports.de_DetectEntitiesV2Command = de_DetectEntitiesV2Command;
470
464
  const de_DetectEntitiesV2CommandError = async (output, context) => {
@@ -494,10 +488,9 @@ const de_DetectEntitiesV2CommandError = async (output, context) => {
494
488
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
495
489
  default:
496
490
  const parsedBody = parsedOutput.body;
497
- (0, smithy_client_1.throwDefaultError)({
491
+ return throwDefaultError({
498
492
  output,
499
493
  parsedBody,
500
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
501
494
  errorCode,
502
495
  });
503
496
  }
@@ -513,7 +506,7 @@ const de_DetectPHICommand = async (output, context) => {
513
506
  $metadata: deserializeMetadata(output),
514
507
  ...contents,
515
508
  };
516
- return Promise.resolve(response);
509
+ return response;
517
510
  };
518
511
  exports.de_DetectPHICommand = de_DetectPHICommand;
519
512
  const de_DetectPHICommandError = async (output, context) => {
@@ -543,10 +536,9 @@ const de_DetectPHICommandError = async (output, context) => {
543
536
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
544
537
  default:
545
538
  const parsedBody = parsedOutput.body;
546
- (0, smithy_client_1.throwDefaultError)({
539
+ return throwDefaultError({
547
540
  output,
548
541
  parsedBody,
549
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
550
542
  errorCode,
551
543
  });
552
544
  }
@@ -562,7 +554,7 @@ const de_InferICD10CMCommand = async (output, context) => {
562
554
  $metadata: deserializeMetadata(output),
563
555
  ...contents,
564
556
  };
565
- return Promise.resolve(response);
557
+ return response;
566
558
  };
567
559
  exports.de_InferICD10CMCommand = de_InferICD10CMCommand;
568
560
  const de_InferICD10CMCommandError = async (output, context) => {
@@ -592,10 +584,9 @@ const de_InferICD10CMCommandError = async (output, context) => {
592
584
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
593
585
  default:
594
586
  const parsedBody = parsedOutput.body;
595
- (0, smithy_client_1.throwDefaultError)({
587
+ return throwDefaultError({
596
588
  output,
597
589
  parsedBody,
598
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
599
590
  errorCode,
600
591
  });
601
592
  }
@@ -611,7 +602,7 @@ const de_InferRxNormCommand = async (output, context) => {
611
602
  $metadata: deserializeMetadata(output),
612
603
  ...contents,
613
604
  };
614
- return Promise.resolve(response);
605
+ return response;
615
606
  };
616
607
  exports.de_InferRxNormCommand = de_InferRxNormCommand;
617
608
  const de_InferRxNormCommandError = async (output, context) => {
@@ -641,10 +632,9 @@ const de_InferRxNormCommandError = async (output, context) => {
641
632
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
642
633
  default:
643
634
  const parsedBody = parsedOutput.body;
644
- (0, smithy_client_1.throwDefaultError)({
635
+ return throwDefaultError({
645
636
  output,
646
637
  parsedBody,
647
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
648
638
  errorCode,
649
639
  });
650
640
  }
@@ -660,7 +650,7 @@ const de_InferSNOMEDCTCommand = async (output, context) => {
660
650
  $metadata: deserializeMetadata(output),
661
651
  ...contents,
662
652
  };
663
- return Promise.resolve(response);
653
+ return response;
664
654
  };
665
655
  exports.de_InferSNOMEDCTCommand = de_InferSNOMEDCTCommand;
666
656
  const de_InferSNOMEDCTCommandError = async (output, context) => {
@@ -690,10 +680,9 @@ const de_InferSNOMEDCTCommandError = async (output, context) => {
690
680
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
691
681
  default:
692
682
  const parsedBody = parsedOutput.body;
693
- (0, smithy_client_1.throwDefaultError)({
683
+ return throwDefaultError({
694
684
  output,
695
685
  parsedBody,
696
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
697
686
  errorCode,
698
687
  });
699
688
  }
@@ -709,7 +698,7 @@ const de_ListEntitiesDetectionV2JobsCommand = async (output, context) => {
709
698
  $metadata: deserializeMetadata(output),
710
699
  ...contents,
711
700
  };
712
- return Promise.resolve(response);
701
+ return response;
713
702
  };
714
703
  exports.de_ListEntitiesDetectionV2JobsCommand = de_ListEntitiesDetectionV2JobsCommand;
715
704
  const de_ListEntitiesDetectionV2JobsCommandError = async (output, context) => {
@@ -733,10 +722,9 @@ const de_ListEntitiesDetectionV2JobsCommandError = async (output, context) => {
733
722
  throw await de_ValidationExceptionRes(parsedOutput, context);
734
723
  default:
735
724
  const parsedBody = parsedOutput.body;
736
- (0, smithy_client_1.throwDefaultError)({
725
+ return throwDefaultError({
737
726
  output,
738
727
  parsedBody,
739
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
740
728
  errorCode,
741
729
  });
742
730
  }
@@ -752,7 +740,7 @@ const de_ListICD10CMInferenceJobsCommand = async (output, context) => {
752
740
  $metadata: deserializeMetadata(output),
753
741
  ...contents,
754
742
  };
755
- return Promise.resolve(response);
743
+ return response;
756
744
  };
757
745
  exports.de_ListICD10CMInferenceJobsCommand = de_ListICD10CMInferenceJobsCommand;
758
746
  const de_ListICD10CMInferenceJobsCommandError = async (output, context) => {
@@ -776,10 +764,9 @@ const de_ListICD10CMInferenceJobsCommandError = async (output, context) => {
776
764
  throw await de_ValidationExceptionRes(parsedOutput, context);
777
765
  default:
778
766
  const parsedBody = parsedOutput.body;
779
- (0, smithy_client_1.throwDefaultError)({
767
+ return throwDefaultError({
780
768
  output,
781
769
  parsedBody,
782
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
783
770
  errorCode,
784
771
  });
785
772
  }
@@ -795,7 +782,7 @@ const de_ListPHIDetectionJobsCommand = async (output, context) => {
795
782
  $metadata: deserializeMetadata(output),
796
783
  ...contents,
797
784
  };
798
- return Promise.resolve(response);
785
+ return response;
799
786
  };
800
787
  exports.de_ListPHIDetectionJobsCommand = de_ListPHIDetectionJobsCommand;
801
788
  const de_ListPHIDetectionJobsCommandError = async (output, context) => {
@@ -819,10 +806,9 @@ const de_ListPHIDetectionJobsCommandError = async (output, context) => {
819
806
  throw await de_ValidationExceptionRes(parsedOutput, context);
820
807
  default:
821
808
  const parsedBody = parsedOutput.body;
822
- (0, smithy_client_1.throwDefaultError)({
809
+ return throwDefaultError({
823
810
  output,
824
811
  parsedBody,
825
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
826
812
  errorCode,
827
813
  });
828
814
  }
@@ -838,7 +824,7 @@ const de_ListRxNormInferenceJobsCommand = async (output, context) => {
838
824
  $metadata: deserializeMetadata(output),
839
825
  ...contents,
840
826
  };
841
- return Promise.resolve(response);
827
+ return response;
842
828
  };
843
829
  exports.de_ListRxNormInferenceJobsCommand = de_ListRxNormInferenceJobsCommand;
844
830
  const de_ListRxNormInferenceJobsCommandError = async (output, context) => {
@@ -862,10 +848,9 @@ const de_ListRxNormInferenceJobsCommandError = async (output, context) => {
862
848
  throw await de_ValidationExceptionRes(parsedOutput, context);
863
849
  default:
864
850
  const parsedBody = parsedOutput.body;
865
- (0, smithy_client_1.throwDefaultError)({
851
+ return throwDefaultError({
866
852
  output,
867
853
  parsedBody,
868
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
869
854
  errorCode,
870
855
  });
871
856
  }
@@ -881,7 +866,7 @@ const de_ListSNOMEDCTInferenceJobsCommand = async (output, context) => {
881
866
  $metadata: deserializeMetadata(output),
882
867
  ...contents,
883
868
  };
884
- return Promise.resolve(response);
869
+ return response;
885
870
  };
886
871
  exports.de_ListSNOMEDCTInferenceJobsCommand = de_ListSNOMEDCTInferenceJobsCommand;
887
872
  const de_ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
@@ -905,10 +890,9 @@ const de_ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
905
890
  throw await de_ValidationExceptionRes(parsedOutput, context);
906
891
  default:
907
892
  const parsedBody = parsedOutput.body;
908
- (0, smithy_client_1.throwDefaultError)({
893
+ return throwDefaultError({
909
894
  output,
910
895
  parsedBody,
911
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
912
896
  errorCode,
913
897
  });
914
898
  }
@@ -919,12 +903,12 @@ const de_StartEntitiesDetectionV2JobCommand = async (output, context) => {
919
903
  }
920
904
  const data = await parseBody(output.body, context);
921
905
  let contents = {};
922
- contents = de_StartEntitiesDetectionV2JobResponse(data, context);
906
+ contents = (0, smithy_client_1._json)(data);
923
907
  const response = {
924
908
  $metadata: deserializeMetadata(output),
925
909
  ...contents,
926
910
  };
927
- return Promise.resolve(response);
911
+ return response;
928
912
  };
929
913
  exports.de_StartEntitiesDetectionV2JobCommand = de_StartEntitiesDetectionV2JobCommand;
930
914
  const de_StartEntitiesDetectionV2JobCommandError = async (output, context) => {
@@ -948,10 +932,9 @@ const de_StartEntitiesDetectionV2JobCommandError = async (output, context) => {
948
932
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
949
933
  default:
950
934
  const parsedBody = parsedOutput.body;
951
- (0, smithy_client_1.throwDefaultError)({
935
+ return throwDefaultError({
952
936
  output,
953
937
  parsedBody,
954
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
955
938
  errorCode,
956
939
  });
957
940
  }
@@ -962,12 +945,12 @@ const de_StartICD10CMInferenceJobCommand = async (output, context) => {
962
945
  }
963
946
  const data = await parseBody(output.body, context);
964
947
  let contents = {};
965
- contents = de_StartICD10CMInferenceJobResponse(data, context);
948
+ contents = (0, smithy_client_1._json)(data);
966
949
  const response = {
967
950
  $metadata: deserializeMetadata(output),
968
951
  ...contents,
969
952
  };
970
- return Promise.resolve(response);
953
+ return response;
971
954
  };
972
955
  exports.de_StartICD10CMInferenceJobCommand = de_StartICD10CMInferenceJobCommand;
973
956
  const de_StartICD10CMInferenceJobCommandError = async (output, context) => {
@@ -991,10 +974,9 @@ const de_StartICD10CMInferenceJobCommandError = async (output, context) => {
991
974
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
992
975
  default:
993
976
  const parsedBody = parsedOutput.body;
994
- (0, smithy_client_1.throwDefaultError)({
977
+ return throwDefaultError({
995
978
  output,
996
979
  parsedBody,
997
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
998
980
  errorCode,
999
981
  });
1000
982
  }
@@ -1005,12 +987,12 @@ const de_StartPHIDetectionJobCommand = async (output, context) => {
1005
987
  }
1006
988
  const data = await parseBody(output.body, context);
1007
989
  let contents = {};
1008
- contents = de_StartPHIDetectionJobResponse(data, context);
990
+ contents = (0, smithy_client_1._json)(data);
1009
991
  const response = {
1010
992
  $metadata: deserializeMetadata(output),
1011
993
  ...contents,
1012
994
  };
1013
- return Promise.resolve(response);
995
+ return response;
1014
996
  };
1015
997
  exports.de_StartPHIDetectionJobCommand = de_StartPHIDetectionJobCommand;
1016
998
  const de_StartPHIDetectionJobCommandError = async (output, context) => {
@@ -1034,10 +1016,9 @@ const de_StartPHIDetectionJobCommandError = async (output, context) => {
1034
1016
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1035
1017
  default:
1036
1018
  const parsedBody = parsedOutput.body;
1037
- (0, smithy_client_1.throwDefaultError)({
1019
+ return throwDefaultError({
1038
1020
  output,
1039
1021
  parsedBody,
1040
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1041
1022
  errorCode,
1042
1023
  });
1043
1024
  }
@@ -1048,12 +1029,12 @@ const de_StartRxNormInferenceJobCommand = async (output, context) => {
1048
1029
  }
1049
1030
  const data = await parseBody(output.body, context);
1050
1031
  let contents = {};
1051
- contents = de_StartRxNormInferenceJobResponse(data, context);
1032
+ contents = (0, smithy_client_1._json)(data);
1052
1033
  const response = {
1053
1034
  $metadata: deserializeMetadata(output),
1054
1035
  ...contents,
1055
1036
  };
1056
- return Promise.resolve(response);
1037
+ return response;
1057
1038
  };
1058
1039
  exports.de_StartRxNormInferenceJobCommand = de_StartRxNormInferenceJobCommand;
1059
1040
  const de_StartRxNormInferenceJobCommandError = async (output, context) => {
@@ -1077,10 +1058,9 @@ const de_StartRxNormInferenceJobCommandError = async (output, context) => {
1077
1058
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1078
1059
  default:
1079
1060
  const parsedBody = parsedOutput.body;
1080
- (0, smithy_client_1.throwDefaultError)({
1061
+ return throwDefaultError({
1081
1062
  output,
1082
1063
  parsedBody,
1083
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1084
1064
  errorCode,
1085
1065
  });
1086
1066
  }
@@ -1091,12 +1071,12 @@ const de_StartSNOMEDCTInferenceJobCommand = async (output, context) => {
1091
1071
  }
1092
1072
  const data = await parseBody(output.body, context);
1093
1073
  let contents = {};
1094
- contents = de_StartSNOMEDCTInferenceJobResponse(data, context);
1074
+ contents = (0, smithy_client_1._json)(data);
1095
1075
  const response = {
1096
1076
  $metadata: deserializeMetadata(output),
1097
1077
  ...contents,
1098
1078
  };
1099
- return Promise.resolve(response);
1079
+ return response;
1100
1080
  };
1101
1081
  exports.de_StartSNOMEDCTInferenceJobCommand = de_StartSNOMEDCTInferenceJobCommand;
1102
1082
  const de_StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
@@ -1120,10 +1100,9 @@ const de_StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
1120
1100
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1121
1101
  default:
1122
1102
  const parsedBody = parsedOutput.body;
1123
- (0, smithy_client_1.throwDefaultError)({
1103
+ return throwDefaultError({
1124
1104
  output,
1125
1105
  parsedBody,
1126
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1127
1106
  errorCode,
1128
1107
  });
1129
1108
  }
@@ -1134,12 +1113,12 @@ const de_StopEntitiesDetectionV2JobCommand = async (output, context) => {
1134
1113
  }
1135
1114
  const data = await parseBody(output.body, context);
1136
1115
  let contents = {};
1137
- contents = de_StopEntitiesDetectionV2JobResponse(data, context);
1116
+ contents = (0, smithy_client_1._json)(data);
1138
1117
  const response = {
1139
1118
  $metadata: deserializeMetadata(output),
1140
1119
  ...contents,
1141
1120
  };
1142
- return Promise.resolve(response);
1121
+ return response;
1143
1122
  };
1144
1123
  exports.de_StopEntitiesDetectionV2JobCommand = de_StopEntitiesDetectionV2JobCommand;
1145
1124
  const de_StopEntitiesDetectionV2JobCommandError = async (output, context) => {
@@ -1160,10 +1139,9 @@ const de_StopEntitiesDetectionV2JobCommandError = async (output, context) => {
1160
1139
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1161
1140
  default:
1162
1141
  const parsedBody = parsedOutput.body;
1163
- (0, smithy_client_1.throwDefaultError)({
1142
+ return throwDefaultError({
1164
1143
  output,
1165
1144
  parsedBody,
1166
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1167
1145
  errorCode,
1168
1146
  });
1169
1147
  }
@@ -1174,12 +1152,12 @@ const de_StopICD10CMInferenceJobCommand = async (output, context) => {
1174
1152
  }
1175
1153
  const data = await parseBody(output.body, context);
1176
1154
  let contents = {};
1177
- contents = de_StopICD10CMInferenceJobResponse(data, context);
1155
+ contents = (0, smithy_client_1._json)(data);
1178
1156
  const response = {
1179
1157
  $metadata: deserializeMetadata(output),
1180
1158
  ...contents,
1181
1159
  };
1182
- return Promise.resolve(response);
1160
+ return response;
1183
1161
  };
1184
1162
  exports.de_StopICD10CMInferenceJobCommand = de_StopICD10CMInferenceJobCommand;
1185
1163
  const de_StopICD10CMInferenceJobCommandError = async (output, context) => {
@@ -1200,10 +1178,9 @@ const de_StopICD10CMInferenceJobCommandError = async (output, context) => {
1200
1178
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1201
1179
  default:
1202
1180
  const parsedBody = parsedOutput.body;
1203
- (0, smithy_client_1.throwDefaultError)({
1181
+ return throwDefaultError({
1204
1182
  output,
1205
1183
  parsedBody,
1206
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1207
1184
  errorCode,
1208
1185
  });
1209
1186
  }
@@ -1214,12 +1191,12 @@ const de_StopPHIDetectionJobCommand = async (output, context) => {
1214
1191
  }
1215
1192
  const data = await parseBody(output.body, context);
1216
1193
  let contents = {};
1217
- contents = de_StopPHIDetectionJobResponse(data, context);
1194
+ contents = (0, smithy_client_1._json)(data);
1218
1195
  const response = {
1219
1196
  $metadata: deserializeMetadata(output),
1220
1197
  ...contents,
1221
1198
  };
1222
- return Promise.resolve(response);
1199
+ return response;
1223
1200
  };
1224
1201
  exports.de_StopPHIDetectionJobCommand = de_StopPHIDetectionJobCommand;
1225
1202
  const de_StopPHIDetectionJobCommandError = async (output, context) => {
@@ -1240,10 +1217,9 @@ const de_StopPHIDetectionJobCommandError = async (output, context) => {
1240
1217
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1241
1218
  default:
1242
1219
  const parsedBody = parsedOutput.body;
1243
- (0, smithy_client_1.throwDefaultError)({
1220
+ return throwDefaultError({
1244
1221
  output,
1245
1222
  parsedBody,
1246
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1247
1223
  errorCode,
1248
1224
  });
1249
1225
  }
@@ -1254,12 +1230,12 @@ const de_StopRxNormInferenceJobCommand = async (output, context) => {
1254
1230
  }
1255
1231
  const data = await parseBody(output.body, context);
1256
1232
  let contents = {};
1257
- contents = de_StopRxNormInferenceJobResponse(data, context);
1233
+ contents = (0, smithy_client_1._json)(data);
1258
1234
  const response = {
1259
1235
  $metadata: deserializeMetadata(output),
1260
1236
  ...contents,
1261
1237
  };
1262
- return Promise.resolve(response);
1238
+ return response;
1263
1239
  };
1264
1240
  exports.de_StopRxNormInferenceJobCommand = de_StopRxNormInferenceJobCommand;
1265
1241
  const de_StopRxNormInferenceJobCommandError = async (output, context) => {
@@ -1280,10 +1256,9 @@ const de_StopRxNormInferenceJobCommandError = async (output, context) => {
1280
1256
  throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1281
1257
  default:
1282
1258
  const parsedBody = parsedOutput.body;
1283
- (0, smithy_client_1.throwDefaultError)({
1259
+ return throwDefaultError({
1284
1260
  output,
1285
1261
  parsedBody,
1286
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1287
1262
  errorCode,
1288
1263
  });
1289
1264
  }
@@ -1294,12 +1269,12 @@ const de_StopSNOMEDCTInferenceJobCommand = async (output, context) => {
1294
1269
  }
1295
1270
  const data = await parseBody(output.body, context);
1296
1271
  let contents = {};
1297
- contents = de_StopSNOMEDCTInferenceJobResponse(data, context);
1272
+ contents = (0, smithy_client_1._json)(data);
1298
1273
  const response = {
1299
1274
  $metadata: deserializeMetadata(output),
1300
1275
  ...contents,
1301
1276
  };
1302
- return Promise.resolve(response);
1277
+ return response;
1303
1278
  };
1304
1279
  exports.de_StopSNOMEDCTInferenceJobCommand = de_StopSNOMEDCTInferenceJobCommand;
1305
1280
  const de_StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
@@ -1323,17 +1298,16 @@ const de_StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
1323
1298
  throw await de_TooManyRequestsExceptionRes(parsedOutput, context);
1324
1299
  default:
1325
1300
  const parsedBody = parsedOutput.body;
1326
- (0, smithy_client_1.throwDefaultError)({
1301
+ return throwDefaultError({
1327
1302
  output,
1328
1303
  parsedBody,
1329
- exceptionCtor: ComprehendMedicalServiceException_1.ComprehendMedicalServiceException,
1330
1304
  errorCode,
1331
1305
  });
1332
1306
  }
1333
1307
  };
1334
1308
  const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1335
1309
  const body = parsedOutput.body;
1336
- const deserialized = de_InternalServerException(body, context);
1310
+ const deserialized = (0, smithy_client_1._json)(body);
1337
1311
  const exception = new models_0_1.InternalServerException({
1338
1312
  $metadata: deserializeMetadata(parsedOutput),
1339
1313
  ...deserialized,
@@ -1342,7 +1316,7 @@ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
1342
1316
  };
1343
1317
  const de_InvalidEncodingExceptionRes = async (parsedOutput, context) => {
1344
1318
  const body = parsedOutput.body;
1345
- const deserialized = de_InvalidEncodingException(body, context);
1319
+ const deserialized = (0, smithy_client_1._json)(body);
1346
1320
  const exception = new models_0_1.InvalidEncodingException({
1347
1321
  $metadata: deserializeMetadata(parsedOutput),
1348
1322
  ...deserialized,
@@ -1351,7 +1325,7 @@ const de_InvalidEncodingExceptionRes = async (parsedOutput, context) => {
1351
1325
  };
1352
1326
  const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1353
1327
  const body = parsedOutput.body;
1354
- const deserialized = de_InvalidRequestException(body, context);
1328
+ const deserialized = (0, smithy_client_1._json)(body);
1355
1329
  const exception = new models_0_1.InvalidRequestException({
1356
1330
  $metadata: deserializeMetadata(parsedOutput),
1357
1331
  ...deserialized,
@@ -1360,7 +1334,7 @@ const de_InvalidRequestExceptionRes = async (parsedOutput, context) => {
1360
1334
  };
1361
1335
  const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1362
1336
  const body = parsedOutput.body;
1363
- const deserialized = de_ResourceNotFoundException(body, context);
1337
+ const deserialized = (0, smithy_client_1._json)(body);
1364
1338
  const exception = new models_0_1.ResourceNotFoundException({
1365
1339
  $metadata: deserializeMetadata(parsedOutput),
1366
1340
  ...deserialized,
@@ -1369,7 +1343,7 @@ const de_ResourceNotFoundExceptionRes = async (parsedOutput, context) => {
1369
1343
  };
1370
1344
  const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1371
1345
  const body = parsedOutput.body;
1372
- const deserialized = de_ServiceUnavailableException(body, context);
1346
+ const deserialized = (0, smithy_client_1._json)(body);
1373
1347
  const exception = new models_0_1.ServiceUnavailableException({
1374
1348
  $metadata: deserializeMetadata(parsedOutput),
1375
1349
  ...deserialized,
@@ -1378,7 +1352,7 @@ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
1378
1352
  };
1379
1353
  const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1380
1354
  const body = parsedOutput.body;
1381
- const deserialized = de_TextSizeLimitExceededException(body, context);
1355
+ const deserialized = (0, smithy_client_1._json)(body);
1382
1356
  const exception = new models_0_1.TextSizeLimitExceededException({
1383
1357
  $metadata: deserializeMetadata(parsedOutput),
1384
1358
  ...deserialized,
@@ -1387,7 +1361,7 @@ const de_TextSizeLimitExceededExceptionRes = async (parsedOutput, context) => {
1387
1361
  };
1388
1362
  const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1389
1363
  const body = parsedOutput.body;
1390
- const deserialized = de_TooManyRequestsException(body, context);
1364
+ const deserialized = (0, smithy_client_1._json)(body);
1391
1365
  const exception = new models_0_1.TooManyRequestsException({
1392
1366
  $metadata: deserializeMetadata(parsedOutput),
1393
1367
  ...deserialized,
@@ -1396,7 +1370,7 @@ const de_TooManyRequestsExceptionRes = async (parsedOutput, context) => {
1396
1370
  };
1397
1371
  const de_ValidationExceptionRes = async (parsedOutput, context) => {
1398
1372
  const body = parsedOutput.body;
1399
- const deserialized = de_ValidationException(body, context);
1373
+ const deserialized = (0, smithy_client_1._json)(body);
1400
1374
  const exception = new models_0_1.ValidationException({
1401
1375
  $metadata: deserializeMetadata(parsedOutput),
1402
1376
  ...deserialized,
@@ -1404,798 +1378,519 @@ const de_ValidationExceptionRes = async (parsedOutput, context) => {
1404
1378
  return (0, smithy_client_1.decorateServiceException)(exception, body);
1405
1379
  };
1406
1380
  const se_ComprehendMedicalAsyncJobFilter = (input, context) => {
1407
- return {
1408
- ...(input.JobName != null && { JobName: input.JobName }),
1409
- ...(input.JobStatus != null && { JobStatus: input.JobStatus }),
1410
- ...(input.SubmitTimeAfter != null && { SubmitTimeAfter: Math.round(input.SubmitTimeAfter.getTime() / 1000) }),
1411
- ...(input.SubmitTimeBefore != null && { SubmitTimeBefore: Math.round(input.SubmitTimeBefore.getTime() / 1000) }),
1412
- };
1413
- };
1414
- const se_DescribeEntitiesDetectionV2JobRequest = (input, context) => {
1415
- return {
1416
- ...(input.JobId != null && { JobId: input.JobId }),
1417
- };
1418
- };
1419
- const se_DescribeICD10CMInferenceJobRequest = (input, context) => {
1420
- return {
1421
- ...(input.JobId != null && { JobId: input.JobId }),
1422
- };
1423
- };
1424
- const se_DescribePHIDetectionJobRequest = (input, context) => {
1425
- return {
1426
- ...(input.JobId != null && { JobId: input.JobId }),
1427
- };
1428
- };
1429
- const se_DescribeRxNormInferenceJobRequest = (input, context) => {
1430
- return {
1431
- ...(input.JobId != null && { JobId: input.JobId }),
1432
- };
1433
- };
1434
- const se_DescribeSNOMEDCTInferenceJobRequest = (input, context) => {
1435
- return {
1436
- ...(input.JobId != null && { JobId: input.JobId }),
1437
- };
1438
- };
1439
- const se_DetectEntitiesRequest = (input, context) => {
1440
- return {
1441
- ...(input.Text != null && { Text: input.Text }),
1442
- };
1443
- };
1444
- const se_DetectEntitiesV2Request = (input, context) => {
1445
- return {
1446
- ...(input.Text != null && { Text: input.Text }),
1447
- };
1448
- };
1449
- const se_DetectPHIRequest = (input, context) => {
1450
- return {
1451
- ...(input.Text != null && { Text: input.Text }),
1452
- };
1453
- };
1454
- const se_InferICD10CMRequest = (input, context) => {
1455
- return {
1456
- ...(input.Text != null && { Text: input.Text }),
1457
- };
1458
- };
1459
- const se_InferRxNormRequest = (input, context) => {
1460
- return {
1461
- ...(input.Text != null && { Text: input.Text }),
1462
- };
1463
- };
1464
- const se_InferSNOMEDCTRequest = (input, context) => {
1465
- return {
1466
- ...(input.Text != null && { Text: input.Text }),
1467
- };
1468
- };
1469
- const se_InputDataConfig = (input, context) => {
1470
- return {
1471
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
1472
- ...(input.S3Key != null && { S3Key: input.S3Key }),
1473
- };
1381
+ return (0, smithy_client_1.take)(input, {
1382
+ JobName: [],
1383
+ JobStatus: [],
1384
+ SubmitTimeAfter: (_) => Math.round(_.getTime() / 1000),
1385
+ SubmitTimeBefore: (_) => Math.round(_.getTime() / 1000),
1386
+ });
1474
1387
  };
1475
1388
  const se_ListEntitiesDetectionV2JobsRequest = (input, context) => {
1476
- return {
1477
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1478
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1479
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1480
- };
1389
+ return (0, smithy_client_1.take)(input, {
1390
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1391
+ MaxResults: [],
1392
+ NextToken: [],
1393
+ });
1481
1394
  };
1482
1395
  const se_ListICD10CMInferenceJobsRequest = (input, context) => {
1483
- return {
1484
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1485
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1486
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1487
- };
1396
+ return (0, smithy_client_1.take)(input, {
1397
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1398
+ MaxResults: [],
1399
+ NextToken: [],
1400
+ });
1488
1401
  };
1489
1402
  const se_ListPHIDetectionJobsRequest = (input, context) => {
1490
- return {
1491
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1492
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1493
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1494
- };
1403
+ return (0, smithy_client_1.take)(input, {
1404
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1405
+ MaxResults: [],
1406
+ NextToken: [],
1407
+ });
1495
1408
  };
1496
1409
  const se_ListRxNormInferenceJobsRequest = (input, context) => {
1497
- return {
1498
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1499
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1500
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1501
- };
1410
+ return (0, smithy_client_1.take)(input, {
1411
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1412
+ MaxResults: [],
1413
+ NextToken: [],
1414
+ });
1502
1415
  };
1503
1416
  const se_ListSNOMEDCTInferenceJobsRequest = (input, context) => {
1504
- return {
1505
- ...(input.Filter != null && { Filter: se_ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
1506
- ...(input.MaxResults != null && { MaxResults: input.MaxResults }),
1507
- ...(input.NextToken != null && { NextToken: input.NextToken }),
1508
- };
1509
- };
1510
- const se_OutputDataConfig = (input, context) => {
1511
- return {
1512
- ...(input.S3Bucket != null && { S3Bucket: input.S3Bucket }),
1513
- ...(input.S3Key != null && { S3Key: input.S3Key }),
1514
- };
1417
+ return (0, smithy_client_1.take)(input, {
1418
+ Filter: (_) => se_ComprehendMedicalAsyncJobFilter(_, context),
1419
+ MaxResults: [],
1420
+ NextToken: [],
1421
+ });
1515
1422
  };
1516
1423
  const se_StartEntitiesDetectionV2JobRequest = (input, context) => {
1517
- return {
1518
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
1519
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1520
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1521
- ...(input.JobName != null && { JobName: input.JobName }),
1522
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1523
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1524
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1525
- };
1424
+ return (0, smithy_client_1.take)(input, {
1425
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
1426
+ DataAccessRoleArn: [],
1427
+ InputDataConfig: smithy_client_1._json,
1428
+ JobName: [],
1429
+ KMSKey: [],
1430
+ LanguageCode: [],
1431
+ OutputDataConfig: smithy_client_1._json,
1432
+ });
1526
1433
  };
1527
1434
  const se_StartICD10CMInferenceJobRequest = (input, context) => {
1528
- return {
1529
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
1530
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1531
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1532
- ...(input.JobName != null && { JobName: input.JobName }),
1533
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1534
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1535
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1536
- };
1435
+ return (0, smithy_client_1.take)(input, {
1436
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
1437
+ DataAccessRoleArn: [],
1438
+ InputDataConfig: smithy_client_1._json,
1439
+ JobName: [],
1440
+ KMSKey: [],
1441
+ LanguageCode: [],
1442
+ OutputDataConfig: smithy_client_1._json,
1443
+ });
1537
1444
  };
1538
1445
  const se_StartPHIDetectionJobRequest = (input, context) => {
1539
- return {
1540
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
1541
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1542
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1543
- ...(input.JobName != null && { JobName: input.JobName }),
1544
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1545
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1546
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1547
- };
1446
+ return (0, smithy_client_1.take)(input, {
1447
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
1448
+ DataAccessRoleArn: [],
1449
+ InputDataConfig: smithy_client_1._json,
1450
+ JobName: [],
1451
+ KMSKey: [],
1452
+ LanguageCode: [],
1453
+ OutputDataConfig: smithy_client_1._json,
1454
+ });
1548
1455
  };
1549
1456
  const se_StartRxNormInferenceJobRequest = (input, context) => {
1550
- return {
1551
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
1552
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1553
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1554
- ...(input.JobName != null && { JobName: input.JobName }),
1555
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1556
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1557
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1558
- };
1457
+ return (0, smithy_client_1.take)(input, {
1458
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
1459
+ DataAccessRoleArn: [],
1460
+ InputDataConfig: smithy_client_1._json,
1461
+ JobName: [],
1462
+ KMSKey: [],
1463
+ LanguageCode: [],
1464
+ OutputDataConfig: smithy_client_1._json,
1465
+ });
1559
1466
  };
1560
1467
  const se_StartSNOMEDCTInferenceJobRequest = (input, context) => {
1561
- return {
1562
- ClientRequestToken: input.ClientRequestToken ?? (0, uuid_1.v4)(),
1563
- ...(input.DataAccessRoleArn != null && { DataAccessRoleArn: input.DataAccessRoleArn }),
1564
- ...(input.InputDataConfig != null && { InputDataConfig: se_InputDataConfig(input.InputDataConfig, context) }),
1565
- ...(input.JobName != null && { JobName: input.JobName }),
1566
- ...(input.KMSKey != null && { KMSKey: input.KMSKey }),
1567
- ...(input.LanguageCode != null && { LanguageCode: input.LanguageCode }),
1568
- ...(input.OutputDataConfig != null && { OutputDataConfig: se_OutputDataConfig(input.OutputDataConfig, context) }),
1569
- };
1570
- };
1571
- const se_StopEntitiesDetectionV2JobRequest = (input, context) => {
1572
- return {
1573
- ...(input.JobId != null && { JobId: input.JobId }),
1574
- };
1575
- };
1576
- const se_StopICD10CMInferenceJobRequest = (input, context) => {
1577
- return {
1578
- ...(input.JobId != null && { JobId: input.JobId }),
1579
- };
1580
- };
1581
- const se_StopPHIDetectionJobRequest = (input, context) => {
1582
- return {
1583
- ...(input.JobId != null && { JobId: input.JobId }),
1584
- };
1585
- };
1586
- const se_StopRxNormInferenceJobRequest = (input, context) => {
1587
- return {
1588
- ...(input.JobId != null && { JobId: input.JobId }),
1589
- };
1590
- };
1591
- const se_StopSNOMEDCTInferenceJobRequest = (input, context) => {
1592
- return {
1593
- ...(input.JobId != null && { JobId: input.JobId }),
1594
- };
1468
+ return (0, smithy_client_1.take)(input, {
1469
+ ClientRequestToken: (_) => _ ?? (0, uuid_1.v4)(),
1470
+ DataAccessRoleArn: [],
1471
+ InputDataConfig: smithy_client_1._json,
1472
+ JobName: [],
1473
+ KMSKey: [],
1474
+ LanguageCode: [],
1475
+ OutputDataConfig: smithy_client_1._json,
1476
+ });
1595
1477
  };
1596
1478
  const de_Attribute = (output, context) => {
1597
- return {
1598
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
1599
- Category: (0, smithy_client_1.expectString)(output.Category),
1600
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
1601
- Id: (0, smithy_client_1.expectInt32)(output.Id),
1602
- RelationshipScore: (0, smithy_client_1.limitedParseFloat32)(output.RelationshipScore),
1603
- RelationshipType: (0, smithy_client_1.expectString)(output.RelationshipType),
1604
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1605
- Text: (0, smithy_client_1.expectString)(output.Text),
1606
- Traits: output.Traits != null ? de_TraitList(output.Traits, context) : undefined,
1607
- Type: (0, smithy_client_1.expectString)(output.Type),
1608
- };
1479
+ return (0, smithy_client_1.take)(output, {
1480
+ BeginOffset: smithy_client_1.expectInt32,
1481
+ Category: smithy_client_1.expectString,
1482
+ EndOffset: smithy_client_1.expectInt32,
1483
+ Id: smithy_client_1.expectInt32,
1484
+ RelationshipScore: smithy_client_1.limitedParseFloat32,
1485
+ RelationshipType: smithy_client_1.expectString,
1486
+ Score: smithy_client_1.limitedParseFloat32,
1487
+ Text: smithy_client_1.expectString,
1488
+ Traits: (_) => de_TraitList(_, context),
1489
+ Type: smithy_client_1.expectString,
1490
+ });
1609
1491
  };
1610
1492
  const de_AttributeList = (output, context) => {
1611
1493
  const retVal = (output || [])
1612
1494
  .filter((e) => e != null)
1613
1495
  .map((entry) => {
1614
- if (entry === null) {
1615
- return null;
1616
- }
1617
1496
  return de_Attribute(entry, context);
1618
1497
  });
1619
1498
  return retVal;
1620
1499
  };
1621
- const de_Characters = (output, context) => {
1622
- return {
1623
- OriginalTextCharacters: (0, smithy_client_1.expectInt32)(output.OriginalTextCharacters),
1624
- };
1625
- };
1626
1500
  const de_ComprehendMedicalAsyncJobProperties = (output, context) => {
1627
- return {
1628
- DataAccessRoleArn: (0, smithy_client_1.expectString)(output.DataAccessRoleArn),
1629
- EndTime: output.EndTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.EndTime))) : undefined,
1630
- ExpirationTime: output.ExpirationTime != null
1631
- ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.ExpirationTime)))
1632
- : undefined,
1633
- InputDataConfig: output.InputDataConfig != null ? de_InputDataConfig(output.InputDataConfig, context) : undefined,
1634
- JobId: (0, smithy_client_1.expectString)(output.JobId),
1635
- JobName: (0, smithy_client_1.expectString)(output.JobName),
1636
- JobStatus: (0, smithy_client_1.expectString)(output.JobStatus),
1637
- KMSKey: (0, smithy_client_1.expectString)(output.KMSKey),
1638
- LanguageCode: (0, smithy_client_1.expectString)(output.LanguageCode),
1639
- ManifestFilePath: (0, smithy_client_1.expectString)(output.ManifestFilePath),
1640
- Message: (0, smithy_client_1.expectString)(output.Message),
1641
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1642
- OutputDataConfig: output.OutputDataConfig != null ? de_OutputDataConfig(output.OutputDataConfig, context) : undefined,
1643
- SubmitTime: output.SubmitTime != null ? (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(output.SubmitTime))) : undefined,
1644
- };
1501
+ return (0, smithy_client_1.take)(output, {
1502
+ DataAccessRoleArn: smithy_client_1.expectString,
1503
+ EndTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1504
+ ExpirationTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1505
+ InputDataConfig: smithy_client_1._json,
1506
+ JobId: smithy_client_1.expectString,
1507
+ JobName: smithy_client_1.expectString,
1508
+ JobStatus: smithy_client_1.expectString,
1509
+ KMSKey: smithy_client_1.expectString,
1510
+ LanguageCode: smithy_client_1.expectString,
1511
+ ManifestFilePath: smithy_client_1.expectString,
1512
+ Message: smithy_client_1.expectString,
1513
+ ModelVersion: smithy_client_1.expectString,
1514
+ OutputDataConfig: smithy_client_1._json,
1515
+ SubmitTime: (_) => (0, smithy_client_1.expectNonNull)((0, smithy_client_1.parseEpochTimestamp)((0, smithy_client_1.expectNumber)(_))),
1516
+ });
1645
1517
  };
1646
1518
  const de_ComprehendMedicalAsyncJobPropertiesList = (output, context) => {
1647
1519
  const retVal = (output || [])
1648
1520
  .filter((e) => e != null)
1649
1521
  .map((entry) => {
1650
- if (entry === null) {
1651
- return null;
1652
- }
1653
1522
  return de_ComprehendMedicalAsyncJobProperties(entry, context);
1654
1523
  });
1655
1524
  return retVal;
1656
1525
  };
1657
1526
  const de_DescribeEntitiesDetectionV2JobResponse = (output, context) => {
1658
- return {
1659
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1660
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1661
- : undefined,
1662
- };
1527
+ return (0, smithy_client_1.take)(output, {
1528
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1529
+ });
1663
1530
  };
1664
1531
  const de_DescribeICD10CMInferenceJobResponse = (output, context) => {
1665
- return {
1666
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1667
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1668
- : undefined,
1669
- };
1532
+ return (0, smithy_client_1.take)(output, {
1533
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1534
+ });
1670
1535
  };
1671
1536
  const de_DescribePHIDetectionJobResponse = (output, context) => {
1672
- return {
1673
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1674
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1675
- : undefined,
1676
- };
1537
+ return (0, smithy_client_1.take)(output, {
1538
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1539
+ });
1677
1540
  };
1678
1541
  const de_DescribeRxNormInferenceJobResponse = (output, context) => {
1679
- return {
1680
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1681
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1682
- : undefined,
1683
- };
1542
+ return (0, smithy_client_1.take)(output, {
1543
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1544
+ });
1684
1545
  };
1685
1546
  const de_DescribeSNOMEDCTInferenceJobResponse = (output, context) => {
1686
- return {
1687
- ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties != null
1688
- ? de_ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
1689
- : undefined,
1690
- };
1547
+ return (0, smithy_client_1.take)(output, {
1548
+ ComprehendMedicalAsyncJobProperties: (_) => de_ComprehendMedicalAsyncJobProperties(_, context),
1549
+ });
1691
1550
  };
1692
1551
  const de_DetectEntitiesResponse = (output, context) => {
1693
- return {
1694
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
1695
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1696
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
1697
- UnmappedAttributes: output.UnmappedAttributes != null ? de_UnmappedAttributeList(output.UnmappedAttributes, context) : undefined,
1698
- };
1552
+ return (0, smithy_client_1.take)(output, {
1553
+ Entities: (_) => de_EntityList(_, context),
1554
+ ModelVersion: smithy_client_1.expectString,
1555
+ PaginationToken: smithy_client_1.expectString,
1556
+ UnmappedAttributes: (_) => de_UnmappedAttributeList(_, context),
1557
+ });
1699
1558
  };
1700
1559
  const de_DetectEntitiesV2Response = (output, context) => {
1701
- return {
1702
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
1703
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1704
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
1705
- UnmappedAttributes: output.UnmappedAttributes != null ? de_UnmappedAttributeList(output.UnmappedAttributes, context) : undefined,
1706
- };
1560
+ return (0, smithy_client_1.take)(output, {
1561
+ Entities: (_) => de_EntityList(_, context),
1562
+ ModelVersion: smithy_client_1.expectString,
1563
+ PaginationToken: smithy_client_1.expectString,
1564
+ UnmappedAttributes: (_) => de_UnmappedAttributeList(_, context),
1565
+ });
1707
1566
  };
1708
1567
  const de_DetectPHIResponse = (output, context) => {
1709
- return {
1710
- Entities: output.Entities != null ? de_EntityList(output.Entities, context) : undefined,
1711
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1712
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
1713
- };
1568
+ return (0, smithy_client_1.take)(output, {
1569
+ Entities: (_) => de_EntityList(_, context),
1570
+ ModelVersion: smithy_client_1.expectString,
1571
+ PaginationToken: smithy_client_1.expectString,
1572
+ });
1714
1573
  };
1715
1574
  const de_Entity = (output, context) => {
1716
- return {
1717
- Attributes: output.Attributes != null ? de_AttributeList(output.Attributes, context) : undefined,
1718
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
1719
- Category: (0, smithy_client_1.expectString)(output.Category),
1720
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
1721
- Id: (0, smithy_client_1.expectInt32)(output.Id),
1722
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1723
- Text: (0, smithy_client_1.expectString)(output.Text),
1724
- Traits: output.Traits != null ? de_TraitList(output.Traits, context) : undefined,
1725
- Type: (0, smithy_client_1.expectString)(output.Type),
1726
- };
1575
+ return (0, smithy_client_1.take)(output, {
1576
+ Attributes: (_) => de_AttributeList(_, context),
1577
+ BeginOffset: smithy_client_1.expectInt32,
1578
+ Category: smithy_client_1.expectString,
1579
+ EndOffset: smithy_client_1.expectInt32,
1580
+ Id: smithy_client_1.expectInt32,
1581
+ Score: smithy_client_1.limitedParseFloat32,
1582
+ Text: smithy_client_1.expectString,
1583
+ Traits: (_) => de_TraitList(_, context),
1584
+ Type: smithy_client_1.expectString,
1585
+ });
1727
1586
  };
1728
1587
  const de_EntityList = (output, context) => {
1729
1588
  const retVal = (output || [])
1730
1589
  .filter((e) => e != null)
1731
1590
  .map((entry) => {
1732
- if (entry === null) {
1733
- return null;
1734
- }
1735
1591
  return de_Entity(entry, context);
1736
1592
  });
1737
1593
  return retVal;
1738
1594
  };
1739
1595
  const de_ICD10CMAttribute = (output, context) => {
1740
- return {
1741
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
1742
- Category: (0, smithy_client_1.expectString)(output.Category),
1743
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
1744
- Id: (0, smithy_client_1.expectInt32)(output.Id),
1745
- RelationshipScore: (0, smithy_client_1.limitedParseFloat32)(output.RelationshipScore),
1746
- RelationshipType: (0, smithy_client_1.expectString)(output.RelationshipType),
1747
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1748
- Text: (0, smithy_client_1.expectString)(output.Text),
1749
- Traits: output.Traits != null ? de_ICD10CMTraitList(output.Traits, context) : undefined,
1750
- Type: (0, smithy_client_1.expectString)(output.Type),
1751
- };
1596
+ return (0, smithy_client_1.take)(output, {
1597
+ BeginOffset: smithy_client_1.expectInt32,
1598
+ Category: smithy_client_1.expectString,
1599
+ EndOffset: smithy_client_1.expectInt32,
1600
+ Id: smithy_client_1.expectInt32,
1601
+ RelationshipScore: smithy_client_1.limitedParseFloat32,
1602
+ RelationshipType: smithy_client_1.expectString,
1603
+ Score: smithy_client_1.limitedParseFloat32,
1604
+ Text: smithy_client_1.expectString,
1605
+ Traits: (_) => de_ICD10CMTraitList(_, context),
1606
+ Type: smithy_client_1.expectString,
1607
+ });
1752
1608
  };
1753
1609
  const de_ICD10CMAttributeList = (output, context) => {
1754
1610
  const retVal = (output || [])
1755
1611
  .filter((e) => e != null)
1756
1612
  .map((entry) => {
1757
- if (entry === null) {
1758
- return null;
1759
- }
1760
1613
  return de_ICD10CMAttribute(entry, context);
1761
1614
  });
1762
1615
  return retVal;
1763
1616
  };
1764
1617
  const de_ICD10CMConcept = (output, context) => {
1765
- return {
1766
- Code: (0, smithy_client_1.expectString)(output.Code),
1767
- Description: (0, smithy_client_1.expectString)(output.Description),
1768
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1769
- };
1618
+ return (0, smithy_client_1.take)(output, {
1619
+ Code: smithy_client_1.expectString,
1620
+ Description: smithy_client_1.expectString,
1621
+ Score: smithy_client_1.limitedParseFloat32,
1622
+ });
1770
1623
  };
1771
1624
  const de_ICD10CMConceptList = (output, context) => {
1772
1625
  const retVal = (output || [])
1773
1626
  .filter((e) => e != null)
1774
1627
  .map((entry) => {
1775
- if (entry === null) {
1776
- return null;
1777
- }
1778
1628
  return de_ICD10CMConcept(entry, context);
1779
1629
  });
1780
1630
  return retVal;
1781
1631
  };
1782
1632
  const de_ICD10CMEntity = (output, context) => {
1783
- return {
1784
- Attributes: output.Attributes != null ? de_ICD10CMAttributeList(output.Attributes, context) : undefined,
1785
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
1786
- Category: (0, smithy_client_1.expectString)(output.Category),
1787
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
1788
- ICD10CMConcepts: output.ICD10CMConcepts != null ? de_ICD10CMConceptList(output.ICD10CMConcepts, context) : undefined,
1789
- Id: (0, smithy_client_1.expectInt32)(output.Id),
1790
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1791
- Text: (0, smithy_client_1.expectString)(output.Text),
1792
- Traits: output.Traits != null ? de_ICD10CMTraitList(output.Traits, context) : undefined,
1793
- Type: (0, smithy_client_1.expectString)(output.Type),
1794
- };
1633
+ return (0, smithy_client_1.take)(output, {
1634
+ Attributes: (_) => de_ICD10CMAttributeList(_, context),
1635
+ BeginOffset: smithy_client_1.expectInt32,
1636
+ Category: smithy_client_1.expectString,
1637
+ EndOffset: smithy_client_1.expectInt32,
1638
+ ICD10CMConcepts: (_) => de_ICD10CMConceptList(_, context),
1639
+ Id: smithy_client_1.expectInt32,
1640
+ Score: smithy_client_1.limitedParseFloat32,
1641
+ Text: smithy_client_1.expectString,
1642
+ Traits: (_) => de_ICD10CMTraitList(_, context),
1643
+ Type: smithy_client_1.expectString,
1644
+ });
1795
1645
  };
1796
1646
  const de_ICD10CMEntityList = (output, context) => {
1797
1647
  const retVal = (output || [])
1798
1648
  .filter((e) => e != null)
1799
1649
  .map((entry) => {
1800
- if (entry === null) {
1801
- return null;
1802
- }
1803
1650
  return de_ICD10CMEntity(entry, context);
1804
1651
  });
1805
1652
  return retVal;
1806
1653
  };
1807
1654
  const de_ICD10CMTrait = (output, context) => {
1808
- return {
1809
- Name: (0, smithy_client_1.expectString)(output.Name),
1810
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1811
- };
1655
+ return (0, smithy_client_1.take)(output, {
1656
+ Name: smithy_client_1.expectString,
1657
+ Score: smithy_client_1.limitedParseFloat32,
1658
+ });
1812
1659
  };
1813
1660
  const de_ICD10CMTraitList = (output, context) => {
1814
1661
  const retVal = (output || [])
1815
1662
  .filter((e) => e != null)
1816
1663
  .map((entry) => {
1817
- if (entry === null) {
1818
- return null;
1819
- }
1820
1664
  return de_ICD10CMTrait(entry, context);
1821
1665
  });
1822
1666
  return retVal;
1823
1667
  };
1824
1668
  const de_InferICD10CMResponse = (output, context) => {
1825
- return {
1826
- Entities: output.Entities != null ? de_ICD10CMEntityList(output.Entities, context) : undefined,
1827
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1828
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
1829
- };
1669
+ return (0, smithy_client_1.take)(output, {
1670
+ Entities: (_) => de_ICD10CMEntityList(_, context),
1671
+ ModelVersion: smithy_client_1.expectString,
1672
+ PaginationToken: smithy_client_1.expectString,
1673
+ });
1830
1674
  };
1831
1675
  const de_InferRxNormResponse = (output, context) => {
1832
- return {
1833
- Entities: output.Entities != null ? de_RxNormEntityList(output.Entities, context) : undefined,
1834
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1835
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
1836
- };
1676
+ return (0, smithy_client_1.take)(output, {
1677
+ Entities: (_) => de_RxNormEntityList(_, context),
1678
+ ModelVersion: smithy_client_1.expectString,
1679
+ PaginationToken: smithy_client_1.expectString,
1680
+ });
1837
1681
  };
1838
1682
  const de_InferSNOMEDCTResponse = (output, context) => {
1839
- return {
1840
- Characters: output.Characters != null ? de_Characters(output.Characters, context) : undefined,
1841
- Entities: output.Entities != null ? de_SNOMEDCTEntityList(output.Entities, context) : undefined,
1842
- ModelVersion: (0, smithy_client_1.expectString)(output.ModelVersion),
1843
- PaginationToken: (0, smithy_client_1.expectString)(output.PaginationToken),
1844
- SNOMEDCTDetails: output.SNOMEDCTDetails != null ? de_SNOMEDCTDetails(output.SNOMEDCTDetails, context) : undefined,
1845
- };
1846
- };
1847
- const de_InputDataConfig = (output, context) => {
1848
- return {
1849
- S3Bucket: (0, smithy_client_1.expectString)(output.S3Bucket),
1850
- S3Key: (0, smithy_client_1.expectString)(output.S3Key),
1851
- };
1852
- };
1853
- const de_InternalServerException = (output, context) => {
1854
- return {
1855
- Message: (0, smithy_client_1.expectString)(output.Message),
1856
- };
1857
- };
1858
- const de_InvalidEncodingException = (output, context) => {
1859
- return {
1860
- Message: (0, smithy_client_1.expectString)(output.Message),
1861
- };
1862
- };
1863
- const de_InvalidRequestException = (output, context) => {
1864
- return {
1865
- Message: (0, smithy_client_1.expectString)(output.Message),
1866
- };
1683
+ return (0, smithy_client_1.take)(output, {
1684
+ Characters: smithy_client_1._json,
1685
+ Entities: (_) => de_SNOMEDCTEntityList(_, context),
1686
+ ModelVersion: smithy_client_1.expectString,
1687
+ PaginationToken: smithy_client_1.expectString,
1688
+ SNOMEDCTDetails: smithy_client_1._json,
1689
+ });
1867
1690
  };
1868
1691
  const de_ListEntitiesDetectionV2JobsResponse = (output, context) => {
1869
- return {
1870
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1871
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1872
- : undefined,
1873
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1874
- };
1692
+ return (0, smithy_client_1.take)(output, {
1693
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1694
+ NextToken: smithy_client_1.expectString,
1695
+ });
1875
1696
  };
1876
1697
  const de_ListICD10CMInferenceJobsResponse = (output, context) => {
1877
- return {
1878
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1879
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1880
- : undefined,
1881
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1882
- };
1698
+ return (0, smithy_client_1.take)(output, {
1699
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1700
+ NextToken: smithy_client_1.expectString,
1701
+ });
1883
1702
  };
1884
1703
  const de_ListPHIDetectionJobsResponse = (output, context) => {
1885
- return {
1886
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1887
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1888
- : undefined,
1889
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1890
- };
1704
+ return (0, smithy_client_1.take)(output, {
1705
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1706
+ NextToken: smithy_client_1.expectString,
1707
+ });
1891
1708
  };
1892
1709
  const de_ListRxNormInferenceJobsResponse = (output, context) => {
1893
- return {
1894
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1895
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1896
- : undefined,
1897
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1898
- };
1710
+ return (0, smithy_client_1.take)(output, {
1711
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1712
+ NextToken: smithy_client_1.expectString,
1713
+ });
1899
1714
  };
1900
1715
  const de_ListSNOMEDCTInferenceJobsResponse = (output, context) => {
1901
- return {
1902
- ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList != null
1903
- ? de_ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
1904
- : undefined,
1905
- NextToken: (0, smithy_client_1.expectString)(output.NextToken),
1906
- };
1907
- };
1908
- const de_OutputDataConfig = (output, context) => {
1909
- return {
1910
- S3Bucket: (0, smithy_client_1.expectString)(output.S3Bucket),
1911
- S3Key: (0, smithy_client_1.expectString)(output.S3Key),
1912
- };
1913
- };
1914
- const de_ResourceNotFoundException = (output, context) => {
1915
- return {
1916
- Message: (0, smithy_client_1.expectString)(output.Message),
1917
- };
1716
+ return (0, smithy_client_1.take)(output, {
1717
+ ComprehendMedicalAsyncJobPropertiesList: (_) => de_ComprehendMedicalAsyncJobPropertiesList(_, context),
1718
+ NextToken: smithy_client_1.expectString,
1719
+ });
1918
1720
  };
1919
1721
  const de_RxNormAttribute = (output, context) => {
1920
- return {
1921
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
1922
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
1923
- Id: (0, smithy_client_1.expectInt32)(output.Id),
1924
- RelationshipScore: (0, smithy_client_1.limitedParseFloat32)(output.RelationshipScore),
1925
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1926
- Text: (0, smithy_client_1.expectString)(output.Text),
1927
- Traits: output.Traits != null ? de_RxNormTraitList(output.Traits, context) : undefined,
1928
- Type: (0, smithy_client_1.expectString)(output.Type),
1929
- };
1722
+ return (0, smithy_client_1.take)(output, {
1723
+ BeginOffset: smithy_client_1.expectInt32,
1724
+ EndOffset: smithy_client_1.expectInt32,
1725
+ Id: smithy_client_1.expectInt32,
1726
+ RelationshipScore: smithy_client_1.limitedParseFloat32,
1727
+ Score: smithy_client_1.limitedParseFloat32,
1728
+ Text: smithy_client_1.expectString,
1729
+ Traits: (_) => de_RxNormTraitList(_, context),
1730
+ Type: smithy_client_1.expectString,
1731
+ });
1930
1732
  };
1931
1733
  const de_RxNormAttributeList = (output, context) => {
1932
1734
  const retVal = (output || [])
1933
1735
  .filter((e) => e != null)
1934
1736
  .map((entry) => {
1935
- if (entry === null) {
1936
- return null;
1937
- }
1938
1737
  return de_RxNormAttribute(entry, context);
1939
1738
  });
1940
1739
  return retVal;
1941
1740
  };
1942
1741
  const de_RxNormConcept = (output, context) => {
1943
- return {
1944
- Code: (0, smithy_client_1.expectString)(output.Code),
1945
- Description: (0, smithy_client_1.expectString)(output.Description),
1946
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1947
- };
1742
+ return (0, smithy_client_1.take)(output, {
1743
+ Code: smithy_client_1.expectString,
1744
+ Description: smithy_client_1.expectString,
1745
+ Score: smithy_client_1.limitedParseFloat32,
1746
+ });
1948
1747
  };
1949
1748
  const de_RxNormConceptList = (output, context) => {
1950
1749
  const retVal = (output || [])
1951
1750
  .filter((e) => e != null)
1952
1751
  .map((entry) => {
1953
- if (entry === null) {
1954
- return null;
1955
- }
1956
1752
  return de_RxNormConcept(entry, context);
1957
1753
  });
1958
1754
  return retVal;
1959
1755
  };
1960
1756
  const de_RxNormEntity = (output, context) => {
1961
- return {
1962
- Attributes: output.Attributes != null ? de_RxNormAttributeList(output.Attributes, context) : undefined,
1963
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
1964
- Category: (0, smithy_client_1.expectString)(output.Category),
1965
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
1966
- Id: (0, smithy_client_1.expectInt32)(output.Id),
1967
- RxNormConcepts: output.RxNormConcepts != null ? de_RxNormConceptList(output.RxNormConcepts, context) : undefined,
1968
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1969
- Text: (0, smithy_client_1.expectString)(output.Text),
1970
- Traits: output.Traits != null ? de_RxNormTraitList(output.Traits, context) : undefined,
1971
- Type: (0, smithy_client_1.expectString)(output.Type),
1972
- };
1757
+ return (0, smithy_client_1.take)(output, {
1758
+ Attributes: (_) => de_RxNormAttributeList(_, context),
1759
+ BeginOffset: smithy_client_1.expectInt32,
1760
+ Category: smithy_client_1.expectString,
1761
+ EndOffset: smithy_client_1.expectInt32,
1762
+ Id: smithy_client_1.expectInt32,
1763
+ RxNormConcepts: (_) => de_RxNormConceptList(_, context),
1764
+ Score: smithy_client_1.limitedParseFloat32,
1765
+ Text: smithy_client_1.expectString,
1766
+ Traits: (_) => de_RxNormTraitList(_, context),
1767
+ Type: smithy_client_1.expectString,
1768
+ });
1973
1769
  };
1974
1770
  const de_RxNormEntityList = (output, context) => {
1975
1771
  const retVal = (output || [])
1976
1772
  .filter((e) => e != null)
1977
1773
  .map((entry) => {
1978
- if (entry === null) {
1979
- return null;
1980
- }
1981
1774
  return de_RxNormEntity(entry, context);
1982
1775
  });
1983
1776
  return retVal;
1984
1777
  };
1985
1778
  const de_RxNormTrait = (output, context) => {
1986
- return {
1987
- Name: (0, smithy_client_1.expectString)(output.Name),
1988
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
1989
- };
1779
+ return (0, smithy_client_1.take)(output, {
1780
+ Name: smithy_client_1.expectString,
1781
+ Score: smithy_client_1.limitedParseFloat32,
1782
+ });
1990
1783
  };
1991
1784
  const de_RxNormTraitList = (output, context) => {
1992
1785
  const retVal = (output || [])
1993
1786
  .filter((e) => e != null)
1994
1787
  .map((entry) => {
1995
- if (entry === null) {
1996
- return null;
1997
- }
1998
1788
  return de_RxNormTrait(entry, context);
1999
1789
  });
2000
1790
  return retVal;
2001
1791
  };
2002
- const de_ServiceUnavailableException = (output, context) => {
2003
- return {
2004
- Message: (0, smithy_client_1.expectString)(output.Message),
2005
- };
2006
- };
2007
1792
  const de_SNOMEDCTAttribute = (output, context) => {
2008
- return {
2009
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
2010
- Category: (0, smithy_client_1.expectString)(output.Category),
2011
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
2012
- Id: (0, smithy_client_1.expectInt32)(output.Id),
2013
- RelationshipScore: (0, smithy_client_1.limitedParseFloat32)(output.RelationshipScore),
2014
- RelationshipType: (0, smithy_client_1.expectString)(output.RelationshipType),
2015
- SNOMEDCTConcepts: output.SNOMEDCTConcepts != null ? de_SNOMEDCTConceptList(output.SNOMEDCTConcepts, context) : undefined,
2016
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
2017
- Text: (0, smithy_client_1.expectString)(output.Text),
2018
- Traits: output.Traits != null ? de_SNOMEDCTTraitList(output.Traits, context) : undefined,
2019
- Type: (0, smithy_client_1.expectString)(output.Type),
2020
- };
1793
+ return (0, smithy_client_1.take)(output, {
1794
+ BeginOffset: smithy_client_1.expectInt32,
1795
+ Category: smithy_client_1.expectString,
1796
+ EndOffset: smithy_client_1.expectInt32,
1797
+ Id: smithy_client_1.expectInt32,
1798
+ RelationshipScore: smithy_client_1.limitedParseFloat32,
1799
+ RelationshipType: smithy_client_1.expectString,
1800
+ SNOMEDCTConcepts: (_) => de_SNOMEDCTConceptList(_, context),
1801
+ Score: smithy_client_1.limitedParseFloat32,
1802
+ Text: smithy_client_1.expectString,
1803
+ Traits: (_) => de_SNOMEDCTTraitList(_, context),
1804
+ Type: smithy_client_1.expectString,
1805
+ });
2021
1806
  };
2022
1807
  const de_SNOMEDCTAttributeList = (output, context) => {
2023
1808
  const retVal = (output || [])
2024
1809
  .filter((e) => e != null)
2025
1810
  .map((entry) => {
2026
- if (entry === null) {
2027
- return null;
2028
- }
2029
1811
  return de_SNOMEDCTAttribute(entry, context);
2030
1812
  });
2031
1813
  return retVal;
2032
1814
  };
2033
1815
  const de_SNOMEDCTConcept = (output, context) => {
2034
- return {
2035
- Code: (0, smithy_client_1.expectString)(output.Code),
2036
- Description: (0, smithy_client_1.expectString)(output.Description),
2037
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
2038
- };
1816
+ return (0, smithy_client_1.take)(output, {
1817
+ Code: smithy_client_1.expectString,
1818
+ Description: smithy_client_1.expectString,
1819
+ Score: smithy_client_1.limitedParseFloat32,
1820
+ });
2039
1821
  };
2040
1822
  const de_SNOMEDCTConceptList = (output, context) => {
2041
1823
  const retVal = (output || [])
2042
1824
  .filter((e) => e != null)
2043
1825
  .map((entry) => {
2044
- if (entry === null) {
2045
- return null;
2046
- }
2047
1826
  return de_SNOMEDCTConcept(entry, context);
2048
1827
  });
2049
1828
  return retVal;
2050
1829
  };
2051
- const de_SNOMEDCTDetails = (output, context) => {
2052
- return {
2053
- Edition: (0, smithy_client_1.expectString)(output.Edition),
2054
- Language: (0, smithy_client_1.expectString)(output.Language),
2055
- VersionDate: (0, smithy_client_1.expectString)(output.VersionDate),
2056
- };
2057
- };
2058
1830
  const de_SNOMEDCTEntity = (output, context) => {
2059
- return {
2060
- Attributes: output.Attributes != null ? de_SNOMEDCTAttributeList(output.Attributes, context) : undefined,
2061
- BeginOffset: (0, smithy_client_1.expectInt32)(output.BeginOffset),
2062
- Category: (0, smithy_client_1.expectString)(output.Category),
2063
- EndOffset: (0, smithy_client_1.expectInt32)(output.EndOffset),
2064
- Id: (0, smithy_client_1.expectInt32)(output.Id),
2065
- SNOMEDCTConcepts: output.SNOMEDCTConcepts != null ? de_SNOMEDCTConceptList(output.SNOMEDCTConcepts, context) : undefined,
2066
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
2067
- Text: (0, smithy_client_1.expectString)(output.Text),
2068
- Traits: output.Traits != null ? de_SNOMEDCTTraitList(output.Traits, context) : undefined,
2069
- Type: (0, smithy_client_1.expectString)(output.Type),
2070
- };
1831
+ return (0, smithy_client_1.take)(output, {
1832
+ Attributes: (_) => de_SNOMEDCTAttributeList(_, context),
1833
+ BeginOffset: smithy_client_1.expectInt32,
1834
+ Category: smithy_client_1.expectString,
1835
+ EndOffset: smithy_client_1.expectInt32,
1836
+ Id: smithy_client_1.expectInt32,
1837
+ SNOMEDCTConcepts: (_) => de_SNOMEDCTConceptList(_, context),
1838
+ Score: smithy_client_1.limitedParseFloat32,
1839
+ Text: smithy_client_1.expectString,
1840
+ Traits: (_) => de_SNOMEDCTTraitList(_, context),
1841
+ Type: smithy_client_1.expectString,
1842
+ });
2071
1843
  };
2072
1844
  const de_SNOMEDCTEntityList = (output, context) => {
2073
1845
  const retVal = (output || [])
2074
1846
  .filter((e) => e != null)
2075
1847
  .map((entry) => {
2076
- if (entry === null) {
2077
- return null;
2078
- }
2079
1848
  return de_SNOMEDCTEntity(entry, context);
2080
1849
  });
2081
1850
  return retVal;
2082
1851
  };
2083
1852
  const de_SNOMEDCTTrait = (output, context) => {
2084
- return {
2085
- Name: (0, smithy_client_1.expectString)(output.Name),
2086
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
2087
- };
1853
+ return (0, smithy_client_1.take)(output, {
1854
+ Name: smithy_client_1.expectString,
1855
+ Score: smithy_client_1.limitedParseFloat32,
1856
+ });
2088
1857
  };
2089
1858
  const de_SNOMEDCTTraitList = (output, context) => {
2090
1859
  const retVal = (output || [])
2091
1860
  .filter((e) => e != null)
2092
1861
  .map((entry) => {
2093
- if (entry === null) {
2094
- return null;
2095
- }
2096
1862
  return de_SNOMEDCTTrait(entry, context);
2097
1863
  });
2098
1864
  return retVal;
2099
1865
  };
2100
- const de_StartEntitiesDetectionV2JobResponse = (output, context) => {
2101
- return {
2102
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2103
- };
2104
- };
2105
- const de_StartICD10CMInferenceJobResponse = (output, context) => {
2106
- return {
2107
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2108
- };
2109
- };
2110
- const de_StartPHIDetectionJobResponse = (output, context) => {
2111
- return {
2112
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2113
- };
2114
- };
2115
- const de_StartRxNormInferenceJobResponse = (output, context) => {
2116
- return {
2117
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2118
- };
2119
- };
2120
- const de_StartSNOMEDCTInferenceJobResponse = (output, context) => {
2121
- return {
2122
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2123
- };
2124
- };
2125
- const de_StopEntitiesDetectionV2JobResponse = (output, context) => {
2126
- return {
2127
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2128
- };
2129
- };
2130
- const de_StopICD10CMInferenceJobResponse = (output, context) => {
2131
- return {
2132
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2133
- };
2134
- };
2135
- const de_StopPHIDetectionJobResponse = (output, context) => {
2136
- return {
2137
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2138
- };
2139
- };
2140
- const de_StopRxNormInferenceJobResponse = (output, context) => {
2141
- return {
2142
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2143
- };
2144
- };
2145
- const de_StopSNOMEDCTInferenceJobResponse = (output, context) => {
2146
- return {
2147
- JobId: (0, smithy_client_1.expectString)(output.JobId),
2148
- };
2149
- };
2150
- const de_TextSizeLimitExceededException = (output, context) => {
2151
- return {
2152
- Message: (0, smithy_client_1.expectString)(output.Message),
2153
- };
2154
- };
2155
- const de_TooManyRequestsException = (output, context) => {
2156
- return {
2157
- Message: (0, smithy_client_1.expectString)(output.Message),
2158
- };
2159
- };
2160
1866
  const de_Trait = (output, context) => {
2161
- return {
2162
- Name: (0, smithy_client_1.expectString)(output.Name),
2163
- Score: (0, smithy_client_1.limitedParseFloat32)(output.Score),
2164
- };
1867
+ return (0, smithy_client_1.take)(output, {
1868
+ Name: smithy_client_1.expectString,
1869
+ Score: smithy_client_1.limitedParseFloat32,
1870
+ });
2165
1871
  };
2166
1872
  const de_TraitList = (output, context) => {
2167
1873
  const retVal = (output || [])
2168
1874
  .filter((e) => e != null)
2169
1875
  .map((entry) => {
2170
- if (entry === null) {
2171
- return null;
2172
- }
2173
1876
  return de_Trait(entry, context);
2174
1877
  });
2175
1878
  return retVal;
2176
1879
  };
2177
1880
  const de_UnmappedAttribute = (output, context) => {
2178
- return {
2179
- Attribute: output.Attribute != null ? de_Attribute(output.Attribute, context) : undefined,
2180
- Type: (0, smithy_client_1.expectString)(output.Type),
2181
- };
1881
+ return (0, smithy_client_1.take)(output, {
1882
+ Attribute: (_) => de_Attribute(_, context),
1883
+ Type: smithy_client_1.expectString,
1884
+ });
2182
1885
  };
2183
1886
  const de_UnmappedAttributeList = (output, context) => {
2184
1887
  const retVal = (output || [])
2185
1888
  .filter((e) => e != null)
2186
1889
  .map((entry) => {
2187
- if (entry === null) {
2188
- return null;
2189
- }
2190
1890
  return de_UnmappedAttribute(entry, context);
2191
1891
  });
2192
1892
  return retVal;
2193
1893
  };
2194
- const de_ValidationException = (output, context) => {
2195
- return {
2196
- Message: (0, smithy_client_1.expectString)(output.Message),
2197
- };
2198
- };
2199
1894
  const deserializeMetadata = (output) => ({
2200
1895
  httpStatusCode: output.statusCode,
2201
1896
  requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
@@ -2209,6 +1904,7 @@ const collectBody = (streamBody = new Uint8Array(), context) => {
2209
1904
  return context.streamCollector(streamBody) || Promise.resolve(new Uint8Array());
2210
1905
  };
2211
1906
  const collectBodyString = (streamBody, context) => collectBody(streamBody, context).then((body) => context.utf8Encoder(body));
1907
+ const throwDefaultError = (0, smithy_client_1.withBaseException)(ComprehendMedicalServiceException_1.ComprehendMedicalServiceException);
2212
1908
  const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
2213
1909
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
2214
1910
  const contents = {