@aws-sdk/client-comprehendmedical 3.41.0 → 3.46.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.
- package/CHANGELOG.md +44 -0
- package/README.md +1 -1
- package/dist-cjs/ComprehendMedical.js +75 -0
- package/dist-cjs/commands/DescribeSNOMEDCTInferenceJobCommand.js +36 -0
- package/dist-cjs/commands/InferSNOMEDCTCommand.js +36 -0
- package/dist-cjs/commands/ListSNOMEDCTInferenceJobsCommand.js +36 -0
- package/dist-cjs/commands/StartSNOMEDCTInferenceJobCommand.js +36 -0
- package/dist-cjs/commands/StopSNOMEDCTInferenceJobCommand.js +36 -0
- package/dist-cjs/commands/index.js +5 -0
- package/dist-cjs/endpoints.js +1 -0
- package/dist-cjs/models/models_0.js +142 -2
- package/dist-cjs/protocols/Aws_json1_1.js +646 -37
- package/dist-cjs/runtimeConfig.js +0 -2
- package/dist-es/ComprehendMedical.js +75 -0
- package/dist-es/commands/DescribeSNOMEDCTInferenceJobCommand.js +39 -0
- package/dist-es/commands/InferSNOMEDCTCommand.js +39 -0
- package/dist-es/commands/ListSNOMEDCTInferenceJobsCommand.js +39 -0
- package/dist-es/commands/StartSNOMEDCTInferenceJobCommand.js +39 -0
- package/dist-es/commands/StopSNOMEDCTInferenceJobCommand.js +39 -0
- package/dist-es/commands/index.js +5 -0
- package/dist-es/endpoints.js +1 -0
- package/dist-es/models/models_0.js +107 -0
- package/dist-es/protocols/Aws_json1_1.js +667 -27
- package/dist-es/runtimeConfig.js +0 -2
- package/dist-types/ComprehendMedical.d.ts +45 -1
- package/dist-types/ComprehendMedicalClient.d.ts +8 -3
- package/dist-types/commands/DescribeSNOMEDCTInferenceJobCommand.d.ts +37 -0
- package/dist-types/commands/InferSNOMEDCTCommand.d.ts +36 -0
- package/dist-types/commands/ListSNOMEDCTInferenceJobsCommand.d.ts +37 -0
- package/dist-types/commands/StartSNOMEDCTInferenceJobCommand.d.ts +37 -0
- package/dist-types/commands/StopSNOMEDCTInferenceJobCommand.d.ts +37 -0
- package/dist-types/commands/index.d.ts +5 -0
- package/dist-types/models/models_0.d.ts +533 -26
- package/dist-types/protocols/Aws_json1_1.d.ts +15 -0
- package/dist-types/ts3.4/ComprehendMedical.d.ts +25 -0
- package/dist-types/ts3.4/ComprehendMedicalClient.d.ts +7 -2
- package/dist-types/ts3.4/commands/DescribeSNOMEDCTInferenceJobCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/InferSNOMEDCTCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListSNOMEDCTInferenceJobsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartSNOMEDCTInferenceJobCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StopSNOMEDCTInferenceJobCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +5 -0
- package/dist-types/ts3.4/models/models_0.d.ts +246 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +15 -0
- package/package.json +36 -43
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.deserializeAws_json1_1StopPHIDetectionJobCommand = exports.deserializeAws_json1_1StopICD10CMInferenceJobCommand = exports.deserializeAws_json1_1StopEntitiesDetectionV2JobCommand = exports.deserializeAws_json1_1StartSNOMEDCTInferenceJobCommand = exports.deserializeAws_json1_1StartRxNormInferenceJobCommand = exports.deserializeAws_json1_1StartPHIDetectionJobCommand = exports.deserializeAws_json1_1StartICD10CMInferenceJobCommand = exports.deserializeAws_json1_1StartEntitiesDetectionV2JobCommand = exports.deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = exports.deserializeAws_json1_1ListRxNormInferenceJobsCommand = exports.deserializeAws_json1_1ListPHIDetectionJobsCommand = exports.deserializeAws_json1_1ListICD10CMInferenceJobsCommand = exports.deserializeAws_json1_1ListEntitiesDetectionV2JobsCommand = exports.deserializeAws_json1_1InferSNOMEDCTCommand = exports.deserializeAws_json1_1InferRxNormCommand = exports.deserializeAws_json1_1InferICD10CMCommand = exports.deserializeAws_json1_1DetectPHICommand = exports.deserializeAws_json1_1DetectEntitiesV2Command = exports.deserializeAws_json1_1DetectEntitiesCommand = exports.deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = exports.deserializeAws_json1_1DescribeRxNormInferenceJobCommand = exports.deserializeAws_json1_1DescribePHIDetectionJobCommand = exports.deserializeAws_json1_1DescribeICD10CMInferenceJobCommand = exports.deserializeAws_json1_1DescribeEntitiesDetectionV2JobCommand = exports.serializeAws_json1_1StopSNOMEDCTInferenceJobCommand = exports.serializeAws_json1_1StopRxNormInferenceJobCommand = exports.serializeAws_json1_1StopPHIDetectionJobCommand = exports.serializeAws_json1_1StopICD10CMInferenceJobCommand = exports.serializeAws_json1_1StopEntitiesDetectionV2JobCommand = exports.serializeAws_json1_1StartSNOMEDCTInferenceJobCommand = exports.serializeAws_json1_1StartRxNormInferenceJobCommand = exports.serializeAws_json1_1StartPHIDetectionJobCommand = exports.serializeAws_json1_1StartICD10CMInferenceJobCommand = exports.serializeAws_json1_1StartEntitiesDetectionV2JobCommand = exports.serializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = exports.serializeAws_json1_1ListRxNormInferenceJobsCommand = exports.serializeAws_json1_1ListPHIDetectionJobsCommand = exports.serializeAws_json1_1ListICD10CMInferenceJobsCommand = exports.serializeAws_json1_1ListEntitiesDetectionV2JobsCommand = exports.serializeAws_json1_1InferSNOMEDCTCommand = exports.serializeAws_json1_1InferRxNormCommand = exports.serializeAws_json1_1InferICD10CMCommand = exports.serializeAws_json1_1DetectPHICommand = exports.serializeAws_json1_1DetectEntitiesV2Command = exports.serializeAws_json1_1DetectEntitiesCommand = exports.serializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = exports.serializeAws_json1_1DescribeRxNormInferenceJobCommand = exports.serializeAws_json1_1DescribePHIDetectionJobCommand = exports.serializeAws_json1_1DescribeICD10CMInferenceJobCommand = exports.serializeAws_json1_1DescribeEntitiesDetectionV2JobCommand = void 0;
|
|
4
|
+
exports.deserializeAws_json1_1StopSNOMEDCTInferenceJobCommand = exports.deserializeAws_json1_1StopRxNormInferenceJobCommand = void 0;
|
|
4
5
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
6
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
7
|
const uuid_1 = require("uuid");
|
|
@@ -44,6 +45,16 @@ const serializeAws_json1_1DescribeRxNormInferenceJobCommand = async (input, cont
|
|
|
44
45
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
45
46
|
};
|
|
46
47
|
exports.serializeAws_json1_1DescribeRxNormInferenceJobCommand = serializeAws_json1_1DescribeRxNormInferenceJobCommand;
|
|
48
|
+
const serializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = async (input, context) => {
|
|
49
|
+
const headers = {
|
|
50
|
+
"content-type": "application/x-amz-json-1.1",
|
|
51
|
+
"x-amz-target": "ComprehendMedical_20181030.DescribeSNOMEDCTInferenceJob",
|
|
52
|
+
};
|
|
53
|
+
let body;
|
|
54
|
+
body = JSON.stringify(serializeAws_json1_1DescribeSNOMEDCTInferenceJobRequest(input, context));
|
|
55
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
56
|
+
};
|
|
57
|
+
exports.serializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = serializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand;
|
|
47
58
|
const serializeAws_json1_1DetectEntitiesCommand = async (input, context) => {
|
|
48
59
|
const headers = {
|
|
49
60
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -94,6 +105,16 @@ const serializeAws_json1_1InferRxNormCommand = async (input, context) => {
|
|
|
94
105
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
95
106
|
};
|
|
96
107
|
exports.serializeAws_json1_1InferRxNormCommand = serializeAws_json1_1InferRxNormCommand;
|
|
108
|
+
const serializeAws_json1_1InferSNOMEDCTCommand = async (input, context) => {
|
|
109
|
+
const headers = {
|
|
110
|
+
"content-type": "application/x-amz-json-1.1",
|
|
111
|
+
"x-amz-target": "ComprehendMedical_20181030.InferSNOMEDCT",
|
|
112
|
+
};
|
|
113
|
+
let body;
|
|
114
|
+
body = JSON.stringify(serializeAws_json1_1InferSNOMEDCTRequest(input, context));
|
|
115
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
116
|
+
};
|
|
117
|
+
exports.serializeAws_json1_1InferSNOMEDCTCommand = serializeAws_json1_1InferSNOMEDCTCommand;
|
|
97
118
|
const serializeAws_json1_1ListEntitiesDetectionV2JobsCommand = async (input, context) => {
|
|
98
119
|
const headers = {
|
|
99
120
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -134,6 +155,16 @@ const serializeAws_json1_1ListRxNormInferenceJobsCommand = async (input, context
|
|
|
134
155
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
135
156
|
};
|
|
136
157
|
exports.serializeAws_json1_1ListRxNormInferenceJobsCommand = serializeAws_json1_1ListRxNormInferenceJobsCommand;
|
|
158
|
+
const serializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = async (input, context) => {
|
|
159
|
+
const headers = {
|
|
160
|
+
"content-type": "application/x-amz-json-1.1",
|
|
161
|
+
"x-amz-target": "ComprehendMedical_20181030.ListSNOMEDCTInferenceJobs",
|
|
162
|
+
};
|
|
163
|
+
let body;
|
|
164
|
+
body = JSON.stringify(serializeAws_json1_1ListSNOMEDCTInferenceJobsRequest(input, context));
|
|
165
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
166
|
+
};
|
|
167
|
+
exports.serializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = serializeAws_json1_1ListSNOMEDCTInferenceJobsCommand;
|
|
137
168
|
const serializeAws_json1_1StartEntitiesDetectionV2JobCommand = async (input, context) => {
|
|
138
169
|
const headers = {
|
|
139
170
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -174,6 +205,16 @@ const serializeAws_json1_1StartRxNormInferenceJobCommand = async (input, context
|
|
|
174
205
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
175
206
|
};
|
|
176
207
|
exports.serializeAws_json1_1StartRxNormInferenceJobCommand = serializeAws_json1_1StartRxNormInferenceJobCommand;
|
|
208
|
+
const serializeAws_json1_1StartSNOMEDCTInferenceJobCommand = async (input, context) => {
|
|
209
|
+
const headers = {
|
|
210
|
+
"content-type": "application/x-amz-json-1.1",
|
|
211
|
+
"x-amz-target": "ComprehendMedical_20181030.StartSNOMEDCTInferenceJob",
|
|
212
|
+
};
|
|
213
|
+
let body;
|
|
214
|
+
body = JSON.stringify(serializeAws_json1_1StartSNOMEDCTInferenceJobRequest(input, context));
|
|
215
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
216
|
+
};
|
|
217
|
+
exports.serializeAws_json1_1StartSNOMEDCTInferenceJobCommand = serializeAws_json1_1StartSNOMEDCTInferenceJobCommand;
|
|
177
218
|
const serializeAws_json1_1StopEntitiesDetectionV2JobCommand = async (input, context) => {
|
|
178
219
|
const headers = {
|
|
179
220
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -214,6 +255,16 @@ const serializeAws_json1_1StopRxNormInferenceJobCommand = async (input, context)
|
|
|
214
255
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
215
256
|
};
|
|
216
257
|
exports.serializeAws_json1_1StopRxNormInferenceJobCommand = serializeAws_json1_1StopRxNormInferenceJobCommand;
|
|
258
|
+
const serializeAws_json1_1StopSNOMEDCTInferenceJobCommand = async (input, context) => {
|
|
259
|
+
const headers = {
|
|
260
|
+
"content-type": "application/x-amz-json-1.1",
|
|
261
|
+
"x-amz-target": "ComprehendMedical_20181030.StopSNOMEDCTInferenceJob",
|
|
262
|
+
};
|
|
263
|
+
let body;
|
|
264
|
+
body = JSON.stringify(serializeAws_json1_1StopSNOMEDCTInferenceJobRequest(input, context));
|
|
265
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
266
|
+
};
|
|
267
|
+
exports.serializeAws_json1_1StopSNOMEDCTInferenceJobCommand = serializeAws_json1_1StopSNOMEDCTInferenceJobCommand;
|
|
217
268
|
const deserializeAws_json1_1DescribeEntitiesDetectionV2JobCommand = async (output, context) => {
|
|
218
269
|
if (output.statusCode >= 300) {
|
|
219
270
|
return deserializeAws_json1_1DescribeEntitiesDetectionV2JobCommandError(output, context);
|
|
@@ -498,6 +549,77 @@ const deserializeAws_json1_1DescribeRxNormInferenceJobCommandError = async (outp
|
|
|
498
549
|
delete response.Message;
|
|
499
550
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
500
551
|
};
|
|
552
|
+
const deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = async (output, context) => {
|
|
553
|
+
if (output.statusCode >= 300) {
|
|
554
|
+
return deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommandError(output, context);
|
|
555
|
+
}
|
|
556
|
+
const data = await parseBody(output.body, context);
|
|
557
|
+
let contents = {};
|
|
558
|
+
contents = deserializeAws_json1_1DescribeSNOMEDCTInferenceJobResponse(data, context);
|
|
559
|
+
const response = {
|
|
560
|
+
$metadata: deserializeMetadata(output),
|
|
561
|
+
...contents,
|
|
562
|
+
};
|
|
563
|
+
return Promise.resolve(response);
|
|
564
|
+
};
|
|
565
|
+
exports.deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand = deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommand;
|
|
566
|
+
const deserializeAws_json1_1DescribeSNOMEDCTInferenceJobCommandError = async (output, context) => {
|
|
567
|
+
const parsedOutput = {
|
|
568
|
+
...output,
|
|
569
|
+
body: await parseBody(output.body, context),
|
|
570
|
+
};
|
|
571
|
+
let response;
|
|
572
|
+
let errorCode = "UnknownError";
|
|
573
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
574
|
+
switch (errorCode) {
|
|
575
|
+
case "InternalServerException":
|
|
576
|
+
case "com.amazonaws.comprehendmedical#InternalServerException":
|
|
577
|
+
response = {
|
|
578
|
+
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
579
|
+
name: errorCode,
|
|
580
|
+
$metadata: deserializeMetadata(output),
|
|
581
|
+
};
|
|
582
|
+
break;
|
|
583
|
+
case "InvalidRequestException":
|
|
584
|
+
case "com.amazonaws.comprehendmedical#InvalidRequestException":
|
|
585
|
+
response = {
|
|
586
|
+
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
587
|
+
name: errorCode,
|
|
588
|
+
$metadata: deserializeMetadata(output),
|
|
589
|
+
};
|
|
590
|
+
break;
|
|
591
|
+
case "ResourceNotFoundException":
|
|
592
|
+
case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
|
|
593
|
+
response = {
|
|
594
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
595
|
+
name: errorCode,
|
|
596
|
+
$metadata: deserializeMetadata(output),
|
|
597
|
+
};
|
|
598
|
+
break;
|
|
599
|
+
case "TooManyRequestsException":
|
|
600
|
+
case "com.amazonaws.comprehendmedical#TooManyRequestsException":
|
|
601
|
+
response = {
|
|
602
|
+
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
603
|
+
name: errorCode,
|
|
604
|
+
$metadata: deserializeMetadata(output),
|
|
605
|
+
};
|
|
606
|
+
break;
|
|
607
|
+
default:
|
|
608
|
+
const parsedBody = parsedOutput.body;
|
|
609
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
610
|
+
response = {
|
|
611
|
+
...parsedBody,
|
|
612
|
+
name: `${errorCode}`,
|
|
613
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
614
|
+
$fault: "client",
|
|
615
|
+
$metadata: deserializeMetadata(output),
|
|
616
|
+
};
|
|
617
|
+
}
|
|
618
|
+
const message = response.message || response.Message || errorCode;
|
|
619
|
+
response.message = message;
|
|
620
|
+
delete response.Message;
|
|
621
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
622
|
+
};
|
|
501
623
|
const deserializeAws_json1_1DetectEntitiesCommand = async (output, context) => {
|
|
502
624
|
if (output.statusCode >= 300) {
|
|
503
625
|
return deserializeAws_json1_1DetectEntitiesCommandError(output, context);
|
|
@@ -933,6 +1055,93 @@ const deserializeAws_json1_1InferRxNormCommandError = async (output, context) =>
|
|
|
933
1055
|
delete response.Message;
|
|
934
1056
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
935
1057
|
};
|
|
1058
|
+
const deserializeAws_json1_1InferSNOMEDCTCommand = async (output, context) => {
|
|
1059
|
+
if (output.statusCode >= 300) {
|
|
1060
|
+
return deserializeAws_json1_1InferSNOMEDCTCommandError(output, context);
|
|
1061
|
+
}
|
|
1062
|
+
const data = await parseBody(output.body, context);
|
|
1063
|
+
let contents = {};
|
|
1064
|
+
contents = deserializeAws_json1_1InferSNOMEDCTResponse(data, context);
|
|
1065
|
+
const response = {
|
|
1066
|
+
$metadata: deserializeMetadata(output),
|
|
1067
|
+
...contents,
|
|
1068
|
+
};
|
|
1069
|
+
return Promise.resolve(response);
|
|
1070
|
+
};
|
|
1071
|
+
exports.deserializeAws_json1_1InferSNOMEDCTCommand = deserializeAws_json1_1InferSNOMEDCTCommand;
|
|
1072
|
+
const deserializeAws_json1_1InferSNOMEDCTCommandError = async (output, context) => {
|
|
1073
|
+
const parsedOutput = {
|
|
1074
|
+
...output,
|
|
1075
|
+
body: await parseBody(output.body, context),
|
|
1076
|
+
};
|
|
1077
|
+
let response;
|
|
1078
|
+
let errorCode = "UnknownError";
|
|
1079
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1080
|
+
switch (errorCode) {
|
|
1081
|
+
case "InternalServerException":
|
|
1082
|
+
case "com.amazonaws.comprehendmedical#InternalServerException":
|
|
1083
|
+
response = {
|
|
1084
|
+
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1085
|
+
name: errorCode,
|
|
1086
|
+
$metadata: deserializeMetadata(output),
|
|
1087
|
+
};
|
|
1088
|
+
break;
|
|
1089
|
+
case "InvalidEncodingException":
|
|
1090
|
+
case "com.amazonaws.comprehendmedical#InvalidEncodingException":
|
|
1091
|
+
response = {
|
|
1092
|
+
...(await deserializeAws_json1_1InvalidEncodingExceptionResponse(parsedOutput, context)),
|
|
1093
|
+
name: errorCode,
|
|
1094
|
+
$metadata: deserializeMetadata(output),
|
|
1095
|
+
};
|
|
1096
|
+
break;
|
|
1097
|
+
case "InvalidRequestException":
|
|
1098
|
+
case "com.amazonaws.comprehendmedical#InvalidRequestException":
|
|
1099
|
+
response = {
|
|
1100
|
+
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1101
|
+
name: errorCode,
|
|
1102
|
+
$metadata: deserializeMetadata(output),
|
|
1103
|
+
};
|
|
1104
|
+
break;
|
|
1105
|
+
case "ServiceUnavailableException":
|
|
1106
|
+
case "com.amazonaws.comprehendmedical#ServiceUnavailableException":
|
|
1107
|
+
response = {
|
|
1108
|
+
...(await deserializeAws_json1_1ServiceUnavailableExceptionResponse(parsedOutput, context)),
|
|
1109
|
+
name: errorCode,
|
|
1110
|
+
$metadata: deserializeMetadata(output),
|
|
1111
|
+
};
|
|
1112
|
+
break;
|
|
1113
|
+
case "TextSizeLimitExceededException":
|
|
1114
|
+
case "com.amazonaws.comprehendmedical#TextSizeLimitExceededException":
|
|
1115
|
+
response = {
|
|
1116
|
+
...(await deserializeAws_json1_1TextSizeLimitExceededExceptionResponse(parsedOutput, context)),
|
|
1117
|
+
name: errorCode,
|
|
1118
|
+
$metadata: deserializeMetadata(output),
|
|
1119
|
+
};
|
|
1120
|
+
break;
|
|
1121
|
+
case "TooManyRequestsException":
|
|
1122
|
+
case "com.amazonaws.comprehendmedical#TooManyRequestsException":
|
|
1123
|
+
response = {
|
|
1124
|
+
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1125
|
+
name: errorCode,
|
|
1126
|
+
$metadata: deserializeMetadata(output),
|
|
1127
|
+
};
|
|
1128
|
+
break;
|
|
1129
|
+
default:
|
|
1130
|
+
const parsedBody = parsedOutput.body;
|
|
1131
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1132
|
+
response = {
|
|
1133
|
+
...parsedBody,
|
|
1134
|
+
name: `${errorCode}`,
|
|
1135
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1136
|
+
$fault: "client",
|
|
1137
|
+
$metadata: deserializeMetadata(output),
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
const message = response.message || response.Message || errorCode;
|
|
1141
|
+
response.message = message;
|
|
1142
|
+
delete response.Message;
|
|
1143
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1144
|
+
};
|
|
936
1145
|
const deserializeAws_json1_1ListEntitiesDetectionV2JobsCommand = async (output, context) => {
|
|
937
1146
|
if (output.statusCode >= 300) {
|
|
938
1147
|
return deserializeAws_json1_1ListEntitiesDetectionV2JobsCommandError(output, context);
|
|
@@ -1217,21 +1426,21 @@ const deserializeAws_json1_1ListRxNormInferenceJobsCommandError = async (output,
|
|
|
1217
1426
|
delete response.Message;
|
|
1218
1427
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1219
1428
|
};
|
|
1220
|
-
const
|
|
1429
|
+
const deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = async (output, context) => {
|
|
1221
1430
|
if (output.statusCode >= 300) {
|
|
1222
|
-
return
|
|
1431
|
+
return deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommandError(output, context);
|
|
1223
1432
|
}
|
|
1224
1433
|
const data = await parseBody(output.body, context);
|
|
1225
1434
|
let contents = {};
|
|
1226
|
-
contents =
|
|
1435
|
+
contents = deserializeAws_json1_1ListSNOMEDCTInferenceJobsResponse(data, context);
|
|
1227
1436
|
const response = {
|
|
1228
1437
|
$metadata: deserializeMetadata(output),
|
|
1229
1438
|
...contents,
|
|
1230
1439
|
};
|
|
1231
1440
|
return Promise.resolve(response);
|
|
1232
1441
|
};
|
|
1233
|
-
exports.
|
|
1234
|
-
const
|
|
1442
|
+
exports.deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommand = deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommand;
|
|
1443
|
+
const deserializeAws_json1_1ListSNOMEDCTInferenceJobsCommandError = async (output, context) => {
|
|
1235
1444
|
const parsedOutput = {
|
|
1236
1445
|
...output,
|
|
1237
1446
|
body: await parseBody(output.body, context),
|
|
@@ -1256,18 +1465,18 @@ const deserializeAws_json1_1StartEntitiesDetectionV2JobCommandError = async (out
|
|
|
1256
1465
|
$metadata: deserializeMetadata(output),
|
|
1257
1466
|
};
|
|
1258
1467
|
break;
|
|
1259
|
-
case "
|
|
1260
|
-
case "com.amazonaws.comprehendmedical#
|
|
1468
|
+
case "TooManyRequestsException":
|
|
1469
|
+
case "com.amazonaws.comprehendmedical#TooManyRequestsException":
|
|
1261
1470
|
response = {
|
|
1262
|
-
...(await
|
|
1471
|
+
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1263
1472
|
name: errorCode,
|
|
1264
1473
|
$metadata: deserializeMetadata(output),
|
|
1265
1474
|
};
|
|
1266
1475
|
break;
|
|
1267
|
-
case "
|
|
1268
|
-
case "com.amazonaws.comprehendmedical#
|
|
1476
|
+
case "ValidationException":
|
|
1477
|
+
case "com.amazonaws.comprehendmedical#ValidationException":
|
|
1269
1478
|
response = {
|
|
1270
|
-
...(await
|
|
1479
|
+
...(await deserializeAws_json1_1ValidationExceptionResponse(parsedOutput, context)),
|
|
1271
1480
|
name: errorCode,
|
|
1272
1481
|
$metadata: deserializeMetadata(output),
|
|
1273
1482
|
};
|
|
@@ -1288,21 +1497,21 @@ const deserializeAws_json1_1StartEntitiesDetectionV2JobCommandError = async (out
|
|
|
1288
1497
|
delete response.Message;
|
|
1289
1498
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1290
1499
|
};
|
|
1291
|
-
const
|
|
1500
|
+
const deserializeAws_json1_1StartEntitiesDetectionV2JobCommand = async (output, context) => {
|
|
1292
1501
|
if (output.statusCode >= 300) {
|
|
1293
|
-
return
|
|
1502
|
+
return deserializeAws_json1_1StartEntitiesDetectionV2JobCommandError(output, context);
|
|
1294
1503
|
}
|
|
1295
1504
|
const data = await parseBody(output.body, context);
|
|
1296
1505
|
let contents = {};
|
|
1297
|
-
contents =
|
|
1506
|
+
contents = deserializeAws_json1_1StartEntitiesDetectionV2JobResponse(data, context);
|
|
1298
1507
|
const response = {
|
|
1299
1508
|
$metadata: deserializeMetadata(output),
|
|
1300
1509
|
...contents,
|
|
1301
1510
|
};
|
|
1302
1511
|
return Promise.resolve(response);
|
|
1303
1512
|
};
|
|
1304
|
-
exports.
|
|
1305
|
-
const
|
|
1513
|
+
exports.deserializeAws_json1_1StartEntitiesDetectionV2JobCommand = deserializeAws_json1_1StartEntitiesDetectionV2JobCommand;
|
|
1514
|
+
const deserializeAws_json1_1StartEntitiesDetectionV2JobCommandError = async (output, context) => {
|
|
1306
1515
|
const parsedOutput = {
|
|
1307
1516
|
...output,
|
|
1308
1517
|
body: await parseBody(output.body, context),
|
|
@@ -1359,21 +1568,21 @@ const deserializeAws_json1_1StartICD10CMInferenceJobCommandError = async (output
|
|
|
1359
1568
|
delete response.Message;
|
|
1360
1569
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1361
1570
|
};
|
|
1362
|
-
const
|
|
1571
|
+
const deserializeAws_json1_1StartICD10CMInferenceJobCommand = async (output, context) => {
|
|
1363
1572
|
if (output.statusCode >= 300) {
|
|
1364
|
-
return
|
|
1573
|
+
return deserializeAws_json1_1StartICD10CMInferenceJobCommandError(output, context);
|
|
1365
1574
|
}
|
|
1366
1575
|
const data = await parseBody(output.body, context);
|
|
1367
1576
|
let contents = {};
|
|
1368
|
-
contents =
|
|
1577
|
+
contents = deserializeAws_json1_1StartICD10CMInferenceJobResponse(data, context);
|
|
1369
1578
|
const response = {
|
|
1370
1579
|
$metadata: deserializeMetadata(output),
|
|
1371
1580
|
...contents,
|
|
1372
1581
|
};
|
|
1373
1582
|
return Promise.resolve(response);
|
|
1374
1583
|
};
|
|
1375
|
-
exports.
|
|
1376
|
-
const
|
|
1584
|
+
exports.deserializeAws_json1_1StartICD10CMInferenceJobCommand = deserializeAws_json1_1StartICD10CMInferenceJobCommand;
|
|
1585
|
+
const deserializeAws_json1_1StartICD10CMInferenceJobCommandError = async (output, context) => {
|
|
1377
1586
|
const parsedOutput = {
|
|
1378
1587
|
...output,
|
|
1379
1588
|
body: await parseBody(output.body, context),
|
|
@@ -1430,21 +1639,21 @@ const deserializeAws_json1_1StartPHIDetectionJobCommandError = async (output, co
|
|
|
1430
1639
|
delete response.Message;
|
|
1431
1640
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1432
1641
|
};
|
|
1433
|
-
const
|
|
1642
|
+
const deserializeAws_json1_1StartPHIDetectionJobCommand = async (output, context) => {
|
|
1434
1643
|
if (output.statusCode >= 300) {
|
|
1435
|
-
return
|
|
1644
|
+
return deserializeAws_json1_1StartPHIDetectionJobCommandError(output, context);
|
|
1436
1645
|
}
|
|
1437
1646
|
const data = await parseBody(output.body, context);
|
|
1438
1647
|
let contents = {};
|
|
1439
|
-
contents =
|
|
1648
|
+
contents = deserializeAws_json1_1StartPHIDetectionJobResponse(data, context);
|
|
1440
1649
|
const response = {
|
|
1441
1650
|
$metadata: deserializeMetadata(output),
|
|
1442
1651
|
...contents,
|
|
1443
1652
|
};
|
|
1444
1653
|
return Promise.resolve(response);
|
|
1445
1654
|
};
|
|
1446
|
-
exports.
|
|
1447
|
-
const
|
|
1655
|
+
exports.deserializeAws_json1_1StartPHIDetectionJobCommand = deserializeAws_json1_1StartPHIDetectionJobCommand;
|
|
1656
|
+
const deserializeAws_json1_1StartPHIDetectionJobCommandError = async (output, context) => {
|
|
1448
1657
|
const parsedOutput = {
|
|
1449
1658
|
...output,
|
|
1450
1659
|
body: await parseBody(output.body, context),
|
|
@@ -1501,21 +1710,21 @@ const deserializeAws_json1_1StartRxNormInferenceJobCommandError = async (output,
|
|
|
1501
1710
|
delete response.Message;
|
|
1502
1711
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1503
1712
|
};
|
|
1504
|
-
const
|
|
1713
|
+
const deserializeAws_json1_1StartRxNormInferenceJobCommand = async (output, context) => {
|
|
1505
1714
|
if (output.statusCode >= 300) {
|
|
1506
|
-
return
|
|
1715
|
+
return deserializeAws_json1_1StartRxNormInferenceJobCommandError(output, context);
|
|
1507
1716
|
}
|
|
1508
1717
|
const data = await parseBody(output.body, context);
|
|
1509
1718
|
let contents = {};
|
|
1510
|
-
contents =
|
|
1719
|
+
contents = deserializeAws_json1_1StartRxNormInferenceJobResponse(data, context);
|
|
1511
1720
|
const response = {
|
|
1512
1721
|
$metadata: deserializeMetadata(output),
|
|
1513
1722
|
...contents,
|
|
1514
1723
|
};
|
|
1515
1724
|
return Promise.resolve(response);
|
|
1516
1725
|
};
|
|
1517
|
-
exports.
|
|
1518
|
-
const
|
|
1726
|
+
exports.deserializeAws_json1_1StartRxNormInferenceJobCommand = deserializeAws_json1_1StartRxNormInferenceJobCommand;
|
|
1727
|
+
const deserializeAws_json1_1StartRxNormInferenceJobCommandError = async (output, context) => {
|
|
1519
1728
|
const parsedOutput = {
|
|
1520
1729
|
...output,
|
|
1521
1730
|
body: await parseBody(output.body, context),
|
|
@@ -1548,6 +1757,14 @@ const deserializeAws_json1_1StopEntitiesDetectionV2JobCommandError = async (outp
|
|
|
1548
1757
|
$metadata: deserializeMetadata(output),
|
|
1549
1758
|
};
|
|
1550
1759
|
break;
|
|
1760
|
+
case "TooManyRequestsException":
|
|
1761
|
+
case "com.amazonaws.comprehendmedical#TooManyRequestsException":
|
|
1762
|
+
response = {
|
|
1763
|
+
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1764
|
+
name: errorCode,
|
|
1765
|
+
$metadata: deserializeMetadata(output),
|
|
1766
|
+
};
|
|
1767
|
+
break;
|
|
1551
1768
|
default:
|
|
1552
1769
|
const parsedBody = parsedOutput.body;
|
|
1553
1770
|
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
@@ -1564,21 +1781,155 @@ const deserializeAws_json1_1StopEntitiesDetectionV2JobCommandError = async (outp
|
|
|
1564
1781
|
delete response.Message;
|
|
1565
1782
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1566
1783
|
};
|
|
1567
|
-
const
|
|
1784
|
+
const deserializeAws_json1_1StartSNOMEDCTInferenceJobCommand = async (output, context) => {
|
|
1568
1785
|
if (output.statusCode >= 300) {
|
|
1569
|
-
return
|
|
1786
|
+
return deserializeAws_json1_1StartSNOMEDCTInferenceJobCommandError(output, context);
|
|
1570
1787
|
}
|
|
1571
1788
|
const data = await parseBody(output.body, context);
|
|
1572
1789
|
let contents = {};
|
|
1573
|
-
contents =
|
|
1790
|
+
contents = deserializeAws_json1_1StartSNOMEDCTInferenceJobResponse(data, context);
|
|
1574
1791
|
const response = {
|
|
1575
1792
|
$metadata: deserializeMetadata(output),
|
|
1576
1793
|
...contents,
|
|
1577
1794
|
};
|
|
1578
1795
|
return Promise.resolve(response);
|
|
1579
1796
|
};
|
|
1580
|
-
exports.
|
|
1581
|
-
const
|
|
1797
|
+
exports.deserializeAws_json1_1StartSNOMEDCTInferenceJobCommand = deserializeAws_json1_1StartSNOMEDCTInferenceJobCommand;
|
|
1798
|
+
const deserializeAws_json1_1StartSNOMEDCTInferenceJobCommandError = async (output, context) => {
|
|
1799
|
+
const parsedOutput = {
|
|
1800
|
+
...output,
|
|
1801
|
+
body: await parseBody(output.body, context),
|
|
1802
|
+
};
|
|
1803
|
+
let response;
|
|
1804
|
+
let errorCode = "UnknownError";
|
|
1805
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1806
|
+
switch (errorCode) {
|
|
1807
|
+
case "InternalServerException":
|
|
1808
|
+
case "com.amazonaws.comprehendmedical#InternalServerException":
|
|
1809
|
+
response = {
|
|
1810
|
+
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1811
|
+
name: errorCode,
|
|
1812
|
+
$metadata: deserializeMetadata(output),
|
|
1813
|
+
};
|
|
1814
|
+
break;
|
|
1815
|
+
case "InvalidRequestException":
|
|
1816
|
+
case "com.amazonaws.comprehendmedical#InvalidRequestException":
|
|
1817
|
+
response = {
|
|
1818
|
+
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1819
|
+
name: errorCode,
|
|
1820
|
+
$metadata: deserializeMetadata(output),
|
|
1821
|
+
};
|
|
1822
|
+
break;
|
|
1823
|
+
case "ResourceNotFoundException":
|
|
1824
|
+
case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
|
|
1825
|
+
response = {
|
|
1826
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1827
|
+
name: errorCode,
|
|
1828
|
+
$metadata: deserializeMetadata(output),
|
|
1829
|
+
};
|
|
1830
|
+
break;
|
|
1831
|
+
case "TooManyRequestsException":
|
|
1832
|
+
case "com.amazonaws.comprehendmedical#TooManyRequestsException":
|
|
1833
|
+
response = {
|
|
1834
|
+
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
1835
|
+
name: errorCode,
|
|
1836
|
+
$metadata: deserializeMetadata(output),
|
|
1837
|
+
};
|
|
1838
|
+
break;
|
|
1839
|
+
default:
|
|
1840
|
+
const parsedBody = parsedOutput.body;
|
|
1841
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1842
|
+
response = {
|
|
1843
|
+
...parsedBody,
|
|
1844
|
+
name: `${errorCode}`,
|
|
1845
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1846
|
+
$fault: "client",
|
|
1847
|
+
$metadata: deserializeMetadata(output),
|
|
1848
|
+
};
|
|
1849
|
+
}
|
|
1850
|
+
const message = response.message || response.Message || errorCode;
|
|
1851
|
+
response.message = message;
|
|
1852
|
+
delete response.Message;
|
|
1853
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1854
|
+
};
|
|
1855
|
+
const deserializeAws_json1_1StopEntitiesDetectionV2JobCommand = async (output, context) => {
|
|
1856
|
+
if (output.statusCode >= 300) {
|
|
1857
|
+
return deserializeAws_json1_1StopEntitiesDetectionV2JobCommandError(output, context);
|
|
1858
|
+
}
|
|
1859
|
+
const data = await parseBody(output.body, context);
|
|
1860
|
+
let contents = {};
|
|
1861
|
+
contents = deserializeAws_json1_1StopEntitiesDetectionV2JobResponse(data, context);
|
|
1862
|
+
const response = {
|
|
1863
|
+
$metadata: deserializeMetadata(output),
|
|
1864
|
+
...contents,
|
|
1865
|
+
};
|
|
1866
|
+
return Promise.resolve(response);
|
|
1867
|
+
};
|
|
1868
|
+
exports.deserializeAws_json1_1StopEntitiesDetectionV2JobCommand = deserializeAws_json1_1StopEntitiesDetectionV2JobCommand;
|
|
1869
|
+
const deserializeAws_json1_1StopEntitiesDetectionV2JobCommandError = async (output, context) => {
|
|
1870
|
+
const parsedOutput = {
|
|
1871
|
+
...output,
|
|
1872
|
+
body: await parseBody(output.body, context),
|
|
1873
|
+
};
|
|
1874
|
+
let response;
|
|
1875
|
+
let errorCode = "UnknownError";
|
|
1876
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1877
|
+
switch (errorCode) {
|
|
1878
|
+
case "InternalServerException":
|
|
1879
|
+
case "com.amazonaws.comprehendmedical#InternalServerException":
|
|
1880
|
+
response = {
|
|
1881
|
+
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
1882
|
+
name: errorCode,
|
|
1883
|
+
$metadata: deserializeMetadata(output),
|
|
1884
|
+
};
|
|
1885
|
+
break;
|
|
1886
|
+
case "InvalidRequestException":
|
|
1887
|
+
case "com.amazonaws.comprehendmedical#InvalidRequestException":
|
|
1888
|
+
response = {
|
|
1889
|
+
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
1890
|
+
name: errorCode,
|
|
1891
|
+
$metadata: deserializeMetadata(output),
|
|
1892
|
+
};
|
|
1893
|
+
break;
|
|
1894
|
+
case "ResourceNotFoundException":
|
|
1895
|
+
case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
|
|
1896
|
+
response = {
|
|
1897
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1898
|
+
name: errorCode,
|
|
1899
|
+
$metadata: deserializeMetadata(output),
|
|
1900
|
+
};
|
|
1901
|
+
break;
|
|
1902
|
+
default:
|
|
1903
|
+
const parsedBody = parsedOutput.body;
|
|
1904
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1905
|
+
response = {
|
|
1906
|
+
...parsedBody,
|
|
1907
|
+
name: `${errorCode}`,
|
|
1908
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1909
|
+
$fault: "client",
|
|
1910
|
+
$metadata: deserializeMetadata(output),
|
|
1911
|
+
};
|
|
1912
|
+
}
|
|
1913
|
+
const message = response.message || response.Message || errorCode;
|
|
1914
|
+
response.message = message;
|
|
1915
|
+
delete response.Message;
|
|
1916
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1917
|
+
};
|
|
1918
|
+
const deserializeAws_json1_1StopICD10CMInferenceJobCommand = async (output, context) => {
|
|
1919
|
+
if (output.statusCode >= 300) {
|
|
1920
|
+
return deserializeAws_json1_1StopICD10CMInferenceJobCommandError(output, context);
|
|
1921
|
+
}
|
|
1922
|
+
const data = await parseBody(output.body, context);
|
|
1923
|
+
let contents = {};
|
|
1924
|
+
contents = deserializeAws_json1_1StopICD10CMInferenceJobResponse(data, context);
|
|
1925
|
+
const response = {
|
|
1926
|
+
$metadata: deserializeMetadata(output),
|
|
1927
|
+
...contents,
|
|
1928
|
+
};
|
|
1929
|
+
return Promise.resolve(response);
|
|
1930
|
+
};
|
|
1931
|
+
exports.deserializeAws_json1_1StopICD10CMInferenceJobCommand = deserializeAws_json1_1StopICD10CMInferenceJobCommand;
|
|
1932
|
+
const deserializeAws_json1_1StopICD10CMInferenceJobCommandError = async (output, context) => {
|
|
1582
1933
|
const parsedOutput = {
|
|
1583
1934
|
...output,
|
|
1584
1935
|
body: await parseBody(output.body, context),
|
|
@@ -1753,6 +2104,77 @@ const deserializeAws_json1_1StopRxNormInferenceJobCommandError = async (output,
|
|
|
1753
2104
|
delete response.Message;
|
|
1754
2105
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1755
2106
|
};
|
|
2107
|
+
const deserializeAws_json1_1StopSNOMEDCTInferenceJobCommand = async (output, context) => {
|
|
2108
|
+
if (output.statusCode >= 300) {
|
|
2109
|
+
return deserializeAws_json1_1StopSNOMEDCTInferenceJobCommandError(output, context);
|
|
2110
|
+
}
|
|
2111
|
+
const data = await parseBody(output.body, context);
|
|
2112
|
+
let contents = {};
|
|
2113
|
+
contents = deserializeAws_json1_1StopSNOMEDCTInferenceJobResponse(data, context);
|
|
2114
|
+
const response = {
|
|
2115
|
+
$metadata: deserializeMetadata(output),
|
|
2116
|
+
...contents,
|
|
2117
|
+
};
|
|
2118
|
+
return Promise.resolve(response);
|
|
2119
|
+
};
|
|
2120
|
+
exports.deserializeAws_json1_1StopSNOMEDCTInferenceJobCommand = deserializeAws_json1_1StopSNOMEDCTInferenceJobCommand;
|
|
2121
|
+
const deserializeAws_json1_1StopSNOMEDCTInferenceJobCommandError = async (output, context) => {
|
|
2122
|
+
const parsedOutput = {
|
|
2123
|
+
...output,
|
|
2124
|
+
body: await parseBody(output.body, context),
|
|
2125
|
+
};
|
|
2126
|
+
let response;
|
|
2127
|
+
let errorCode = "UnknownError";
|
|
2128
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2129
|
+
switch (errorCode) {
|
|
2130
|
+
case "InternalServerException":
|
|
2131
|
+
case "com.amazonaws.comprehendmedical#InternalServerException":
|
|
2132
|
+
response = {
|
|
2133
|
+
...(await deserializeAws_json1_1InternalServerExceptionResponse(parsedOutput, context)),
|
|
2134
|
+
name: errorCode,
|
|
2135
|
+
$metadata: deserializeMetadata(output),
|
|
2136
|
+
};
|
|
2137
|
+
break;
|
|
2138
|
+
case "InvalidRequestException":
|
|
2139
|
+
case "com.amazonaws.comprehendmedical#InvalidRequestException":
|
|
2140
|
+
response = {
|
|
2141
|
+
...(await deserializeAws_json1_1InvalidRequestExceptionResponse(parsedOutput, context)),
|
|
2142
|
+
name: errorCode,
|
|
2143
|
+
$metadata: deserializeMetadata(output),
|
|
2144
|
+
};
|
|
2145
|
+
break;
|
|
2146
|
+
case "ResourceNotFoundException":
|
|
2147
|
+
case "com.amazonaws.comprehendmedical#ResourceNotFoundException":
|
|
2148
|
+
response = {
|
|
2149
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2150
|
+
name: errorCode,
|
|
2151
|
+
$metadata: deserializeMetadata(output),
|
|
2152
|
+
};
|
|
2153
|
+
break;
|
|
2154
|
+
case "TooManyRequestsException":
|
|
2155
|
+
case "com.amazonaws.comprehendmedical#TooManyRequestsException":
|
|
2156
|
+
response = {
|
|
2157
|
+
...(await deserializeAws_json1_1TooManyRequestsExceptionResponse(parsedOutput, context)),
|
|
2158
|
+
name: errorCode,
|
|
2159
|
+
$metadata: deserializeMetadata(output),
|
|
2160
|
+
};
|
|
2161
|
+
break;
|
|
2162
|
+
default:
|
|
2163
|
+
const parsedBody = parsedOutput.body;
|
|
2164
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2165
|
+
response = {
|
|
2166
|
+
...parsedBody,
|
|
2167
|
+
name: `${errorCode}`,
|
|
2168
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2169
|
+
$fault: "client",
|
|
2170
|
+
$metadata: deserializeMetadata(output),
|
|
2171
|
+
};
|
|
2172
|
+
}
|
|
2173
|
+
const message = response.message || response.Message || errorCode;
|
|
2174
|
+
response.message = message;
|
|
2175
|
+
delete response.Message;
|
|
2176
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2177
|
+
};
|
|
1756
2178
|
const deserializeAws_json1_1InternalServerExceptionResponse = async (parsedOutput, context) => {
|
|
1757
2179
|
const body = parsedOutput.body;
|
|
1758
2180
|
const deserialized = deserializeAws_json1_1InternalServerException(body, context);
|
|
@@ -1871,6 +2293,11 @@ const serializeAws_json1_1DescribeRxNormInferenceJobRequest = (input, context) =
|
|
|
1871
2293
|
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
1872
2294
|
};
|
|
1873
2295
|
};
|
|
2296
|
+
const serializeAws_json1_1DescribeSNOMEDCTInferenceJobRequest = (input, context) => {
|
|
2297
|
+
return {
|
|
2298
|
+
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
2299
|
+
};
|
|
2300
|
+
};
|
|
1874
2301
|
const serializeAws_json1_1DetectEntitiesRequest = (input, context) => {
|
|
1875
2302
|
return {
|
|
1876
2303
|
...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
|
|
@@ -1896,6 +2323,11 @@ const serializeAws_json1_1InferRxNormRequest = (input, context) => {
|
|
|
1896
2323
|
...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
|
|
1897
2324
|
};
|
|
1898
2325
|
};
|
|
2326
|
+
const serializeAws_json1_1InferSNOMEDCTRequest = (input, context) => {
|
|
2327
|
+
return {
|
|
2328
|
+
...(input.Text !== undefined && input.Text !== null && { Text: input.Text }),
|
|
2329
|
+
};
|
|
2330
|
+
};
|
|
1899
2331
|
const serializeAws_json1_1InputDataConfig = (input, context) => {
|
|
1900
2332
|
return {
|
|
1901
2333
|
...(input.S3Bucket !== undefined && input.S3Bucket !== null && { S3Bucket: input.S3Bucket }),
|
|
@@ -1934,6 +2366,14 @@ const serializeAws_json1_1ListRxNormInferenceJobsRequest = (input, context) => {
|
|
|
1934
2366
|
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
1935
2367
|
};
|
|
1936
2368
|
};
|
|
2369
|
+
const serializeAws_json1_1ListSNOMEDCTInferenceJobsRequest = (input, context) => {
|
|
2370
|
+
return {
|
|
2371
|
+
...(input.Filter !== undefined &&
|
|
2372
|
+
input.Filter !== null && { Filter: serializeAws_json1_1ComprehendMedicalAsyncJobFilter(input.Filter, context) }),
|
|
2373
|
+
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
2374
|
+
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
2375
|
+
};
|
|
2376
|
+
};
|
|
1937
2377
|
const serializeAws_json1_1OutputDataConfig = (input, context) => {
|
|
1938
2378
|
return {
|
|
1939
2379
|
...(input.S3Bucket !== undefined && input.S3Bucket !== null && { S3Bucket: input.S3Bucket }),
|
|
@@ -2016,6 +2456,25 @@ const serializeAws_json1_1StartRxNormInferenceJobRequest = (input, context) => {
|
|
|
2016
2456
|
}),
|
|
2017
2457
|
};
|
|
2018
2458
|
};
|
|
2459
|
+
const serializeAws_json1_1StartSNOMEDCTInferenceJobRequest = (input, context) => {
|
|
2460
|
+
var _a;
|
|
2461
|
+
return {
|
|
2462
|
+
ClientRequestToken: (_a = input.ClientRequestToken) !== null && _a !== void 0 ? _a : uuid_1.v4(),
|
|
2463
|
+
...(input.DataAccessRoleArn !== undefined &&
|
|
2464
|
+
input.DataAccessRoleArn !== null && { DataAccessRoleArn: input.DataAccessRoleArn }),
|
|
2465
|
+
...(input.InputDataConfig !== undefined &&
|
|
2466
|
+
input.InputDataConfig !== null && {
|
|
2467
|
+
InputDataConfig: serializeAws_json1_1InputDataConfig(input.InputDataConfig, context),
|
|
2468
|
+
}),
|
|
2469
|
+
...(input.JobName !== undefined && input.JobName !== null && { JobName: input.JobName }),
|
|
2470
|
+
...(input.KMSKey !== undefined && input.KMSKey !== null && { KMSKey: input.KMSKey }),
|
|
2471
|
+
...(input.LanguageCode !== undefined && input.LanguageCode !== null && { LanguageCode: input.LanguageCode }),
|
|
2472
|
+
...(input.OutputDataConfig !== undefined &&
|
|
2473
|
+
input.OutputDataConfig !== null && {
|
|
2474
|
+
OutputDataConfig: serializeAws_json1_1OutputDataConfig(input.OutputDataConfig, context),
|
|
2475
|
+
}),
|
|
2476
|
+
};
|
|
2477
|
+
};
|
|
2019
2478
|
const serializeAws_json1_1StopEntitiesDetectionV2JobRequest = (input, context) => {
|
|
2020
2479
|
return {
|
|
2021
2480
|
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
@@ -2036,6 +2495,11 @@ const serializeAws_json1_1StopRxNormInferenceJobRequest = (input, context) => {
|
|
|
2036
2495
|
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
2037
2496
|
};
|
|
2038
2497
|
};
|
|
2498
|
+
const serializeAws_json1_1StopSNOMEDCTInferenceJobRequest = (input, context) => {
|
|
2499
|
+
return {
|
|
2500
|
+
...(input.JobId !== undefined && input.JobId !== null && { JobId: input.JobId }),
|
|
2501
|
+
};
|
|
2502
|
+
};
|
|
2039
2503
|
const deserializeAws_json1_1Attribute = (output, context) => {
|
|
2040
2504
|
return {
|
|
2041
2505
|
BeginOffset: smithy_client_1.expectInt32(output.BeginOffset),
|
|
@@ -2062,6 +2526,11 @@ const deserializeAws_json1_1AttributeList = (output, context) => {
|
|
|
2062
2526
|
return deserializeAws_json1_1Attribute(entry, context);
|
|
2063
2527
|
});
|
|
2064
2528
|
};
|
|
2529
|
+
const deserializeAws_json1_1Characters = (output, context) => {
|
|
2530
|
+
return {
|
|
2531
|
+
OriginalTextCharacters: smithy_client_1.expectInt32(output.OriginalTextCharacters),
|
|
2532
|
+
};
|
|
2533
|
+
};
|
|
2065
2534
|
const deserializeAws_json1_1ComprehendMedicalAsyncJobProperties = (output, context) => {
|
|
2066
2535
|
return {
|
|
2067
2536
|
DataAccessRoleArn: smithy_client_1.expectString(output.DataAccessRoleArn),
|
|
@@ -2128,6 +2597,13 @@ const deserializeAws_json1_1DescribeRxNormInferenceJobResponse = (output, contex
|
|
|
2128
2597
|
: undefined,
|
|
2129
2598
|
};
|
|
2130
2599
|
};
|
|
2600
|
+
const deserializeAws_json1_1DescribeSNOMEDCTInferenceJobResponse = (output, context) => {
|
|
2601
|
+
return {
|
|
2602
|
+
ComprehendMedicalAsyncJobProperties: output.ComprehendMedicalAsyncJobProperties !== undefined && output.ComprehendMedicalAsyncJobProperties !== null
|
|
2603
|
+
? deserializeAws_json1_1ComprehendMedicalAsyncJobProperties(output.ComprehendMedicalAsyncJobProperties, context)
|
|
2604
|
+
: undefined,
|
|
2605
|
+
};
|
|
2606
|
+
};
|
|
2131
2607
|
const deserializeAws_json1_1DetectEntitiesResponse = (output, context) => {
|
|
2132
2608
|
return {
|
|
2133
2609
|
Entities: output.Entities !== undefined && output.Entities !== null
|
|
@@ -2295,6 +2771,21 @@ const deserializeAws_json1_1InferRxNormResponse = (output, context) => {
|
|
|
2295
2771
|
PaginationToken: smithy_client_1.expectString(output.PaginationToken),
|
|
2296
2772
|
};
|
|
2297
2773
|
};
|
|
2774
|
+
const deserializeAws_json1_1InferSNOMEDCTResponse = (output, context) => {
|
|
2775
|
+
return {
|
|
2776
|
+
Characters: output.Characters !== undefined && output.Characters !== null
|
|
2777
|
+
? deserializeAws_json1_1Characters(output.Characters, context)
|
|
2778
|
+
: undefined,
|
|
2779
|
+
Entities: output.Entities !== undefined && output.Entities !== null
|
|
2780
|
+
? deserializeAws_json1_1SNOMEDCTEntityList(output.Entities, context)
|
|
2781
|
+
: undefined,
|
|
2782
|
+
ModelVersion: smithy_client_1.expectString(output.ModelVersion),
|
|
2783
|
+
PaginationToken: smithy_client_1.expectString(output.PaginationToken),
|
|
2784
|
+
SNOMEDCTDetails: output.SNOMEDCTDetails !== undefined && output.SNOMEDCTDetails !== null
|
|
2785
|
+
? deserializeAws_json1_1SNOMEDCTDetails(output.SNOMEDCTDetails, context)
|
|
2786
|
+
: undefined,
|
|
2787
|
+
};
|
|
2788
|
+
};
|
|
2298
2789
|
const deserializeAws_json1_1InputDataConfig = (output, context) => {
|
|
2299
2790
|
return {
|
|
2300
2791
|
S3Bucket: smithy_client_1.expectString(output.S3Bucket),
|
|
@@ -2352,6 +2843,15 @@ const deserializeAws_json1_1ListRxNormInferenceJobsResponse = (output, context)
|
|
|
2352
2843
|
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
2353
2844
|
};
|
|
2354
2845
|
};
|
|
2846
|
+
const deserializeAws_json1_1ListSNOMEDCTInferenceJobsResponse = (output, context) => {
|
|
2847
|
+
return {
|
|
2848
|
+
ComprehendMedicalAsyncJobPropertiesList: output.ComprehendMedicalAsyncJobPropertiesList !== undefined &&
|
|
2849
|
+
output.ComprehendMedicalAsyncJobPropertiesList !== null
|
|
2850
|
+
? deserializeAws_json1_1ComprehendMedicalAsyncJobPropertiesList(output.ComprehendMedicalAsyncJobPropertiesList, context)
|
|
2851
|
+
: undefined,
|
|
2852
|
+
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
2853
|
+
};
|
|
2854
|
+
};
|
|
2355
2855
|
const deserializeAws_json1_1OutputDataConfig = (output, context) => {
|
|
2356
2856
|
return {
|
|
2357
2857
|
S3Bucket: smithy_client_1.expectString(output.S3Bucket),
|
|
@@ -2455,6 +2955,105 @@ const deserializeAws_json1_1ServiceUnavailableException = (output, context) => {
|
|
|
2455
2955
|
Message: smithy_client_1.expectString(output.Message),
|
|
2456
2956
|
};
|
|
2457
2957
|
};
|
|
2958
|
+
const deserializeAws_json1_1SNOMEDCTAttribute = (output, context) => {
|
|
2959
|
+
return {
|
|
2960
|
+
BeginOffset: smithy_client_1.expectInt32(output.BeginOffset),
|
|
2961
|
+
Category: smithy_client_1.expectString(output.Category),
|
|
2962
|
+
EndOffset: smithy_client_1.expectInt32(output.EndOffset),
|
|
2963
|
+
Id: smithy_client_1.expectInt32(output.Id),
|
|
2964
|
+
RelationshipScore: smithy_client_1.limitedParseFloat32(output.RelationshipScore),
|
|
2965
|
+
RelationshipType: smithy_client_1.expectString(output.RelationshipType),
|
|
2966
|
+
SNOMEDCTConcepts: output.SNOMEDCTConcepts !== undefined && output.SNOMEDCTConcepts !== null
|
|
2967
|
+
? deserializeAws_json1_1SNOMEDCTConceptList(output.SNOMEDCTConcepts, context)
|
|
2968
|
+
: undefined,
|
|
2969
|
+
Score: smithy_client_1.limitedParseFloat32(output.Score),
|
|
2970
|
+
Text: smithy_client_1.expectString(output.Text),
|
|
2971
|
+
Traits: output.Traits !== undefined && output.Traits !== null
|
|
2972
|
+
? deserializeAws_json1_1SNOMEDCTTraitList(output.Traits, context)
|
|
2973
|
+
: undefined,
|
|
2974
|
+
Type: smithy_client_1.expectString(output.Type),
|
|
2975
|
+
};
|
|
2976
|
+
};
|
|
2977
|
+
const deserializeAws_json1_1SNOMEDCTAttributeList = (output, context) => {
|
|
2978
|
+
return (output || [])
|
|
2979
|
+
.filter((e) => e != null)
|
|
2980
|
+
.map((entry) => {
|
|
2981
|
+
if (entry === null) {
|
|
2982
|
+
return null;
|
|
2983
|
+
}
|
|
2984
|
+
return deserializeAws_json1_1SNOMEDCTAttribute(entry, context);
|
|
2985
|
+
});
|
|
2986
|
+
};
|
|
2987
|
+
const deserializeAws_json1_1SNOMEDCTConcept = (output, context) => {
|
|
2988
|
+
return {
|
|
2989
|
+
Code: smithy_client_1.expectString(output.Code),
|
|
2990
|
+
Description: smithy_client_1.expectString(output.Description),
|
|
2991
|
+
Score: smithy_client_1.limitedParseFloat32(output.Score),
|
|
2992
|
+
};
|
|
2993
|
+
};
|
|
2994
|
+
const deserializeAws_json1_1SNOMEDCTConceptList = (output, context) => {
|
|
2995
|
+
return (output || [])
|
|
2996
|
+
.filter((e) => e != null)
|
|
2997
|
+
.map((entry) => {
|
|
2998
|
+
if (entry === null) {
|
|
2999
|
+
return null;
|
|
3000
|
+
}
|
|
3001
|
+
return deserializeAws_json1_1SNOMEDCTConcept(entry, context);
|
|
3002
|
+
});
|
|
3003
|
+
};
|
|
3004
|
+
const deserializeAws_json1_1SNOMEDCTDetails = (output, context) => {
|
|
3005
|
+
return {
|
|
3006
|
+
Edition: smithy_client_1.expectString(output.Edition),
|
|
3007
|
+
Language: smithy_client_1.expectString(output.Language),
|
|
3008
|
+
VersionDate: smithy_client_1.expectString(output.VersionDate),
|
|
3009
|
+
};
|
|
3010
|
+
};
|
|
3011
|
+
const deserializeAws_json1_1SNOMEDCTEntity = (output, context) => {
|
|
3012
|
+
return {
|
|
3013
|
+
Attributes: output.Attributes !== undefined && output.Attributes !== null
|
|
3014
|
+
? deserializeAws_json1_1SNOMEDCTAttributeList(output.Attributes, context)
|
|
3015
|
+
: undefined,
|
|
3016
|
+
BeginOffset: smithy_client_1.expectInt32(output.BeginOffset),
|
|
3017
|
+
Category: smithy_client_1.expectString(output.Category),
|
|
3018
|
+
EndOffset: smithy_client_1.expectInt32(output.EndOffset),
|
|
3019
|
+
Id: smithy_client_1.expectInt32(output.Id),
|
|
3020
|
+
SNOMEDCTConcepts: output.SNOMEDCTConcepts !== undefined && output.SNOMEDCTConcepts !== null
|
|
3021
|
+
? deserializeAws_json1_1SNOMEDCTConceptList(output.SNOMEDCTConcepts, context)
|
|
3022
|
+
: undefined,
|
|
3023
|
+
Score: smithy_client_1.limitedParseFloat32(output.Score),
|
|
3024
|
+
Text: smithy_client_1.expectString(output.Text),
|
|
3025
|
+
Traits: output.Traits !== undefined && output.Traits !== null
|
|
3026
|
+
? deserializeAws_json1_1SNOMEDCTTraitList(output.Traits, context)
|
|
3027
|
+
: undefined,
|
|
3028
|
+
Type: smithy_client_1.expectString(output.Type),
|
|
3029
|
+
};
|
|
3030
|
+
};
|
|
3031
|
+
const deserializeAws_json1_1SNOMEDCTEntityList = (output, context) => {
|
|
3032
|
+
return (output || [])
|
|
3033
|
+
.filter((e) => e != null)
|
|
3034
|
+
.map((entry) => {
|
|
3035
|
+
if (entry === null) {
|
|
3036
|
+
return null;
|
|
3037
|
+
}
|
|
3038
|
+
return deserializeAws_json1_1SNOMEDCTEntity(entry, context);
|
|
3039
|
+
});
|
|
3040
|
+
};
|
|
3041
|
+
const deserializeAws_json1_1SNOMEDCTTrait = (output, context) => {
|
|
3042
|
+
return {
|
|
3043
|
+
Name: smithy_client_1.expectString(output.Name),
|
|
3044
|
+
Score: smithy_client_1.limitedParseFloat32(output.Score),
|
|
3045
|
+
};
|
|
3046
|
+
};
|
|
3047
|
+
const deserializeAws_json1_1SNOMEDCTTraitList = (output, context) => {
|
|
3048
|
+
return (output || [])
|
|
3049
|
+
.filter((e) => e != null)
|
|
3050
|
+
.map((entry) => {
|
|
3051
|
+
if (entry === null) {
|
|
3052
|
+
return null;
|
|
3053
|
+
}
|
|
3054
|
+
return deserializeAws_json1_1SNOMEDCTTrait(entry, context);
|
|
3055
|
+
});
|
|
3056
|
+
};
|
|
2458
3057
|
const deserializeAws_json1_1StartEntitiesDetectionV2JobResponse = (output, context) => {
|
|
2459
3058
|
return {
|
|
2460
3059
|
JobId: smithy_client_1.expectString(output.JobId),
|
|
@@ -2475,6 +3074,11 @@ const deserializeAws_json1_1StartRxNormInferenceJobResponse = (output, context)
|
|
|
2475
3074
|
JobId: smithy_client_1.expectString(output.JobId),
|
|
2476
3075
|
};
|
|
2477
3076
|
};
|
|
3077
|
+
const deserializeAws_json1_1StartSNOMEDCTInferenceJobResponse = (output, context) => {
|
|
3078
|
+
return {
|
|
3079
|
+
JobId: smithy_client_1.expectString(output.JobId),
|
|
3080
|
+
};
|
|
3081
|
+
};
|
|
2478
3082
|
const deserializeAws_json1_1StopEntitiesDetectionV2JobResponse = (output, context) => {
|
|
2479
3083
|
return {
|
|
2480
3084
|
JobId: smithy_client_1.expectString(output.JobId),
|
|
@@ -2495,6 +3099,11 @@ const deserializeAws_json1_1StopRxNormInferenceJobResponse = (output, context) =
|
|
|
2495
3099
|
JobId: smithy_client_1.expectString(output.JobId),
|
|
2496
3100
|
};
|
|
2497
3101
|
};
|
|
3102
|
+
const deserializeAws_json1_1StopSNOMEDCTInferenceJobResponse = (output, context) => {
|
|
3103
|
+
return {
|
|
3104
|
+
JobId: smithy_client_1.expectString(output.JobId),
|
|
3105
|
+
};
|
|
3106
|
+
};
|
|
2498
3107
|
const deserializeAws_json1_1TextSizeLimitExceededException = (output, context) => {
|
|
2499
3108
|
return {
|
|
2500
3109
|
Message: smithy_client_1.expectString(output.Message),
|