@aws-sdk/client-textract 3.50.0 → 3.53.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 +28 -0
- package/dist-cjs/index.js +3 -0
- package/dist-cjs/models/TextractServiceException.js +11 -0
- package/dist-cjs/models/models_0.js +221 -2
- package/dist-cjs/protocols/Aws_json1_1.js +209 -766
- package/dist-es/index.js +1 -0
- package/dist-es/models/TextractServiceException.js +12 -0
- package/dist-es/models/models_0.js +206 -1
- package/dist-es/protocols/Aws_json1_1.js +387 -779
- package/dist-types/index.d.ts +1 -0
- package/dist-types/models/TextractServiceException.d.ts +10 -0
- package/dist-types/models/models_0.d.ts +105 -44
- package/dist-types/ts3.4/Textract.d.ts +55 -0
- package/dist-types/ts3.4/TextractClient.d.ts +83 -0
- package/dist-types/ts3.4/commands/AnalyzeDocumentCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AnalyzeExpenseCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/AnalyzeIDCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DetectDocumentTextCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetDocumentTextDetectionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/GetExpenseAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartDocumentAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartDocumentTextDetectionCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/StartExpenseAnalysisCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +10 -0
- package/dist-types/ts3.4/endpoints.d.ts +2 -0
- package/dist-types/ts3.4/index.d.ts +5 -0
- package/dist-types/ts3.4/models/TextractServiceException.d.ts +6 -0
- package/dist-types/ts3.4/models/index.d.ts +1 -0
- package/dist-types/ts3.4/models/models_0.d.ts +753 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +32 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +38 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +37 -0
- package/dist-types/ts3.4/runtimeConfig.shared.d.ts +11 -0
- package/package.json +33 -33
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.deserializeAws_json1_1StartExpenseAnalysisCommand = exports.deserializeAws_json1_1StartDocumentTextDetectionCommand = exports.deserializeAws_json1_1StartDocumentAnalysisCommand = exports.deserializeAws_json1_1GetExpenseAnalysisCommand = exports.deserializeAws_json1_1GetDocumentTextDetectionCommand = exports.deserializeAws_json1_1GetDocumentAnalysisCommand = exports.deserializeAws_json1_1DetectDocumentTextCommand = exports.deserializeAws_json1_1AnalyzeIDCommand = exports.deserializeAws_json1_1AnalyzeExpenseCommand = exports.deserializeAws_json1_1AnalyzeDocumentCommand = exports.serializeAws_json1_1StartExpenseAnalysisCommand = exports.serializeAws_json1_1StartDocumentTextDetectionCommand = exports.serializeAws_json1_1StartDocumentAnalysisCommand = exports.serializeAws_json1_1GetExpenseAnalysisCommand = exports.serializeAws_json1_1GetDocumentTextDetectionCommand = exports.serializeAws_json1_1GetDocumentAnalysisCommand = exports.serializeAws_json1_1DetectDocumentTextCommand = exports.serializeAws_json1_1AnalyzeIDCommand = exports.serializeAws_json1_1AnalyzeExpenseCommand = exports.serializeAws_json1_1AnalyzeDocumentCommand = void 0;
|
|
4
4
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
5
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
6
|
+
const models_0_1 = require("../models/models_0");
|
|
7
|
+
const TextractServiceException_1 = require("../models/TextractServiceException");
|
|
6
8
|
const serializeAws_json1_1AnalyzeDocumentCommand = async (input, context) => {
|
|
7
9
|
const headers = {
|
|
8
10
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -128,99 +130,43 @@ const deserializeAws_json1_1AnalyzeDocumentCommandError = async (output, context
|
|
|
128
130
|
switch (errorCode) {
|
|
129
131
|
case "AccessDeniedException":
|
|
130
132
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
131
|
-
|
|
132
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
133
|
-
name: errorCode,
|
|
134
|
-
$metadata: deserializeMetadata(output),
|
|
135
|
-
};
|
|
136
|
-
break;
|
|
133
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
137
134
|
case "BadDocumentException":
|
|
138
135
|
case "com.amazonaws.textract#BadDocumentException":
|
|
139
|
-
|
|
140
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
141
|
-
name: errorCode,
|
|
142
|
-
$metadata: deserializeMetadata(output),
|
|
143
|
-
};
|
|
144
|
-
break;
|
|
136
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
145
137
|
case "DocumentTooLargeException":
|
|
146
138
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
147
|
-
|
|
148
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
149
|
-
name: errorCode,
|
|
150
|
-
$metadata: deserializeMetadata(output),
|
|
151
|
-
};
|
|
152
|
-
break;
|
|
139
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
153
140
|
case "HumanLoopQuotaExceededException":
|
|
154
141
|
case "com.amazonaws.textract#HumanLoopQuotaExceededException":
|
|
155
|
-
|
|
156
|
-
...(await deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse(parsedOutput, context)),
|
|
157
|
-
name: errorCode,
|
|
158
|
-
$metadata: deserializeMetadata(output),
|
|
159
|
-
};
|
|
160
|
-
break;
|
|
142
|
+
throw await deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse(parsedOutput, context);
|
|
161
143
|
case "InternalServerError":
|
|
162
144
|
case "com.amazonaws.textract#InternalServerError":
|
|
163
|
-
|
|
164
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
165
|
-
name: errorCode,
|
|
166
|
-
$metadata: deserializeMetadata(output),
|
|
167
|
-
};
|
|
168
|
-
break;
|
|
145
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
169
146
|
case "InvalidParameterException":
|
|
170
147
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
171
|
-
|
|
172
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
173
|
-
name: errorCode,
|
|
174
|
-
$metadata: deserializeMetadata(output),
|
|
175
|
-
};
|
|
176
|
-
break;
|
|
148
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
177
149
|
case "InvalidS3ObjectException":
|
|
178
150
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
179
|
-
|
|
180
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
181
|
-
name: errorCode,
|
|
182
|
-
$metadata: deserializeMetadata(output),
|
|
183
|
-
};
|
|
184
|
-
break;
|
|
151
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
185
152
|
case "ProvisionedThroughputExceededException":
|
|
186
153
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
187
|
-
|
|
188
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
189
|
-
name: errorCode,
|
|
190
|
-
$metadata: deserializeMetadata(output),
|
|
191
|
-
};
|
|
192
|
-
break;
|
|
154
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
193
155
|
case "ThrottlingException":
|
|
194
156
|
case "com.amazonaws.textract#ThrottlingException":
|
|
195
|
-
|
|
196
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
197
|
-
name: errorCode,
|
|
198
|
-
$metadata: deserializeMetadata(output),
|
|
199
|
-
};
|
|
200
|
-
break;
|
|
157
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
201
158
|
case "UnsupportedDocumentException":
|
|
202
159
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
203
|
-
|
|
204
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
205
|
-
name: errorCode,
|
|
206
|
-
$metadata: deserializeMetadata(output),
|
|
207
|
-
};
|
|
208
|
-
break;
|
|
160
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
209
161
|
default:
|
|
210
162
|
const parsedBody = parsedOutput.body;
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
...parsedBody,
|
|
214
|
-
name: `${errorCode}`,
|
|
215
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
163
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
164
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
216
165
|
$fault: "client",
|
|
217
166
|
$metadata: deserializeMetadata(output),
|
|
218
|
-
};
|
|
167
|
+
});
|
|
168
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
219
169
|
}
|
|
220
|
-
const message = response.message || response.Message || errorCode;
|
|
221
|
-
response.message = message;
|
|
222
|
-
delete response.Message;
|
|
223
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
224
170
|
};
|
|
225
171
|
const deserializeAws_json1_1AnalyzeExpenseCommand = async (output, context) => {
|
|
226
172
|
if (output.statusCode >= 300) {
|
|
@@ -247,91 +193,40 @@ const deserializeAws_json1_1AnalyzeExpenseCommandError = async (output, context)
|
|
|
247
193
|
switch (errorCode) {
|
|
248
194
|
case "AccessDeniedException":
|
|
249
195
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
250
|
-
|
|
251
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
252
|
-
name: errorCode,
|
|
253
|
-
$metadata: deserializeMetadata(output),
|
|
254
|
-
};
|
|
255
|
-
break;
|
|
196
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
256
197
|
case "BadDocumentException":
|
|
257
198
|
case "com.amazonaws.textract#BadDocumentException":
|
|
258
|
-
|
|
259
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
260
|
-
name: errorCode,
|
|
261
|
-
$metadata: deserializeMetadata(output),
|
|
262
|
-
};
|
|
263
|
-
break;
|
|
199
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
264
200
|
case "DocumentTooLargeException":
|
|
265
201
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
266
|
-
|
|
267
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
268
|
-
name: errorCode,
|
|
269
|
-
$metadata: deserializeMetadata(output),
|
|
270
|
-
};
|
|
271
|
-
break;
|
|
202
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
272
203
|
case "InternalServerError":
|
|
273
204
|
case "com.amazonaws.textract#InternalServerError":
|
|
274
|
-
|
|
275
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
276
|
-
name: errorCode,
|
|
277
|
-
$metadata: deserializeMetadata(output),
|
|
278
|
-
};
|
|
279
|
-
break;
|
|
205
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
280
206
|
case "InvalidParameterException":
|
|
281
207
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
282
|
-
|
|
283
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
284
|
-
name: errorCode,
|
|
285
|
-
$metadata: deserializeMetadata(output),
|
|
286
|
-
};
|
|
287
|
-
break;
|
|
208
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
288
209
|
case "InvalidS3ObjectException":
|
|
289
210
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
290
|
-
|
|
291
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
292
|
-
name: errorCode,
|
|
293
|
-
$metadata: deserializeMetadata(output),
|
|
294
|
-
};
|
|
295
|
-
break;
|
|
211
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
296
212
|
case "ProvisionedThroughputExceededException":
|
|
297
213
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
298
|
-
|
|
299
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
300
|
-
name: errorCode,
|
|
301
|
-
$metadata: deserializeMetadata(output),
|
|
302
|
-
};
|
|
303
|
-
break;
|
|
214
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
304
215
|
case "ThrottlingException":
|
|
305
216
|
case "com.amazonaws.textract#ThrottlingException":
|
|
306
|
-
|
|
307
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
308
|
-
name: errorCode,
|
|
309
|
-
$metadata: deserializeMetadata(output),
|
|
310
|
-
};
|
|
311
|
-
break;
|
|
217
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
312
218
|
case "UnsupportedDocumentException":
|
|
313
219
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
314
|
-
|
|
315
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
316
|
-
name: errorCode,
|
|
317
|
-
$metadata: deserializeMetadata(output),
|
|
318
|
-
};
|
|
319
|
-
break;
|
|
220
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
320
221
|
default:
|
|
321
222
|
const parsedBody = parsedOutput.body;
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
...parsedBody,
|
|
325
|
-
name: `${errorCode}`,
|
|
326
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
223
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
224
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
327
225
|
$fault: "client",
|
|
328
226
|
$metadata: deserializeMetadata(output),
|
|
329
|
-
};
|
|
227
|
+
});
|
|
228
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
330
229
|
}
|
|
331
|
-
const message = response.message || response.Message || errorCode;
|
|
332
|
-
response.message = message;
|
|
333
|
-
delete response.Message;
|
|
334
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
335
230
|
};
|
|
336
231
|
const deserializeAws_json1_1AnalyzeIDCommand = async (output, context) => {
|
|
337
232
|
if (output.statusCode >= 300) {
|
|
@@ -358,91 +253,40 @@ const deserializeAws_json1_1AnalyzeIDCommandError = async (output, context) => {
|
|
|
358
253
|
switch (errorCode) {
|
|
359
254
|
case "AccessDeniedException":
|
|
360
255
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
361
|
-
|
|
362
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
363
|
-
name: errorCode,
|
|
364
|
-
$metadata: deserializeMetadata(output),
|
|
365
|
-
};
|
|
366
|
-
break;
|
|
256
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
367
257
|
case "BadDocumentException":
|
|
368
258
|
case "com.amazonaws.textract#BadDocumentException":
|
|
369
|
-
|
|
370
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
371
|
-
name: errorCode,
|
|
372
|
-
$metadata: deserializeMetadata(output),
|
|
373
|
-
};
|
|
374
|
-
break;
|
|
259
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
375
260
|
case "DocumentTooLargeException":
|
|
376
261
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
377
|
-
|
|
378
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
379
|
-
name: errorCode,
|
|
380
|
-
$metadata: deserializeMetadata(output),
|
|
381
|
-
};
|
|
382
|
-
break;
|
|
262
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
383
263
|
case "InternalServerError":
|
|
384
264
|
case "com.amazonaws.textract#InternalServerError":
|
|
385
|
-
|
|
386
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
387
|
-
name: errorCode,
|
|
388
|
-
$metadata: deserializeMetadata(output),
|
|
389
|
-
};
|
|
390
|
-
break;
|
|
265
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
391
266
|
case "InvalidParameterException":
|
|
392
267
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
393
|
-
|
|
394
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
395
|
-
name: errorCode,
|
|
396
|
-
$metadata: deserializeMetadata(output),
|
|
397
|
-
};
|
|
398
|
-
break;
|
|
268
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
399
269
|
case "InvalidS3ObjectException":
|
|
400
270
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
401
|
-
|
|
402
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
403
|
-
name: errorCode,
|
|
404
|
-
$metadata: deserializeMetadata(output),
|
|
405
|
-
};
|
|
406
|
-
break;
|
|
271
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
407
272
|
case "ProvisionedThroughputExceededException":
|
|
408
273
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
409
|
-
|
|
410
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
411
|
-
name: errorCode,
|
|
412
|
-
$metadata: deserializeMetadata(output),
|
|
413
|
-
};
|
|
414
|
-
break;
|
|
274
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
415
275
|
case "ThrottlingException":
|
|
416
276
|
case "com.amazonaws.textract#ThrottlingException":
|
|
417
|
-
|
|
418
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
419
|
-
name: errorCode,
|
|
420
|
-
$metadata: deserializeMetadata(output),
|
|
421
|
-
};
|
|
422
|
-
break;
|
|
277
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
423
278
|
case "UnsupportedDocumentException":
|
|
424
279
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
425
|
-
|
|
426
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
427
|
-
name: errorCode,
|
|
428
|
-
$metadata: deserializeMetadata(output),
|
|
429
|
-
};
|
|
430
|
-
break;
|
|
280
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
431
281
|
default:
|
|
432
282
|
const parsedBody = parsedOutput.body;
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
...parsedBody,
|
|
436
|
-
name: `${errorCode}`,
|
|
437
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
283
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
284
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
438
285
|
$fault: "client",
|
|
439
286
|
$metadata: deserializeMetadata(output),
|
|
440
|
-
};
|
|
287
|
+
});
|
|
288
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
441
289
|
}
|
|
442
|
-
const message = response.message || response.Message || errorCode;
|
|
443
|
-
response.message = message;
|
|
444
|
-
delete response.Message;
|
|
445
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
446
290
|
};
|
|
447
291
|
const deserializeAws_json1_1DetectDocumentTextCommand = async (output, context) => {
|
|
448
292
|
if (output.statusCode >= 300) {
|
|
@@ -469,91 +313,40 @@ const deserializeAws_json1_1DetectDocumentTextCommandError = async (output, cont
|
|
|
469
313
|
switch (errorCode) {
|
|
470
314
|
case "AccessDeniedException":
|
|
471
315
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
472
|
-
|
|
473
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
474
|
-
name: errorCode,
|
|
475
|
-
$metadata: deserializeMetadata(output),
|
|
476
|
-
};
|
|
477
|
-
break;
|
|
316
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
478
317
|
case "BadDocumentException":
|
|
479
318
|
case "com.amazonaws.textract#BadDocumentException":
|
|
480
|
-
|
|
481
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
482
|
-
name: errorCode,
|
|
483
|
-
$metadata: deserializeMetadata(output),
|
|
484
|
-
};
|
|
485
|
-
break;
|
|
319
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
486
320
|
case "DocumentTooLargeException":
|
|
487
321
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
488
|
-
|
|
489
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
490
|
-
name: errorCode,
|
|
491
|
-
$metadata: deserializeMetadata(output),
|
|
492
|
-
};
|
|
493
|
-
break;
|
|
322
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
494
323
|
case "InternalServerError":
|
|
495
324
|
case "com.amazonaws.textract#InternalServerError":
|
|
496
|
-
|
|
497
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
498
|
-
name: errorCode,
|
|
499
|
-
$metadata: deserializeMetadata(output),
|
|
500
|
-
};
|
|
501
|
-
break;
|
|
325
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
502
326
|
case "InvalidParameterException":
|
|
503
327
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
504
|
-
|
|
505
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
506
|
-
name: errorCode,
|
|
507
|
-
$metadata: deserializeMetadata(output),
|
|
508
|
-
};
|
|
509
|
-
break;
|
|
328
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
510
329
|
case "InvalidS3ObjectException":
|
|
511
330
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
512
|
-
|
|
513
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
514
|
-
name: errorCode,
|
|
515
|
-
$metadata: deserializeMetadata(output),
|
|
516
|
-
};
|
|
517
|
-
break;
|
|
331
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
518
332
|
case "ProvisionedThroughputExceededException":
|
|
519
333
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
520
|
-
|
|
521
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
522
|
-
name: errorCode,
|
|
523
|
-
$metadata: deserializeMetadata(output),
|
|
524
|
-
};
|
|
525
|
-
break;
|
|
334
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
526
335
|
case "ThrottlingException":
|
|
527
336
|
case "com.amazonaws.textract#ThrottlingException":
|
|
528
|
-
|
|
529
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
530
|
-
name: errorCode,
|
|
531
|
-
$metadata: deserializeMetadata(output),
|
|
532
|
-
};
|
|
533
|
-
break;
|
|
337
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
534
338
|
case "UnsupportedDocumentException":
|
|
535
339
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
536
|
-
|
|
537
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
538
|
-
name: errorCode,
|
|
539
|
-
$metadata: deserializeMetadata(output),
|
|
540
|
-
};
|
|
541
|
-
break;
|
|
340
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
542
341
|
default:
|
|
543
342
|
const parsedBody = parsedOutput.body;
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
...parsedBody,
|
|
547
|
-
name: `${errorCode}`,
|
|
548
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
343
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
344
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
549
345
|
$fault: "client",
|
|
550
346
|
$metadata: deserializeMetadata(output),
|
|
551
|
-
};
|
|
347
|
+
});
|
|
348
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
552
349
|
}
|
|
553
|
-
const message = response.message || response.Message || errorCode;
|
|
554
|
-
response.message = message;
|
|
555
|
-
delete response.Message;
|
|
556
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
557
350
|
};
|
|
558
351
|
const deserializeAws_json1_1GetDocumentAnalysisCommand = async (output, context) => {
|
|
559
352
|
if (output.statusCode >= 300) {
|
|
@@ -580,83 +373,37 @@ const deserializeAws_json1_1GetDocumentAnalysisCommandError = async (output, con
|
|
|
580
373
|
switch (errorCode) {
|
|
581
374
|
case "AccessDeniedException":
|
|
582
375
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
583
|
-
|
|
584
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
585
|
-
name: errorCode,
|
|
586
|
-
$metadata: deserializeMetadata(output),
|
|
587
|
-
};
|
|
588
|
-
break;
|
|
376
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
589
377
|
case "InternalServerError":
|
|
590
378
|
case "com.amazonaws.textract#InternalServerError":
|
|
591
|
-
|
|
592
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
593
|
-
name: errorCode,
|
|
594
|
-
$metadata: deserializeMetadata(output),
|
|
595
|
-
};
|
|
596
|
-
break;
|
|
379
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
597
380
|
case "InvalidJobIdException":
|
|
598
381
|
case "com.amazonaws.textract#InvalidJobIdException":
|
|
599
|
-
|
|
600
|
-
...(await deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)),
|
|
601
|
-
name: errorCode,
|
|
602
|
-
$metadata: deserializeMetadata(output),
|
|
603
|
-
};
|
|
604
|
-
break;
|
|
382
|
+
throw await deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context);
|
|
605
383
|
case "InvalidKMSKeyException":
|
|
606
384
|
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
607
|
-
|
|
608
|
-
...(await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)),
|
|
609
|
-
name: errorCode,
|
|
610
|
-
$metadata: deserializeMetadata(output),
|
|
611
|
-
};
|
|
612
|
-
break;
|
|
385
|
+
throw await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context);
|
|
613
386
|
case "InvalidParameterException":
|
|
614
387
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
615
|
-
|
|
616
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
617
|
-
name: errorCode,
|
|
618
|
-
$metadata: deserializeMetadata(output),
|
|
619
|
-
};
|
|
620
|
-
break;
|
|
388
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
621
389
|
case "InvalidS3ObjectException":
|
|
622
390
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
623
|
-
|
|
624
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
625
|
-
name: errorCode,
|
|
626
|
-
$metadata: deserializeMetadata(output),
|
|
627
|
-
};
|
|
628
|
-
break;
|
|
391
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
629
392
|
case "ProvisionedThroughputExceededException":
|
|
630
393
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
631
|
-
|
|
632
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
633
|
-
name: errorCode,
|
|
634
|
-
$metadata: deserializeMetadata(output),
|
|
635
|
-
};
|
|
636
|
-
break;
|
|
394
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
637
395
|
case "ThrottlingException":
|
|
638
396
|
case "com.amazonaws.textract#ThrottlingException":
|
|
639
|
-
|
|
640
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
641
|
-
name: errorCode,
|
|
642
|
-
$metadata: deserializeMetadata(output),
|
|
643
|
-
};
|
|
644
|
-
break;
|
|
397
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
645
398
|
default:
|
|
646
399
|
const parsedBody = parsedOutput.body;
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
...parsedBody,
|
|
650
|
-
name: `${errorCode}`,
|
|
651
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
400
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
401
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
652
402
|
$fault: "client",
|
|
653
403
|
$metadata: deserializeMetadata(output),
|
|
654
|
-
};
|
|
404
|
+
});
|
|
405
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
655
406
|
}
|
|
656
|
-
const message = response.message || response.Message || errorCode;
|
|
657
|
-
response.message = message;
|
|
658
|
-
delete response.Message;
|
|
659
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
660
407
|
};
|
|
661
408
|
const deserializeAws_json1_1GetDocumentTextDetectionCommand = async (output, context) => {
|
|
662
409
|
if (output.statusCode >= 300) {
|
|
@@ -683,83 +430,37 @@ const deserializeAws_json1_1GetDocumentTextDetectionCommandError = async (output
|
|
|
683
430
|
switch (errorCode) {
|
|
684
431
|
case "AccessDeniedException":
|
|
685
432
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
686
|
-
|
|
687
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
688
|
-
name: errorCode,
|
|
689
|
-
$metadata: deserializeMetadata(output),
|
|
690
|
-
};
|
|
691
|
-
break;
|
|
433
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
692
434
|
case "InternalServerError":
|
|
693
435
|
case "com.amazonaws.textract#InternalServerError":
|
|
694
|
-
|
|
695
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
696
|
-
name: errorCode,
|
|
697
|
-
$metadata: deserializeMetadata(output),
|
|
698
|
-
};
|
|
699
|
-
break;
|
|
436
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
700
437
|
case "InvalidJobIdException":
|
|
701
438
|
case "com.amazonaws.textract#InvalidJobIdException":
|
|
702
|
-
|
|
703
|
-
...(await deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)),
|
|
704
|
-
name: errorCode,
|
|
705
|
-
$metadata: deserializeMetadata(output),
|
|
706
|
-
};
|
|
707
|
-
break;
|
|
439
|
+
throw await deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context);
|
|
708
440
|
case "InvalidKMSKeyException":
|
|
709
441
|
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
710
|
-
|
|
711
|
-
...(await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)),
|
|
712
|
-
name: errorCode,
|
|
713
|
-
$metadata: deserializeMetadata(output),
|
|
714
|
-
};
|
|
715
|
-
break;
|
|
442
|
+
throw await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context);
|
|
716
443
|
case "InvalidParameterException":
|
|
717
444
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
718
|
-
|
|
719
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
720
|
-
name: errorCode,
|
|
721
|
-
$metadata: deserializeMetadata(output),
|
|
722
|
-
};
|
|
723
|
-
break;
|
|
445
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
724
446
|
case "InvalidS3ObjectException":
|
|
725
447
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
726
|
-
|
|
727
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
728
|
-
name: errorCode,
|
|
729
|
-
$metadata: deserializeMetadata(output),
|
|
730
|
-
};
|
|
731
|
-
break;
|
|
448
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
732
449
|
case "ProvisionedThroughputExceededException":
|
|
733
450
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
734
|
-
|
|
735
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
736
|
-
name: errorCode,
|
|
737
|
-
$metadata: deserializeMetadata(output),
|
|
738
|
-
};
|
|
739
|
-
break;
|
|
451
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
740
452
|
case "ThrottlingException":
|
|
741
453
|
case "com.amazonaws.textract#ThrottlingException":
|
|
742
|
-
|
|
743
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
744
|
-
name: errorCode,
|
|
745
|
-
$metadata: deserializeMetadata(output),
|
|
746
|
-
};
|
|
747
|
-
break;
|
|
454
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
748
455
|
default:
|
|
749
456
|
const parsedBody = parsedOutput.body;
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
...parsedBody,
|
|
753
|
-
name: `${errorCode}`,
|
|
754
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
457
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
458
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
755
459
|
$fault: "client",
|
|
756
460
|
$metadata: deserializeMetadata(output),
|
|
757
|
-
};
|
|
461
|
+
});
|
|
462
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
758
463
|
}
|
|
759
|
-
const message = response.message || response.Message || errorCode;
|
|
760
|
-
response.message = message;
|
|
761
|
-
delete response.Message;
|
|
762
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
763
464
|
};
|
|
764
465
|
const deserializeAws_json1_1GetExpenseAnalysisCommand = async (output, context) => {
|
|
765
466
|
if (output.statusCode >= 300) {
|
|
@@ -786,83 +487,37 @@ const deserializeAws_json1_1GetExpenseAnalysisCommandError = async (output, cont
|
|
|
786
487
|
switch (errorCode) {
|
|
787
488
|
case "AccessDeniedException":
|
|
788
489
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
789
|
-
|
|
790
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
791
|
-
name: errorCode,
|
|
792
|
-
$metadata: deserializeMetadata(output),
|
|
793
|
-
};
|
|
794
|
-
break;
|
|
490
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
795
491
|
case "InternalServerError":
|
|
796
492
|
case "com.amazonaws.textract#InternalServerError":
|
|
797
|
-
|
|
798
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
799
|
-
name: errorCode,
|
|
800
|
-
$metadata: deserializeMetadata(output),
|
|
801
|
-
};
|
|
802
|
-
break;
|
|
493
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
803
494
|
case "InvalidJobIdException":
|
|
804
495
|
case "com.amazonaws.textract#InvalidJobIdException":
|
|
805
|
-
|
|
806
|
-
...(await deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context)),
|
|
807
|
-
name: errorCode,
|
|
808
|
-
$metadata: deserializeMetadata(output),
|
|
809
|
-
};
|
|
810
|
-
break;
|
|
496
|
+
throw await deserializeAws_json1_1InvalidJobIdExceptionResponse(parsedOutput, context);
|
|
811
497
|
case "InvalidKMSKeyException":
|
|
812
498
|
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
813
|
-
|
|
814
|
-
...(await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)),
|
|
815
|
-
name: errorCode,
|
|
816
|
-
$metadata: deserializeMetadata(output),
|
|
817
|
-
};
|
|
818
|
-
break;
|
|
499
|
+
throw await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context);
|
|
819
500
|
case "InvalidParameterException":
|
|
820
501
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
821
|
-
|
|
822
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
823
|
-
name: errorCode,
|
|
824
|
-
$metadata: deserializeMetadata(output),
|
|
825
|
-
};
|
|
826
|
-
break;
|
|
502
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
827
503
|
case "InvalidS3ObjectException":
|
|
828
504
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
829
|
-
|
|
830
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
831
|
-
name: errorCode,
|
|
832
|
-
$metadata: deserializeMetadata(output),
|
|
833
|
-
};
|
|
834
|
-
break;
|
|
505
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
835
506
|
case "ProvisionedThroughputExceededException":
|
|
836
507
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
837
|
-
|
|
838
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
839
|
-
name: errorCode,
|
|
840
|
-
$metadata: deserializeMetadata(output),
|
|
841
|
-
};
|
|
842
|
-
break;
|
|
508
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
843
509
|
case "ThrottlingException":
|
|
844
510
|
case "com.amazonaws.textract#ThrottlingException":
|
|
845
|
-
|
|
846
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
847
|
-
name: errorCode,
|
|
848
|
-
$metadata: deserializeMetadata(output),
|
|
849
|
-
};
|
|
850
|
-
break;
|
|
511
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
851
512
|
default:
|
|
852
513
|
const parsedBody = parsedOutput.body;
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
...parsedBody,
|
|
856
|
-
name: `${errorCode}`,
|
|
857
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
514
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
515
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
858
516
|
$fault: "client",
|
|
859
517
|
$metadata: deserializeMetadata(output),
|
|
860
|
-
};
|
|
518
|
+
});
|
|
519
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
861
520
|
}
|
|
862
|
-
const message = response.message || response.Message || errorCode;
|
|
863
|
-
response.message = message;
|
|
864
|
-
delete response.Message;
|
|
865
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
866
521
|
};
|
|
867
522
|
const deserializeAws_json1_1StartDocumentAnalysisCommand = async (output, context) => {
|
|
868
523
|
if (output.statusCode >= 300) {
|
|
@@ -889,115 +544,49 @@ const deserializeAws_json1_1StartDocumentAnalysisCommandError = async (output, c
|
|
|
889
544
|
switch (errorCode) {
|
|
890
545
|
case "AccessDeniedException":
|
|
891
546
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
892
|
-
|
|
893
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
894
|
-
name: errorCode,
|
|
895
|
-
$metadata: deserializeMetadata(output),
|
|
896
|
-
};
|
|
897
|
-
break;
|
|
547
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
898
548
|
case "BadDocumentException":
|
|
899
549
|
case "com.amazonaws.textract#BadDocumentException":
|
|
900
|
-
|
|
901
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
902
|
-
name: errorCode,
|
|
903
|
-
$metadata: deserializeMetadata(output),
|
|
904
|
-
};
|
|
905
|
-
break;
|
|
550
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
906
551
|
case "DocumentTooLargeException":
|
|
907
552
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
908
|
-
|
|
909
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
910
|
-
name: errorCode,
|
|
911
|
-
$metadata: deserializeMetadata(output),
|
|
912
|
-
};
|
|
913
|
-
break;
|
|
553
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
914
554
|
case "IdempotentParameterMismatchException":
|
|
915
555
|
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
916
|
-
|
|
917
|
-
...(await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)),
|
|
918
|
-
name: errorCode,
|
|
919
|
-
$metadata: deserializeMetadata(output),
|
|
920
|
-
};
|
|
921
|
-
break;
|
|
556
|
+
throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
|
|
922
557
|
case "InternalServerError":
|
|
923
558
|
case "com.amazonaws.textract#InternalServerError":
|
|
924
|
-
|
|
925
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
926
|
-
name: errorCode,
|
|
927
|
-
$metadata: deserializeMetadata(output),
|
|
928
|
-
};
|
|
929
|
-
break;
|
|
559
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
930
560
|
case "InvalidKMSKeyException":
|
|
931
561
|
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
932
|
-
|
|
933
|
-
...(await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)),
|
|
934
|
-
name: errorCode,
|
|
935
|
-
$metadata: deserializeMetadata(output),
|
|
936
|
-
};
|
|
937
|
-
break;
|
|
562
|
+
throw await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context);
|
|
938
563
|
case "InvalidParameterException":
|
|
939
564
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
940
|
-
|
|
941
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
942
|
-
name: errorCode,
|
|
943
|
-
$metadata: deserializeMetadata(output),
|
|
944
|
-
};
|
|
945
|
-
break;
|
|
565
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
946
566
|
case "InvalidS3ObjectException":
|
|
947
567
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
948
|
-
|
|
949
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
950
|
-
name: errorCode,
|
|
951
|
-
$metadata: deserializeMetadata(output),
|
|
952
|
-
};
|
|
953
|
-
break;
|
|
568
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
954
569
|
case "LimitExceededException":
|
|
955
570
|
case "com.amazonaws.textract#LimitExceededException":
|
|
956
|
-
|
|
957
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
958
|
-
name: errorCode,
|
|
959
|
-
$metadata: deserializeMetadata(output),
|
|
960
|
-
};
|
|
961
|
-
break;
|
|
571
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
962
572
|
case "ProvisionedThroughputExceededException":
|
|
963
573
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
964
|
-
|
|
965
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
966
|
-
name: errorCode,
|
|
967
|
-
$metadata: deserializeMetadata(output),
|
|
968
|
-
};
|
|
969
|
-
break;
|
|
574
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
970
575
|
case "ThrottlingException":
|
|
971
576
|
case "com.amazonaws.textract#ThrottlingException":
|
|
972
|
-
|
|
973
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
974
|
-
name: errorCode,
|
|
975
|
-
$metadata: deserializeMetadata(output),
|
|
976
|
-
};
|
|
977
|
-
break;
|
|
577
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
978
578
|
case "UnsupportedDocumentException":
|
|
979
579
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
980
|
-
|
|
981
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
982
|
-
name: errorCode,
|
|
983
|
-
$metadata: deserializeMetadata(output),
|
|
984
|
-
};
|
|
985
|
-
break;
|
|
580
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
986
581
|
default:
|
|
987
582
|
const parsedBody = parsedOutput.body;
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
...parsedBody,
|
|
991
|
-
name: `${errorCode}`,
|
|
992
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
583
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
584
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
993
585
|
$fault: "client",
|
|
994
586
|
$metadata: deserializeMetadata(output),
|
|
995
|
-
};
|
|
587
|
+
});
|
|
588
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
996
589
|
}
|
|
997
|
-
const message = response.message || response.Message || errorCode;
|
|
998
|
-
response.message = message;
|
|
999
|
-
delete response.Message;
|
|
1000
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1001
590
|
};
|
|
1002
591
|
const deserializeAws_json1_1StartDocumentTextDetectionCommand = async (output, context) => {
|
|
1003
592
|
if (output.statusCode >= 300) {
|
|
@@ -1024,115 +613,49 @@ const deserializeAws_json1_1StartDocumentTextDetectionCommandError = async (outp
|
|
|
1024
613
|
switch (errorCode) {
|
|
1025
614
|
case "AccessDeniedException":
|
|
1026
615
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
1027
|
-
|
|
1028
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1029
|
-
name: errorCode,
|
|
1030
|
-
$metadata: deserializeMetadata(output),
|
|
1031
|
-
};
|
|
1032
|
-
break;
|
|
616
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1033
617
|
case "BadDocumentException":
|
|
1034
618
|
case "com.amazonaws.textract#BadDocumentException":
|
|
1035
|
-
|
|
1036
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
1037
|
-
name: errorCode,
|
|
1038
|
-
$metadata: deserializeMetadata(output),
|
|
1039
|
-
};
|
|
1040
|
-
break;
|
|
619
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
1041
620
|
case "DocumentTooLargeException":
|
|
1042
621
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1043
|
-
|
|
1044
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
1045
|
-
name: errorCode,
|
|
1046
|
-
$metadata: deserializeMetadata(output),
|
|
1047
|
-
};
|
|
1048
|
-
break;
|
|
622
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
1049
623
|
case "IdempotentParameterMismatchException":
|
|
1050
624
|
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1051
|
-
|
|
1052
|
-
...(await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)),
|
|
1053
|
-
name: errorCode,
|
|
1054
|
-
$metadata: deserializeMetadata(output),
|
|
1055
|
-
};
|
|
1056
|
-
break;
|
|
625
|
+
throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
|
|
1057
626
|
case "InternalServerError":
|
|
1058
627
|
case "com.amazonaws.textract#InternalServerError":
|
|
1059
|
-
|
|
1060
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1061
|
-
name: errorCode,
|
|
1062
|
-
$metadata: deserializeMetadata(output),
|
|
1063
|
-
};
|
|
1064
|
-
break;
|
|
628
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
1065
629
|
case "InvalidKMSKeyException":
|
|
1066
630
|
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1067
|
-
|
|
1068
|
-
...(await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)),
|
|
1069
|
-
name: errorCode,
|
|
1070
|
-
$metadata: deserializeMetadata(output),
|
|
1071
|
-
};
|
|
1072
|
-
break;
|
|
631
|
+
throw await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context);
|
|
1073
632
|
case "InvalidParameterException":
|
|
1074
633
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
1075
|
-
|
|
1076
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1077
|
-
name: errorCode,
|
|
1078
|
-
$metadata: deserializeMetadata(output),
|
|
1079
|
-
};
|
|
1080
|
-
break;
|
|
634
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1081
635
|
case "InvalidS3ObjectException":
|
|
1082
636
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1083
|
-
|
|
1084
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
1085
|
-
name: errorCode,
|
|
1086
|
-
$metadata: deserializeMetadata(output),
|
|
1087
|
-
};
|
|
1088
|
-
break;
|
|
637
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
1089
638
|
case "LimitExceededException":
|
|
1090
639
|
case "com.amazonaws.textract#LimitExceededException":
|
|
1091
|
-
|
|
1092
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
1093
|
-
name: errorCode,
|
|
1094
|
-
$metadata: deserializeMetadata(output),
|
|
1095
|
-
};
|
|
1096
|
-
break;
|
|
640
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1097
641
|
case "ProvisionedThroughputExceededException":
|
|
1098
642
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1099
|
-
|
|
1100
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
1101
|
-
name: errorCode,
|
|
1102
|
-
$metadata: deserializeMetadata(output),
|
|
1103
|
-
};
|
|
1104
|
-
break;
|
|
643
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
1105
644
|
case "ThrottlingException":
|
|
1106
645
|
case "com.amazonaws.textract#ThrottlingException":
|
|
1107
|
-
|
|
1108
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1109
|
-
name: errorCode,
|
|
1110
|
-
$metadata: deserializeMetadata(output),
|
|
1111
|
-
};
|
|
1112
|
-
break;
|
|
646
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1113
647
|
case "UnsupportedDocumentException":
|
|
1114
648
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1115
|
-
|
|
1116
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
1117
|
-
name: errorCode,
|
|
1118
|
-
$metadata: deserializeMetadata(output),
|
|
1119
|
-
};
|
|
1120
|
-
break;
|
|
649
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
1121
650
|
default:
|
|
1122
651
|
const parsedBody = parsedOutput.body;
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
...parsedBody,
|
|
1126
|
-
name: `${errorCode}`,
|
|
1127
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
652
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
653
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1128
654
|
$fault: "client",
|
|
1129
655
|
$metadata: deserializeMetadata(output),
|
|
1130
|
-
};
|
|
656
|
+
});
|
|
657
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1131
658
|
}
|
|
1132
|
-
const message = response.message || response.Message || errorCode;
|
|
1133
|
-
response.message = message;
|
|
1134
|
-
delete response.Message;
|
|
1135
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1136
659
|
};
|
|
1137
660
|
const deserializeAws_json1_1StartExpenseAnalysisCommand = async (output, context) => {
|
|
1138
661
|
if (output.statusCode >= 300) {
|
|
@@ -1159,269 +682,175 @@ const deserializeAws_json1_1StartExpenseAnalysisCommandError = async (output, co
|
|
|
1159
682
|
switch (errorCode) {
|
|
1160
683
|
case "AccessDeniedException":
|
|
1161
684
|
case "com.amazonaws.textract#AccessDeniedException":
|
|
1162
|
-
|
|
1163
|
-
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1164
|
-
name: errorCode,
|
|
1165
|
-
$metadata: deserializeMetadata(output),
|
|
1166
|
-
};
|
|
1167
|
-
break;
|
|
685
|
+
throw await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context);
|
|
1168
686
|
case "BadDocumentException":
|
|
1169
687
|
case "com.amazonaws.textract#BadDocumentException":
|
|
1170
|
-
|
|
1171
|
-
...(await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context)),
|
|
1172
|
-
name: errorCode,
|
|
1173
|
-
$metadata: deserializeMetadata(output),
|
|
1174
|
-
};
|
|
1175
|
-
break;
|
|
688
|
+
throw await deserializeAws_json1_1BadDocumentExceptionResponse(parsedOutput, context);
|
|
1176
689
|
case "DocumentTooLargeException":
|
|
1177
690
|
case "com.amazonaws.textract#DocumentTooLargeException":
|
|
1178
|
-
|
|
1179
|
-
...(await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context)),
|
|
1180
|
-
name: errorCode,
|
|
1181
|
-
$metadata: deserializeMetadata(output),
|
|
1182
|
-
};
|
|
1183
|
-
break;
|
|
691
|
+
throw await deserializeAws_json1_1DocumentTooLargeExceptionResponse(parsedOutput, context);
|
|
1184
692
|
case "IdempotentParameterMismatchException":
|
|
1185
693
|
case "com.amazonaws.textract#IdempotentParameterMismatchException":
|
|
1186
|
-
|
|
1187
|
-
...(await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context)),
|
|
1188
|
-
name: errorCode,
|
|
1189
|
-
$metadata: deserializeMetadata(output),
|
|
1190
|
-
};
|
|
1191
|
-
break;
|
|
694
|
+
throw await deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse(parsedOutput, context);
|
|
1192
695
|
case "InternalServerError":
|
|
1193
696
|
case "com.amazonaws.textract#InternalServerError":
|
|
1194
|
-
|
|
1195
|
-
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1196
|
-
name: errorCode,
|
|
1197
|
-
$metadata: deserializeMetadata(output),
|
|
1198
|
-
};
|
|
1199
|
-
break;
|
|
697
|
+
throw await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context);
|
|
1200
698
|
case "InvalidKMSKeyException":
|
|
1201
699
|
case "com.amazonaws.textract#InvalidKMSKeyException":
|
|
1202
|
-
|
|
1203
|
-
...(await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context)),
|
|
1204
|
-
name: errorCode,
|
|
1205
|
-
$metadata: deserializeMetadata(output),
|
|
1206
|
-
};
|
|
1207
|
-
break;
|
|
700
|
+
throw await deserializeAws_json1_1InvalidKMSKeyExceptionResponse(parsedOutput, context);
|
|
1208
701
|
case "InvalidParameterException":
|
|
1209
702
|
case "com.amazonaws.textract#InvalidParameterException":
|
|
1210
|
-
|
|
1211
|
-
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1212
|
-
name: errorCode,
|
|
1213
|
-
$metadata: deserializeMetadata(output),
|
|
1214
|
-
};
|
|
1215
|
-
break;
|
|
703
|
+
throw await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context);
|
|
1216
704
|
case "InvalidS3ObjectException":
|
|
1217
705
|
case "com.amazonaws.textract#InvalidS3ObjectException":
|
|
1218
|
-
|
|
1219
|
-
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
1220
|
-
name: errorCode,
|
|
1221
|
-
$metadata: deserializeMetadata(output),
|
|
1222
|
-
};
|
|
1223
|
-
break;
|
|
706
|
+
throw await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context);
|
|
1224
707
|
case "LimitExceededException":
|
|
1225
708
|
case "com.amazonaws.textract#LimitExceededException":
|
|
1226
|
-
|
|
1227
|
-
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
1228
|
-
name: errorCode,
|
|
1229
|
-
$metadata: deserializeMetadata(output),
|
|
1230
|
-
};
|
|
1231
|
-
break;
|
|
709
|
+
throw await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context);
|
|
1232
710
|
case "ProvisionedThroughputExceededException":
|
|
1233
711
|
case "com.amazonaws.textract#ProvisionedThroughputExceededException":
|
|
1234
|
-
|
|
1235
|
-
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
1236
|
-
name: errorCode,
|
|
1237
|
-
$metadata: deserializeMetadata(output),
|
|
1238
|
-
};
|
|
1239
|
-
break;
|
|
712
|
+
throw await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context);
|
|
1240
713
|
case "ThrottlingException":
|
|
1241
714
|
case "com.amazonaws.textract#ThrottlingException":
|
|
1242
|
-
|
|
1243
|
-
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1244
|
-
name: errorCode,
|
|
1245
|
-
$metadata: deserializeMetadata(output),
|
|
1246
|
-
};
|
|
1247
|
-
break;
|
|
715
|
+
throw await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context);
|
|
1248
716
|
case "UnsupportedDocumentException":
|
|
1249
717
|
case "com.amazonaws.textract#UnsupportedDocumentException":
|
|
1250
|
-
|
|
1251
|
-
...(await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context)),
|
|
1252
|
-
name: errorCode,
|
|
1253
|
-
$metadata: deserializeMetadata(output),
|
|
1254
|
-
};
|
|
1255
|
-
break;
|
|
718
|
+
throw await deserializeAws_json1_1UnsupportedDocumentExceptionResponse(parsedOutput, context);
|
|
1256
719
|
default:
|
|
1257
720
|
const parsedBody = parsedOutput.body;
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
...parsedBody,
|
|
1261
|
-
name: `${errorCode}`,
|
|
1262
|
-
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
721
|
+
response = new TextractServiceException_1.TextractServiceException({
|
|
722
|
+
name: parsedBody.code || parsedBody.Code || errorCode,
|
|
1263
723
|
$fault: "client",
|
|
1264
724
|
$metadata: deserializeMetadata(output),
|
|
1265
|
-
};
|
|
725
|
+
});
|
|
726
|
+
throw smithy_client_1.decorateServiceException(response, parsedBody);
|
|
1266
727
|
}
|
|
1267
|
-
const message = response.message || response.Message || errorCode;
|
|
1268
|
-
response.message = message;
|
|
1269
|
-
delete response.Message;
|
|
1270
|
-
return Promise.reject(Object.assign(new Error(message), response));
|
|
1271
728
|
};
|
|
1272
729
|
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
1273
730
|
const body = parsedOutput.body;
|
|
1274
731
|
const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
1275
|
-
const
|
|
1276
|
-
name: "AccessDeniedException",
|
|
1277
|
-
$fault: "client",
|
|
732
|
+
const exception = new models_0_1.AccessDeniedException({
|
|
1278
733
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1279
734
|
...deserialized,
|
|
1280
|
-
};
|
|
1281
|
-
return
|
|
735
|
+
});
|
|
736
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1282
737
|
};
|
|
1283
738
|
const deserializeAws_json1_1BadDocumentExceptionResponse = async (parsedOutput, context) => {
|
|
1284
739
|
const body = parsedOutput.body;
|
|
1285
740
|
const deserialized = deserializeAws_json1_1BadDocumentException(body, context);
|
|
1286
|
-
const
|
|
1287
|
-
name: "BadDocumentException",
|
|
1288
|
-
$fault: "client",
|
|
741
|
+
const exception = new models_0_1.BadDocumentException({
|
|
1289
742
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1290
743
|
...deserialized,
|
|
1291
|
-
};
|
|
1292
|
-
return
|
|
744
|
+
});
|
|
745
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1293
746
|
};
|
|
1294
747
|
const deserializeAws_json1_1DocumentTooLargeExceptionResponse = async (parsedOutput, context) => {
|
|
1295
748
|
const body = parsedOutput.body;
|
|
1296
749
|
const deserialized = deserializeAws_json1_1DocumentTooLargeException(body, context);
|
|
1297
|
-
const
|
|
1298
|
-
name: "DocumentTooLargeException",
|
|
1299
|
-
$fault: "client",
|
|
750
|
+
const exception = new models_0_1.DocumentTooLargeException({
|
|
1300
751
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1301
752
|
...deserialized,
|
|
1302
|
-
};
|
|
1303
|
-
return
|
|
753
|
+
});
|
|
754
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1304
755
|
};
|
|
1305
756
|
const deserializeAws_json1_1HumanLoopQuotaExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1306
757
|
const body = parsedOutput.body;
|
|
1307
758
|
const deserialized = deserializeAws_json1_1HumanLoopQuotaExceededException(body, context);
|
|
1308
|
-
const
|
|
1309
|
-
name: "HumanLoopQuotaExceededException",
|
|
1310
|
-
$fault: "client",
|
|
759
|
+
const exception = new models_0_1.HumanLoopQuotaExceededException({
|
|
1311
760
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1312
761
|
...deserialized,
|
|
1313
|
-
};
|
|
1314
|
-
return
|
|
762
|
+
});
|
|
763
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1315
764
|
};
|
|
1316
765
|
const deserializeAws_json1_1IdempotentParameterMismatchExceptionResponse = async (parsedOutput, context) => {
|
|
1317
766
|
const body = parsedOutput.body;
|
|
1318
767
|
const deserialized = deserializeAws_json1_1IdempotentParameterMismatchException(body, context);
|
|
1319
|
-
const
|
|
1320
|
-
name: "IdempotentParameterMismatchException",
|
|
1321
|
-
$fault: "client",
|
|
768
|
+
const exception = new models_0_1.IdempotentParameterMismatchException({
|
|
1322
769
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1323
770
|
...deserialized,
|
|
1324
|
-
};
|
|
1325
|
-
return
|
|
771
|
+
});
|
|
772
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1326
773
|
};
|
|
1327
774
|
const deserializeAws_json1_1InternalServerErrorResponse = async (parsedOutput, context) => {
|
|
1328
775
|
const body = parsedOutput.body;
|
|
1329
776
|
const deserialized = deserializeAws_json1_1InternalServerError(body, context);
|
|
1330
|
-
const
|
|
1331
|
-
name: "InternalServerError",
|
|
1332
|
-
$fault: "server",
|
|
777
|
+
const exception = new models_0_1.InternalServerError({
|
|
1333
778
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1334
779
|
...deserialized,
|
|
1335
|
-
};
|
|
1336
|
-
return
|
|
780
|
+
});
|
|
781
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1337
782
|
};
|
|
1338
783
|
const deserializeAws_json1_1InvalidJobIdExceptionResponse = async (parsedOutput, context) => {
|
|
1339
784
|
const body = parsedOutput.body;
|
|
1340
785
|
const deserialized = deserializeAws_json1_1InvalidJobIdException(body, context);
|
|
1341
|
-
const
|
|
1342
|
-
name: "InvalidJobIdException",
|
|
1343
|
-
$fault: "client",
|
|
786
|
+
const exception = new models_0_1.InvalidJobIdException({
|
|
1344
787
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1345
788
|
...deserialized,
|
|
1346
|
-
};
|
|
1347
|
-
return
|
|
789
|
+
});
|
|
790
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1348
791
|
};
|
|
1349
792
|
const deserializeAws_json1_1InvalidKMSKeyExceptionResponse = async (parsedOutput, context) => {
|
|
1350
793
|
const body = parsedOutput.body;
|
|
1351
794
|
const deserialized = deserializeAws_json1_1InvalidKMSKeyException(body, context);
|
|
1352
|
-
const
|
|
1353
|
-
name: "InvalidKMSKeyException",
|
|
1354
|
-
$fault: "client",
|
|
795
|
+
const exception = new models_0_1.InvalidKMSKeyException({
|
|
1355
796
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1356
797
|
...deserialized,
|
|
1357
|
-
};
|
|
1358
|
-
return
|
|
798
|
+
});
|
|
799
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1359
800
|
};
|
|
1360
801
|
const deserializeAws_json1_1InvalidParameterExceptionResponse = async (parsedOutput, context) => {
|
|
1361
802
|
const body = parsedOutput.body;
|
|
1362
803
|
const deserialized = deserializeAws_json1_1InvalidParameterException(body, context);
|
|
1363
|
-
const
|
|
1364
|
-
name: "InvalidParameterException",
|
|
1365
|
-
$fault: "client",
|
|
804
|
+
const exception = new models_0_1.InvalidParameterException({
|
|
1366
805
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1367
806
|
...deserialized,
|
|
1368
|
-
};
|
|
1369
|
-
return
|
|
807
|
+
});
|
|
808
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1370
809
|
};
|
|
1371
810
|
const deserializeAws_json1_1InvalidS3ObjectExceptionResponse = async (parsedOutput, context) => {
|
|
1372
811
|
const body = parsedOutput.body;
|
|
1373
812
|
const deserialized = deserializeAws_json1_1InvalidS3ObjectException(body, context);
|
|
1374
|
-
const
|
|
1375
|
-
name: "InvalidS3ObjectException",
|
|
1376
|
-
$fault: "client",
|
|
813
|
+
const exception = new models_0_1.InvalidS3ObjectException({
|
|
1377
814
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1378
815
|
...deserialized,
|
|
1379
|
-
};
|
|
1380
|
-
return
|
|
816
|
+
});
|
|
817
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1381
818
|
};
|
|
1382
819
|
const deserializeAws_json1_1LimitExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1383
820
|
const body = parsedOutput.body;
|
|
1384
821
|
const deserialized = deserializeAws_json1_1LimitExceededException(body, context);
|
|
1385
|
-
const
|
|
1386
|
-
name: "LimitExceededException",
|
|
1387
|
-
$fault: "client",
|
|
822
|
+
const exception = new models_0_1.LimitExceededException({
|
|
1388
823
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1389
824
|
...deserialized,
|
|
1390
|
-
};
|
|
1391
|
-
return
|
|
825
|
+
});
|
|
826
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1392
827
|
};
|
|
1393
828
|
const deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse = async (parsedOutput, context) => {
|
|
1394
829
|
const body = parsedOutput.body;
|
|
1395
830
|
const deserialized = deserializeAws_json1_1ProvisionedThroughputExceededException(body, context);
|
|
1396
|
-
const
|
|
1397
|
-
name: "ProvisionedThroughputExceededException",
|
|
1398
|
-
$fault: "client",
|
|
831
|
+
const exception = new models_0_1.ProvisionedThroughputExceededException({
|
|
1399
832
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1400
833
|
...deserialized,
|
|
1401
|
-
};
|
|
1402
|
-
return
|
|
834
|
+
});
|
|
835
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1403
836
|
};
|
|
1404
837
|
const deserializeAws_json1_1ThrottlingExceptionResponse = async (parsedOutput, context) => {
|
|
1405
838
|
const body = parsedOutput.body;
|
|
1406
839
|
const deserialized = deserializeAws_json1_1ThrottlingException(body, context);
|
|
1407
|
-
const
|
|
1408
|
-
name: "ThrottlingException",
|
|
1409
|
-
$fault: "server",
|
|
840
|
+
const exception = new models_0_1.ThrottlingException({
|
|
1410
841
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1411
842
|
...deserialized,
|
|
1412
|
-
};
|
|
1413
|
-
return
|
|
843
|
+
});
|
|
844
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1414
845
|
};
|
|
1415
846
|
const deserializeAws_json1_1UnsupportedDocumentExceptionResponse = async (parsedOutput, context) => {
|
|
1416
847
|
const body = parsedOutput.body;
|
|
1417
848
|
const deserialized = deserializeAws_json1_1UnsupportedDocumentException(body, context);
|
|
1418
|
-
const
|
|
1419
|
-
name: "UnsupportedDocumentException",
|
|
1420
|
-
$fault: "client",
|
|
849
|
+
const exception = new models_0_1.UnsupportedDocumentException({
|
|
1421
850
|
$metadata: deserializeMetadata(parsedOutput),
|
|
1422
851
|
...deserialized,
|
|
1423
|
-
};
|
|
1424
|
-
return
|
|
852
|
+
});
|
|
853
|
+
return smithy_client_1.decorateServiceException(exception, body);
|
|
1425
854
|
};
|
|
1426
855
|
const serializeAws_json1_1AnalyzeDocumentRequest = (input, context) => {
|
|
1427
856
|
return {
|
|
@@ -1694,7 +1123,7 @@ const deserializeAws_json1_1Block = (output, context) => {
|
|
|
1694
1123
|
};
|
|
1695
1124
|
};
|
|
1696
1125
|
const deserializeAws_json1_1BlockList = (output, context) => {
|
|
1697
|
-
|
|
1126
|
+
const retVal = (output || [])
|
|
1698
1127
|
.filter((e) => e != null)
|
|
1699
1128
|
.map((entry) => {
|
|
1700
1129
|
if (entry === null) {
|
|
@@ -1702,6 +1131,7 @@ const deserializeAws_json1_1BlockList = (output, context) => {
|
|
|
1702
1131
|
}
|
|
1703
1132
|
return deserializeAws_json1_1Block(entry, context);
|
|
1704
1133
|
});
|
|
1134
|
+
return retVal;
|
|
1705
1135
|
};
|
|
1706
1136
|
const deserializeAws_json1_1BoundingBox = (output, context) => {
|
|
1707
1137
|
return {
|
|
@@ -1734,7 +1164,7 @@ const deserializeAws_json1_1DocumentTooLargeException = (output, context) => {
|
|
|
1734
1164
|
};
|
|
1735
1165
|
};
|
|
1736
1166
|
const deserializeAws_json1_1EntityTypes = (output, context) => {
|
|
1737
|
-
|
|
1167
|
+
const retVal = (output || [])
|
|
1738
1168
|
.filter((e) => e != null)
|
|
1739
1169
|
.map((entry) => {
|
|
1740
1170
|
if (entry === null) {
|
|
@@ -1742,6 +1172,7 @@ const deserializeAws_json1_1EntityTypes = (output, context) => {
|
|
|
1742
1172
|
}
|
|
1743
1173
|
return smithy_client_1.expectString(entry);
|
|
1744
1174
|
});
|
|
1175
|
+
return retVal;
|
|
1745
1176
|
};
|
|
1746
1177
|
const deserializeAws_json1_1ExpenseDetection = (output, context) => {
|
|
1747
1178
|
return {
|
|
@@ -1764,7 +1195,7 @@ const deserializeAws_json1_1ExpenseDocument = (output, context) => {
|
|
|
1764
1195
|
};
|
|
1765
1196
|
};
|
|
1766
1197
|
const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
|
|
1767
|
-
|
|
1198
|
+
const retVal = (output || [])
|
|
1768
1199
|
.filter((e) => e != null)
|
|
1769
1200
|
.map((entry) => {
|
|
1770
1201
|
if (entry === null) {
|
|
@@ -1772,6 +1203,7 @@ const deserializeAws_json1_1ExpenseDocumentList = (output, context) => {
|
|
|
1772
1203
|
}
|
|
1773
1204
|
return deserializeAws_json1_1ExpenseDocument(entry, context);
|
|
1774
1205
|
});
|
|
1206
|
+
return retVal;
|
|
1775
1207
|
};
|
|
1776
1208
|
const deserializeAws_json1_1ExpenseField = (output, context) => {
|
|
1777
1209
|
return {
|
|
@@ -1788,7 +1220,7 @@ const deserializeAws_json1_1ExpenseField = (output, context) => {
|
|
|
1788
1220
|
};
|
|
1789
1221
|
};
|
|
1790
1222
|
const deserializeAws_json1_1ExpenseFieldList = (output, context) => {
|
|
1791
|
-
|
|
1223
|
+
const retVal = (output || [])
|
|
1792
1224
|
.filter((e) => e != null)
|
|
1793
1225
|
.map((entry) => {
|
|
1794
1226
|
if (entry === null) {
|
|
@@ -1796,6 +1228,7 @@ const deserializeAws_json1_1ExpenseFieldList = (output, context) => {
|
|
|
1796
1228
|
}
|
|
1797
1229
|
return deserializeAws_json1_1ExpenseField(entry, context);
|
|
1798
1230
|
});
|
|
1231
|
+
return retVal;
|
|
1799
1232
|
};
|
|
1800
1233
|
const deserializeAws_json1_1ExpenseType = (output, context) => {
|
|
1801
1234
|
return {
|
|
@@ -1877,7 +1310,7 @@ const deserializeAws_json1_1HumanLoopActivationOutput = (output, context) => {
|
|
|
1877
1310
|
};
|
|
1878
1311
|
};
|
|
1879
1312
|
const deserializeAws_json1_1HumanLoopActivationReasons = (output, context) => {
|
|
1880
|
-
|
|
1313
|
+
const retVal = (output || [])
|
|
1881
1314
|
.filter((e) => e != null)
|
|
1882
1315
|
.map((entry) => {
|
|
1883
1316
|
if (entry === null) {
|
|
@@ -1885,6 +1318,7 @@ const deserializeAws_json1_1HumanLoopActivationReasons = (output, context) => {
|
|
|
1885
1318
|
}
|
|
1886
1319
|
return smithy_client_1.expectString(entry);
|
|
1887
1320
|
});
|
|
1321
|
+
return retVal;
|
|
1888
1322
|
};
|
|
1889
1323
|
const deserializeAws_json1_1HumanLoopQuotaExceededException = (output, context) => {
|
|
1890
1324
|
return {
|
|
@@ -1920,7 +1354,7 @@ const deserializeAws_json1_1IdentityDocumentField = (output, context) => {
|
|
|
1920
1354
|
};
|
|
1921
1355
|
};
|
|
1922
1356
|
const deserializeAws_json1_1IdentityDocumentFieldList = (output, context) => {
|
|
1923
|
-
|
|
1357
|
+
const retVal = (output || [])
|
|
1924
1358
|
.filter((e) => e != null)
|
|
1925
1359
|
.map((entry) => {
|
|
1926
1360
|
if (entry === null) {
|
|
@@ -1928,9 +1362,10 @@ const deserializeAws_json1_1IdentityDocumentFieldList = (output, context) => {
|
|
|
1928
1362
|
}
|
|
1929
1363
|
return deserializeAws_json1_1IdentityDocumentField(entry, context);
|
|
1930
1364
|
});
|
|
1365
|
+
return retVal;
|
|
1931
1366
|
};
|
|
1932
1367
|
const deserializeAws_json1_1IdentityDocumentList = (output, context) => {
|
|
1933
|
-
|
|
1368
|
+
const retVal = (output || [])
|
|
1934
1369
|
.filter((e) => e != null)
|
|
1935
1370
|
.map((entry) => {
|
|
1936
1371
|
if (entry === null) {
|
|
@@ -1938,9 +1373,10 @@ const deserializeAws_json1_1IdentityDocumentList = (output, context) => {
|
|
|
1938
1373
|
}
|
|
1939
1374
|
return deserializeAws_json1_1IdentityDocument(entry, context);
|
|
1940
1375
|
});
|
|
1376
|
+
return retVal;
|
|
1941
1377
|
};
|
|
1942
1378
|
const deserializeAws_json1_1IdList = (output, context) => {
|
|
1943
|
-
|
|
1379
|
+
const retVal = (output || [])
|
|
1944
1380
|
.filter((e) => e != null)
|
|
1945
1381
|
.map((entry) => {
|
|
1946
1382
|
if (entry === null) {
|
|
@@ -1948,6 +1384,7 @@ const deserializeAws_json1_1IdList = (output, context) => {
|
|
|
1948
1384
|
}
|
|
1949
1385
|
return smithy_client_1.expectString(entry);
|
|
1950
1386
|
});
|
|
1387
|
+
return retVal;
|
|
1951
1388
|
};
|
|
1952
1389
|
const deserializeAws_json1_1InternalServerError = (output, context) => {
|
|
1953
1390
|
return {
|
|
@@ -2001,7 +1438,7 @@ const deserializeAws_json1_1LineItemGroup = (output, context) => {
|
|
|
2001
1438
|
};
|
|
2002
1439
|
};
|
|
2003
1440
|
const deserializeAws_json1_1LineItemGroupList = (output, context) => {
|
|
2004
|
-
|
|
1441
|
+
const retVal = (output || [])
|
|
2005
1442
|
.filter((e) => e != null)
|
|
2006
1443
|
.map((entry) => {
|
|
2007
1444
|
if (entry === null) {
|
|
@@ -2009,9 +1446,10 @@ const deserializeAws_json1_1LineItemGroupList = (output, context) => {
|
|
|
2009
1446
|
}
|
|
2010
1447
|
return deserializeAws_json1_1LineItemGroup(entry, context);
|
|
2011
1448
|
});
|
|
1449
|
+
return retVal;
|
|
2012
1450
|
};
|
|
2013
1451
|
const deserializeAws_json1_1LineItemList = (output, context) => {
|
|
2014
|
-
|
|
1452
|
+
const retVal = (output || [])
|
|
2015
1453
|
.filter((e) => e != null)
|
|
2016
1454
|
.map((entry) => {
|
|
2017
1455
|
if (entry === null) {
|
|
@@ -2019,6 +1457,7 @@ const deserializeAws_json1_1LineItemList = (output, context) => {
|
|
|
2019
1457
|
}
|
|
2020
1458
|
return deserializeAws_json1_1LineItemFields(entry, context);
|
|
2021
1459
|
});
|
|
1460
|
+
return retVal;
|
|
2022
1461
|
};
|
|
2023
1462
|
const deserializeAws_json1_1NormalizedValue = (output, context) => {
|
|
2024
1463
|
return {
|
|
@@ -2027,7 +1466,7 @@ const deserializeAws_json1_1NormalizedValue = (output, context) => {
|
|
|
2027
1466
|
};
|
|
2028
1467
|
};
|
|
2029
1468
|
const deserializeAws_json1_1Pages = (output, context) => {
|
|
2030
|
-
|
|
1469
|
+
const retVal = (output || [])
|
|
2031
1470
|
.filter((e) => e != null)
|
|
2032
1471
|
.map((entry) => {
|
|
2033
1472
|
if (entry === null) {
|
|
@@ -2035,6 +1474,7 @@ const deserializeAws_json1_1Pages = (output, context) => {
|
|
|
2035
1474
|
}
|
|
2036
1475
|
return smithy_client_1.expectInt32(entry);
|
|
2037
1476
|
});
|
|
1477
|
+
return retVal;
|
|
2038
1478
|
};
|
|
2039
1479
|
const deserializeAws_json1_1Point = (output, context) => {
|
|
2040
1480
|
return {
|
|
@@ -2043,7 +1483,7 @@ const deserializeAws_json1_1Point = (output, context) => {
|
|
|
2043
1483
|
};
|
|
2044
1484
|
};
|
|
2045
1485
|
const deserializeAws_json1_1Polygon = (output, context) => {
|
|
2046
|
-
|
|
1486
|
+
const retVal = (output || [])
|
|
2047
1487
|
.filter((e) => e != null)
|
|
2048
1488
|
.map((entry) => {
|
|
2049
1489
|
if (entry === null) {
|
|
@@ -2051,6 +1491,7 @@ const deserializeAws_json1_1Polygon = (output, context) => {
|
|
|
2051
1491
|
}
|
|
2052
1492
|
return deserializeAws_json1_1Point(entry, context);
|
|
2053
1493
|
});
|
|
1494
|
+
return retVal;
|
|
2054
1495
|
};
|
|
2055
1496
|
const deserializeAws_json1_1ProvisionedThroughputExceededException = (output, context) => {
|
|
2056
1497
|
return {
|
|
@@ -2065,7 +1506,7 @@ const deserializeAws_json1_1Relationship = (output, context) => {
|
|
|
2065
1506
|
};
|
|
2066
1507
|
};
|
|
2067
1508
|
const deserializeAws_json1_1RelationshipList = (output, context) => {
|
|
2068
|
-
|
|
1509
|
+
const retVal = (output || [])
|
|
2069
1510
|
.filter((e) => e != null)
|
|
2070
1511
|
.map((entry) => {
|
|
2071
1512
|
if (entry === null) {
|
|
@@ -2073,6 +1514,7 @@ const deserializeAws_json1_1RelationshipList = (output, context) => {
|
|
|
2073
1514
|
}
|
|
2074
1515
|
return deserializeAws_json1_1Relationship(entry, context);
|
|
2075
1516
|
});
|
|
1517
|
+
return retVal;
|
|
2076
1518
|
};
|
|
2077
1519
|
const deserializeAws_json1_1StartDocumentAnalysisResponse = (output, context) => {
|
|
2078
1520
|
return {
|
|
@@ -2110,7 +1552,7 @@ const deserializeAws_json1_1Warning = (output, context) => {
|
|
|
2110
1552
|
};
|
|
2111
1553
|
};
|
|
2112
1554
|
const deserializeAws_json1_1Warnings = (output, context) => {
|
|
2113
|
-
|
|
1555
|
+
const retVal = (output || [])
|
|
2114
1556
|
.filter((e) => e != null)
|
|
2115
1557
|
.map((entry) => {
|
|
2116
1558
|
if (entry === null) {
|
|
@@ -2118,6 +1560,7 @@ const deserializeAws_json1_1Warnings = (output, context) => {
|
|
|
2118
1560
|
}
|
|
2119
1561
|
return deserializeAws_json1_1Warning(entry, context);
|
|
2120
1562
|
});
|
|
1563
|
+
return retVal;
|
|
2121
1564
|
};
|
|
2122
1565
|
const deserializeMetadata = (output) => {
|
|
2123
1566
|
var _a;
|