@aws-sdk/client-rekognition 3.39.0 → 3.43.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 +39 -0
- package/dist-cjs/Rekognition.js +105 -0
- package/dist-cjs/commands/CreateDatasetCommand.js +36 -0
- package/dist-cjs/commands/DeleteDatasetCommand.js +36 -0
- package/dist-cjs/commands/DescribeDatasetCommand.js +36 -0
- package/dist-cjs/commands/DistributeDatasetEntriesCommand.js +36 -0
- package/dist-cjs/commands/ListDatasetEntriesCommand.js +36 -0
- package/dist-cjs/commands/ListDatasetLabelsCommand.js +36 -0
- package/dist-cjs/commands/UpdateDatasetEntriesCommand.js +36 -0
- package/dist-cjs/commands/index.js +7 -0
- package/dist-cjs/endpoints.js +157 -24
- package/dist-cjs/models/models_0.js +170 -16
- package/dist-cjs/pagination/ListDatasetEntriesPaginator.js +35 -0
- package/dist-cjs/pagination/ListDatasetLabelsPaginator.js +35 -0
- package/dist-cjs/pagination/index.js +2 -0
- package/dist-cjs/protocols/Aws_json1_1.js +1077 -54
- package/dist-cjs/runtimeConfig.browser.js +6 -3
- package/dist-cjs/runtimeConfig.js +5 -3
- package/dist-es/Rekognition.js +105 -0
- package/dist-es/commands/CreateDatasetCommand.js +39 -0
- package/dist-es/commands/DeleteDatasetCommand.js +39 -0
- package/dist-es/commands/DescribeDatasetCommand.js +39 -0
- package/dist-es/commands/DistributeDatasetEntriesCommand.js +39 -0
- package/dist-es/commands/ListDatasetEntriesCommand.js +39 -0
- package/dist-es/commands/ListDatasetLabelsCommand.js +39 -0
- package/dist-es/commands/UpdateDatasetEntriesCommand.js +39 -0
- package/dist-es/commands/index.js +7 -0
- package/dist-es/endpoints.js +157 -24
- package/dist-es/models/models_0.js +117 -8
- package/dist-es/pagination/ListDatasetEntriesPaginator.js +74 -0
- package/dist-es/pagination/ListDatasetLabelsPaginator.js +74 -0
- package/dist-es/pagination/index.js +2 -0
- package/dist-es/protocols/Aws_json1_1.js +1111 -51
- package/dist-es/runtimeConfig.browser.js +3 -2
- package/dist-es/runtimeConfig.js +3 -3
- package/dist-types/Rekognition.d.ts +209 -29
- package/dist-types/RekognitionClient.d.ts +17 -2
- package/dist-types/commands/CompareFacesCommand.d.ts +1 -1
- package/dist-types/commands/CreateCollectionCommand.d.ts +1 -1
- package/dist-types/commands/CreateDatasetCommand.d.ts +59 -0
- package/dist-types/commands/CreateProjectCommand.d.ts +3 -3
- package/dist-types/commands/CreateProjectVersionCommand.d.ts +33 -5
- package/dist-types/commands/CreateStreamProcessorCommand.d.ts +1 -1
- package/dist-types/commands/DeleteCollectionCommand.d.ts +1 -1
- package/dist-types/commands/DeleteDatasetCommand.d.ts +44 -0
- package/dist-types/commands/DeleteFacesCommand.d.ts +1 -1
- package/dist-types/commands/DeleteProjectCommand.d.ts +5 -1
- package/dist-types/commands/DeleteProjectVersionCommand.d.ts +1 -1
- package/dist-types/commands/DeleteStreamProcessorCommand.d.ts +1 -1
- package/dist-types/commands/DescribeCollectionCommand.d.ts +1 -1
- package/dist-types/commands/DescribeDatasetCommand.d.ts +39 -0
- package/dist-types/commands/DescribeProjectVersionsCommand.d.ts +3 -3
- package/dist-types/commands/DescribeProjectsCommand.d.ts +2 -2
- package/dist-types/commands/DescribeStreamProcessorCommand.d.ts +1 -1
- package/dist-types/commands/DetectCustomLabelsCommand.d.ts +1 -1
- package/dist-types/commands/DetectFacesCommand.d.ts +1 -1
- package/dist-types/commands/DetectLabelsCommand.d.ts +1 -1
- package/dist-types/commands/DetectModerationLabelsCommand.d.ts +1 -1
- package/dist-types/commands/DetectProtectiveEquipmentCommand.d.ts +1 -1
- package/dist-types/commands/DetectTextCommand.d.ts +1 -1
- package/dist-types/commands/DistributeDatasetEntriesCommand.d.ts +46 -0
- package/dist-types/commands/GetCelebrityInfoCommand.d.ts +1 -1
- package/dist-types/commands/GetCelebrityRecognitionCommand.d.ts +23 -18
- package/dist-types/commands/GetContentModerationCommand.d.ts +1 -1
- package/dist-types/commands/GetFaceDetectionCommand.d.ts +1 -1
- package/dist-types/commands/GetFaceSearchCommand.d.ts +1 -1
- package/dist-types/commands/GetLabelDetectionCommand.d.ts +1 -1
- package/dist-types/commands/GetPersonTrackingCommand.d.ts +1 -1
- package/dist-types/commands/GetSegmentDetectionCommand.d.ts +1 -1
- package/dist-types/commands/GetTextDetectionCommand.d.ts +1 -1
- package/dist-types/commands/IndexFacesCommand.d.ts +1 -1
- package/dist-types/commands/ListCollectionsCommand.d.ts +1 -1
- package/dist-types/commands/ListDatasetEntriesCommand.d.ts +49 -0
- package/dist-types/commands/ListDatasetLabelsCommand.d.ts +40 -0
- package/dist-types/commands/ListFacesCommand.d.ts +1 -1
- package/dist-types/commands/ListStreamProcessorsCommand.d.ts +1 -1
- package/dist-types/commands/ListTagsForResourceCommand.d.ts +1 -1
- package/dist-types/commands/RecognizeCelebritiesCommand.d.ts +4 -4
- package/dist-types/commands/SearchFacesByImageCommand.d.ts +1 -1
- package/dist-types/commands/SearchFacesCommand.d.ts +1 -1
- package/dist-types/commands/StartCelebrityRecognitionCommand.d.ts +1 -1
- package/dist-types/commands/StartContentModerationCommand.d.ts +1 -1
- package/dist-types/commands/StartFaceDetectionCommand.d.ts +1 -1
- package/dist-types/commands/StartFaceSearchCommand.d.ts +1 -1
- package/dist-types/commands/StartLabelDetectionCommand.d.ts +1 -1
- package/dist-types/commands/StartPersonTrackingCommand.d.ts +1 -1
- package/dist-types/commands/StartProjectVersionCommand.d.ts +1 -1
- package/dist-types/commands/StartSegmentDetectionCommand.d.ts +1 -1
- package/dist-types/commands/StartStreamProcessorCommand.d.ts +1 -1
- package/dist-types/commands/StartTextDetectionCommand.d.ts +1 -1
- package/dist-types/commands/StopProjectVersionCommand.d.ts +1 -1
- package/dist-types/commands/StopStreamProcessorCommand.d.ts +1 -1
- package/dist-types/commands/TagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UntagResourceCommand.d.ts +1 -1
- package/dist-types/commands/UpdateDatasetEntriesCommand.d.ts +62 -0
- package/dist-types/commands/index.d.ts +7 -0
- package/dist-types/models/models_0.d.ts +622 -51
- package/dist-types/pagination/ListDatasetEntriesPaginator.d.ts +4 -0
- package/dist-types/pagination/ListDatasetLabelsPaginator.d.ts +4 -0
- package/dist-types/pagination/index.d.ts +2 -0
- package/dist-types/protocols/Aws_json1_1.d.ts +21 -0
- package/dist-types/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/runtimeConfig.d.ts +2 -0
- package/dist-types/runtimeConfig.native.d.ts +2 -0
- package/dist-types/ts3.4/Rekognition.d.ts +35 -0
- package/dist-types/ts3.4/RekognitionClient.d.ts +13 -2
- package/dist-types/ts3.4/commands/CreateDatasetCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DeleteDatasetCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DescribeDatasetCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/DistributeDatasetEntriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDatasetEntriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/ListDatasetLabelsCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/UpdateDatasetEntriesCommand.d.ts +17 -0
- package/dist-types/ts3.4/commands/index.d.ts +7 -0
- package/dist-types/ts3.4/models/models_0.d.ts +283 -23
- package/dist-types/ts3.4/pagination/ListDatasetEntriesPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/ListDatasetLabelsPaginator.d.ts +4 -0
- package/dist-types/ts3.4/pagination/index.d.ts +2 -0
- package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +21 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
- package/package.json +24 -24
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.
|
|
5
|
-
exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = void 0;
|
|
3
|
+
exports.serializeAws_json1_1StartProjectVersionCommand = exports.serializeAws_json1_1StartPersonTrackingCommand = exports.serializeAws_json1_1StartLabelDetectionCommand = exports.serializeAws_json1_1StartFaceSearchCommand = exports.serializeAws_json1_1StartFaceDetectionCommand = exports.serializeAws_json1_1StartContentModerationCommand = exports.serializeAws_json1_1StartCelebrityRecognitionCommand = exports.serializeAws_json1_1SearchFacesByImageCommand = exports.serializeAws_json1_1SearchFacesCommand = exports.serializeAws_json1_1RecognizeCelebritiesCommand = exports.serializeAws_json1_1ListTagsForResourceCommand = exports.serializeAws_json1_1ListStreamProcessorsCommand = exports.serializeAws_json1_1ListFacesCommand = exports.serializeAws_json1_1ListDatasetLabelsCommand = exports.serializeAws_json1_1ListDatasetEntriesCommand = exports.serializeAws_json1_1ListCollectionsCommand = exports.serializeAws_json1_1IndexFacesCommand = exports.serializeAws_json1_1GetTextDetectionCommand = exports.serializeAws_json1_1GetSegmentDetectionCommand = exports.serializeAws_json1_1GetPersonTrackingCommand = exports.serializeAws_json1_1GetLabelDetectionCommand = exports.serializeAws_json1_1GetFaceSearchCommand = exports.serializeAws_json1_1GetFaceDetectionCommand = exports.serializeAws_json1_1GetContentModerationCommand = exports.serializeAws_json1_1GetCelebrityRecognitionCommand = exports.serializeAws_json1_1GetCelebrityInfoCommand = exports.serializeAws_json1_1DistributeDatasetEntriesCommand = exports.serializeAws_json1_1DetectTextCommand = exports.serializeAws_json1_1DetectProtectiveEquipmentCommand = exports.serializeAws_json1_1DetectModerationLabelsCommand = exports.serializeAws_json1_1DetectLabelsCommand = exports.serializeAws_json1_1DetectFacesCommand = exports.serializeAws_json1_1DetectCustomLabelsCommand = exports.serializeAws_json1_1DescribeStreamProcessorCommand = exports.serializeAws_json1_1DescribeProjectVersionsCommand = exports.serializeAws_json1_1DescribeProjectsCommand = exports.serializeAws_json1_1DescribeDatasetCommand = exports.serializeAws_json1_1DescribeCollectionCommand = exports.serializeAws_json1_1DeleteStreamProcessorCommand = exports.serializeAws_json1_1DeleteProjectVersionCommand = exports.serializeAws_json1_1DeleteProjectCommand = exports.serializeAws_json1_1DeleteFacesCommand = exports.serializeAws_json1_1DeleteDatasetCommand = exports.serializeAws_json1_1DeleteCollectionCommand = exports.serializeAws_json1_1CreateStreamProcessorCommand = exports.serializeAws_json1_1CreateProjectVersionCommand = exports.serializeAws_json1_1CreateProjectCommand = exports.serializeAws_json1_1CreateDatasetCommand = exports.serializeAws_json1_1CreateCollectionCommand = exports.serializeAws_json1_1CompareFacesCommand = void 0;
|
|
4
|
+
exports.deserializeAws_json1_1SearchFacesCommand = exports.deserializeAws_json1_1RecognizeCelebritiesCommand = exports.deserializeAws_json1_1ListTagsForResourceCommand = exports.deserializeAws_json1_1ListStreamProcessorsCommand = exports.deserializeAws_json1_1ListFacesCommand = exports.deserializeAws_json1_1ListDatasetLabelsCommand = exports.deserializeAws_json1_1ListDatasetEntriesCommand = exports.deserializeAws_json1_1ListCollectionsCommand = exports.deserializeAws_json1_1IndexFacesCommand = exports.deserializeAws_json1_1GetTextDetectionCommand = exports.deserializeAws_json1_1GetSegmentDetectionCommand = exports.deserializeAws_json1_1GetPersonTrackingCommand = exports.deserializeAws_json1_1GetLabelDetectionCommand = exports.deserializeAws_json1_1GetFaceSearchCommand = exports.deserializeAws_json1_1GetFaceDetectionCommand = exports.deserializeAws_json1_1GetContentModerationCommand = exports.deserializeAws_json1_1GetCelebrityRecognitionCommand = exports.deserializeAws_json1_1GetCelebrityInfoCommand = exports.deserializeAws_json1_1DistributeDatasetEntriesCommand = exports.deserializeAws_json1_1DetectTextCommand = exports.deserializeAws_json1_1DetectProtectiveEquipmentCommand = exports.deserializeAws_json1_1DetectModerationLabelsCommand = exports.deserializeAws_json1_1DetectLabelsCommand = exports.deserializeAws_json1_1DetectFacesCommand = exports.deserializeAws_json1_1DetectCustomLabelsCommand = exports.deserializeAws_json1_1DescribeStreamProcessorCommand = exports.deserializeAws_json1_1DescribeProjectVersionsCommand = exports.deserializeAws_json1_1DescribeProjectsCommand = exports.deserializeAws_json1_1DescribeDatasetCommand = exports.deserializeAws_json1_1DescribeCollectionCommand = exports.deserializeAws_json1_1DeleteStreamProcessorCommand = exports.deserializeAws_json1_1DeleteProjectVersionCommand = exports.deserializeAws_json1_1DeleteProjectCommand = exports.deserializeAws_json1_1DeleteFacesCommand = exports.deserializeAws_json1_1DeleteDatasetCommand = exports.deserializeAws_json1_1DeleteCollectionCommand = exports.deserializeAws_json1_1CreateStreamProcessorCommand = exports.deserializeAws_json1_1CreateProjectVersionCommand = exports.deserializeAws_json1_1CreateProjectCommand = exports.deserializeAws_json1_1CreateDatasetCommand = exports.deserializeAws_json1_1CreateCollectionCommand = exports.deserializeAws_json1_1CompareFacesCommand = exports.serializeAws_json1_1UpdateDatasetEntriesCommand = exports.serializeAws_json1_1UntagResourceCommand = exports.serializeAws_json1_1TagResourceCommand = exports.serializeAws_json1_1StopStreamProcessorCommand = exports.serializeAws_json1_1StopProjectVersionCommand = exports.serializeAws_json1_1StartTextDetectionCommand = exports.serializeAws_json1_1StartStreamProcessorCommand = exports.serializeAws_json1_1StartSegmentDetectionCommand = void 0;
|
|
5
|
+
exports.deserializeAws_json1_1UpdateDatasetEntriesCommand = exports.deserializeAws_json1_1UntagResourceCommand = exports.deserializeAws_json1_1TagResourceCommand = exports.deserializeAws_json1_1StopStreamProcessorCommand = exports.deserializeAws_json1_1StopProjectVersionCommand = exports.deserializeAws_json1_1StartTextDetectionCommand = exports.deserializeAws_json1_1StartStreamProcessorCommand = exports.deserializeAws_json1_1StartSegmentDetectionCommand = exports.deserializeAws_json1_1StartProjectVersionCommand = exports.deserializeAws_json1_1StartPersonTrackingCommand = exports.deserializeAws_json1_1StartLabelDetectionCommand = exports.deserializeAws_json1_1StartFaceSearchCommand = exports.deserializeAws_json1_1StartFaceDetectionCommand = exports.deserializeAws_json1_1StartContentModerationCommand = exports.deserializeAws_json1_1StartCelebrityRecognitionCommand = exports.deserializeAws_json1_1SearchFacesByImageCommand = void 0;
|
|
6
6
|
const protocol_http_1 = require("@aws-sdk/protocol-http");
|
|
7
7
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
8
8
|
const serializeAws_json1_1CompareFacesCommand = async (input, context) => {
|
|
@@ -25,6 +25,16 @@ const serializeAws_json1_1CreateCollectionCommand = async (input, context) => {
|
|
|
25
25
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
26
26
|
};
|
|
27
27
|
exports.serializeAws_json1_1CreateCollectionCommand = serializeAws_json1_1CreateCollectionCommand;
|
|
28
|
+
const serializeAws_json1_1CreateDatasetCommand = async (input, context) => {
|
|
29
|
+
const headers = {
|
|
30
|
+
"content-type": "application/x-amz-json-1.1",
|
|
31
|
+
"x-amz-target": "RekognitionService.CreateDataset",
|
|
32
|
+
};
|
|
33
|
+
let body;
|
|
34
|
+
body = JSON.stringify(serializeAws_json1_1CreateDatasetRequest(input, context));
|
|
35
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
36
|
+
};
|
|
37
|
+
exports.serializeAws_json1_1CreateDatasetCommand = serializeAws_json1_1CreateDatasetCommand;
|
|
28
38
|
const serializeAws_json1_1CreateProjectCommand = async (input, context) => {
|
|
29
39
|
const headers = {
|
|
30
40
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -65,6 +75,16 @@ const serializeAws_json1_1DeleteCollectionCommand = async (input, context) => {
|
|
|
65
75
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
66
76
|
};
|
|
67
77
|
exports.serializeAws_json1_1DeleteCollectionCommand = serializeAws_json1_1DeleteCollectionCommand;
|
|
78
|
+
const serializeAws_json1_1DeleteDatasetCommand = async (input, context) => {
|
|
79
|
+
const headers = {
|
|
80
|
+
"content-type": "application/x-amz-json-1.1",
|
|
81
|
+
"x-amz-target": "RekognitionService.DeleteDataset",
|
|
82
|
+
};
|
|
83
|
+
let body;
|
|
84
|
+
body = JSON.stringify(serializeAws_json1_1DeleteDatasetRequest(input, context));
|
|
85
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
86
|
+
};
|
|
87
|
+
exports.serializeAws_json1_1DeleteDatasetCommand = serializeAws_json1_1DeleteDatasetCommand;
|
|
68
88
|
const serializeAws_json1_1DeleteFacesCommand = async (input, context) => {
|
|
69
89
|
const headers = {
|
|
70
90
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -115,6 +135,16 @@ const serializeAws_json1_1DescribeCollectionCommand = async (input, context) =>
|
|
|
115
135
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
116
136
|
};
|
|
117
137
|
exports.serializeAws_json1_1DescribeCollectionCommand = serializeAws_json1_1DescribeCollectionCommand;
|
|
138
|
+
const serializeAws_json1_1DescribeDatasetCommand = async (input, context) => {
|
|
139
|
+
const headers = {
|
|
140
|
+
"content-type": "application/x-amz-json-1.1",
|
|
141
|
+
"x-amz-target": "RekognitionService.DescribeDataset",
|
|
142
|
+
};
|
|
143
|
+
let body;
|
|
144
|
+
body = JSON.stringify(serializeAws_json1_1DescribeDatasetRequest(input, context));
|
|
145
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
146
|
+
};
|
|
147
|
+
exports.serializeAws_json1_1DescribeDatasetCommand = serializeAws_json1_1DescribeDatasetCommand;
|
|
118
148
|
const serializeAws_json1_1DescribeProjectsCommand = async (input, context) => {
|
|
119
149
|
const headers = {
|
|
120
150
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -205,6 +235,16 @@ const serializeAws_json1_1DetectTextCommand = async (input, context) => {
|
|
|
205
235
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
206
236
|
};
|
|
207
237
|
exports.serializeAws_json1_1DetectTextCommand = serializeAws_json1_1DetectTextCommand;
|
|
238
|
+
const serializeAws_json1_1DistributeDatasetEntriesCommand = async (input, context) => {
|
|
239
|
+
const headers = {
|
|
240
|
+
"content-type": "application/x-amz-json-1.1",
|
|
241
|
+
"x-amz-target": "RekognitionService.DistributeDatasetEntries",
|
|
242
|
+
};
|
|
243
|
+
let body;
|
|
244
|
+
body = JSON.stringify(serializeAws_json1_1DistributeDatasetEntriesRequest(input, context));
|
|
245
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
246
|
+
};
|
|
247
|
+
exports.serializeAws_json1_1DistributeDatasetEntriesCommand = serializeAws_json1_1DistributeDatasetEntriesCommand;
|
|
208
248
|
const serializeAws_json1_1GetCelebrityInfoCommand = async (input, context) => {
|
|
209
249
|
const headers = {
|
|
210
250
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -315,6 +355,26 @@ const serializeAws_json1_1ListCollectionsCommand = async (input, context) => {
|
|
|
315
355
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
316
356
|
};
|
|
317
357
|
exports.serializeAws_json1_1ListCollectionsCommand = serializeAws_json1_1ListCollectionsCommand;
|
|
358
|
+
const serializeAws_json1_1ListDatasetEntriesCommand = async (input, context) => {
|
|
359
|
+
const headers = {
|
|
360
|
+
"content-type": "application/x-amz-json-1.1",
|
|
361
|
+
"x-amz-target": "RekognitionService.ListDatasetEntries",
|
|
362
|
+
};
|
|
363
|
+
let body;
|
|
364
|
+
body = JSON.stringify(serializeAws_json1_1ListDatasetEntriesRequest(input, context));
|
|
365
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
366
|
+
};
|
|
367
|
+
exports.serializeAws_json1_1ListDatasetEntriesCommand = serializeAws_json1_1ListDatasetEntriesCommand;
|
|
368
|
+
const serializeAws_json1_1ListDatasetLabelsCommand = async (input, context) => {
|
|
369
|
+
const headers = {
|
|
370
|
+
"content-type": "application/x-amz-json-1.1",
|
|
371
|
+
"x-amz-target": "RekognitionService.ListDatasetLabels",
|
|
372
|
+
};
|
|
373
|
+
let body;
|
|
374
|
+
body = JSON.stringify(serializeAws_json1_1ListDatasetLabelsRequest(input, context));
|
|
375
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
376
|
+
};
|
|
377
|
+
exports.serializeAws_json1_1ListDatasetLabelsCommand = serializeAws_json1_1ListDatasetLabelsCommand;
|
|
318
378
|
const serializeAws_json1_1ListFacesCommand = async (input, context) => {
|
|
319
379
|
const headers = {
|
|
320
380
|
"content-type": "application/x-amz-json-1.1",
|
|
@@ -515,6 +575,16 @@ const serializeAws_json1_1UntagResourceCommand = async (input, context) => {
|
|
|
515
575
|
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
516
576
|
};
|
|
517
577
|
exports.serializeAws_json1_1UntagResourceCommand = serializeAws_json1_1UntagResourceCommand;
|
|
578
|
+
const serializeAws_json1_1UpdateDatasetEntriesCommand = async (input, context) => {
|
|
579
|
+
const headers = {
|
|
580
|
+
"content-type": "application/x-amz-json-1.1",
|
|
581
|
+
"x-amz-target": "RekognitionService.UpdateDatasetEntries",
|
|
582
|
+
};
|
|
583
|
+
let body;
|
|
584
|
+
body = JSON.stringify(serializeAws_json1_1UpdateDatasetEntriesRequest(input, context));
|
|
585
|
+
return buildHttpRpcRequest(context, headers, "/", undefined, body);
|
|
586
|
+
};
|
|
587
|
+
exports.serializeAws_json1_1UpdateDatasetEntriesCommand = serializeAws_json1_1UpdateDatasetEntriesCommand;
|
|
518
588
|
const deserializeAws_json1_1CompareFacesCommand = async (output, context) => {
|
|
519
589
|
if (output.statusCode >= 300) {
|
|
520
590
|
return deserializeAws_json1_1CompareFacesCommandError(output, context);
|
|
@@ -713,6 +783,117 @@ const deserializeAws_json1_1CreateCollectionCommandError = async (output, contex
|
|
|
713
783
|
delete response.Message;
|
|
714
784
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
715
785
|
};
|
|
786
|
+
const deserializeAws_json1_1CreateDatasetCommand = async (output, context) => {
|
|
787
|
+
if (output.statusCode >= 300) {
|
|
788
|
+
return deserializeAws_json1_1CreateDatasetCommandError(output, context);
|
|
789
|
+
}
|
|
790
|
+
const data = await parseBody(output.body, context);
|
|
791
|
+
let contents = {};
|
|
792
|
+
contents = deserializeAws_json1_1CreateDatasetResponse(data, context);
|
|
793
|
+
const response = {
|
|
794
|
+
$metadata: deserializeMetadata(output),
|
|
795
|
+
...contents,
|
|
796
|
+
};
|
|
797
|
+
return Promise.resolve(response);
|
|
798
|
+
};
|
|
799
|
+
exports.deserializeAws_json1_1CreateDatasetCommand = deserializeAws_json1_1CreateDatasetCommand;
|
|
800
|
+
const deserializeAws_json1_1CreateDatasetCommandError = async (output, context) => {
|
|
801
|
+
const parsedOutput = {
|
|
802
|
+
...output,
|
|
803
|
+
body: await parseBody(output.body, context),
|
|
804
|
+
};
|
|
805
|
+
let response;
|
|
806
|
+
let errorCode = "UnknownError";
|
|
807
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
808
|
+
switch (errorCode) {
|
|
809
|
+
case "AccessDeniedException":
|
|
810
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
811
|
+
response = {
|
|
812
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
813
|
+
name: errorCode,
|
|
814
|
+
$metadata: deserializeMetadata(output),
|
|
815
|
+
};
|
|
816
|
+
break;
|
|
817
|
+
case "InternalServerError":
|
|
818
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
819
|
+
response = {
|
|
820
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
821
|
+
name: errorCode,
|
|
822
|
+
$metadata: deserializeMetadata(output),
|
|
823
|
+
};
|
|
824
|
+
break;
|
|
825
|
+
case "InvalidParameterException":
|
|
826
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
827
|
+
response = {
|
|
828
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
829
|
+
name: errorCode,
|
|
830
|
+
$metadata: deserializeMetadata(output),
|
|
831
|
+
};
|
|
832
|
+
break;
|
|
833
|
+
case "InvalidS3ObjectException":
|
|
834
|
+
case "com.amazonaws.rekognition#InvalidS3ObjectException":
|
|
835
|
+
response = {
|
|
836
|
+
...(await deserializeAws_json1_1InvalidS3ObjectExceptionResponse(parsedOutput, context)),
|
|
837
|
+
name: errorCode,
|
|
838
|
+
$metadata: deserializeMetadata(output),
|
|
839
|
+
};
|
|
840
|
+
break;
|
|
841
|
+
case "LimitExceededException":
|
|
842
|
+
case "com.amazonaws.rekognition#LimitExceededException":
|
|
843
|
+
response = {
|
|
844
|
+
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
845
|
+
name: errorCode,
|
|
846
|
+
$metadata: deserializeMetadata(output),
|
|
847
|
+
};
|
|
848
|
+
break;
|
|
849
|
+
case "ProvisionedThroughputExceededException":
|
|
850
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
851
|
+
response = {
|
|
852
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
853
|
+
name: errorCode,
|
|
854
|
+
$metadata: deserializeMetadata(output),
|
|
855
|
+
};
|
|
856
|
+
break;
|
|
857
|
+
case "ResourceAlreadyExistsException":
|
|
858
|
+
case "com.amazonaws.rekognition#ResourceAlreadyExistsException":
|
|
859
|
+
response = {
|
|
860
|
+
...(await deserializeAws_json1_1ResourceAlreadyExistsExceptionResponse(parsedOutput, context)),
|
|
861
|
+
name: errorCode,
|
|
862
|
+
$metadata: deserializeMetadata(output),
|
|
863
|
+
};
|
|
864
|
+
break;
|
|
865
|
+
case "ResourceNotFoundException":
|
|
866
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
867
|
+
response = {
|
|
868
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
869
|
+
name: errorCode,
|
|
870
|
+
$metadata: deserializeMetadata(output),
|
|
871
|
+
};
|
|
872
|
+
break;
|
|
873
|
+
case "ThrottlingException":
|
|
874
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
875
|
+
response = {
|
|
876
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
877
|
+
name: errorCode,
|
|
878
|
+
$metadata: deserializeMetadata(output),
|
|
879
|
+
};
|
|
880
|
+
break;
|
|
881
|
+
default:
|
|
882
|
+
const parsedBody = parsedOutput.body;
|
|
883
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
884
|
+
response = {
|
|
885
|
+
...parsedBody,
|
|
886
|
+
name: `${errorCode}`,
|
|
887
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
888
|
+
$fault: "client",
|
|
889
|
+
$metadata: deserializeMetadata(output),
|
|
890
|
+
};
|
|
891
|
+
}
|
|
892
|
+
const message = response.message || response.Message || errorCode;
|
|
893
|
+
response.message = message;
|
|
894
|
+
delete response.Message;
|
|
895
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
896
|
+
};
|
|
716
897
|
const deserializeAws_json1_1CreateProjectCommand = async (output, context) => {
|
|
717
898
|
if (output.statusCode >= 300) {
|
|
718
899
|
return deserializeAws_json1_1CreateProjectCommandError(output, context);
|
|
@@ -1109,21 +1290,21 @@ const deserializeAws_json1_1DeleteCollectionCommandError = async (output, contex
|
|
|
1109
1290
|
delete response.Message;
|
|
1110
1291
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1111
1292
|
};
|
|
1112
|
-
const
|
|
1293
|
+
const deserializeAws_json1_1DeleteDatasetCommand = async (output, context) => {
|
|
1113
1294
|
if (output.statusCode >= 300) {
|
|
1114
|
-
return
|
|
1295
|
+
return deserializeAws_json1_1DeleteDatasetCommandError(output, context);
|
|
1115
1296
|
}
|
|
1116
1297
|
const data = await parseBody(output.body, context);
|
|
1117
1298
|
let contents = {};
|
|
1118
|
-
contents =
|
|
1299
|
+
contents = deserializeAws_json1_1DeleteDatasetResponse(data, context);
|
|
1119
1300
|
const response = {
|
|
1120
1301
|
$metadata: deserializeMetadata(output),
|
|
1121
1302
|
...contents,
|
|
1122
1303
|
};
|
|
1123
1304
|
return Promise.resolve(response);
|
|
1124
1305
|
};
|
|
1125
|
-
exports.
|
|
1126
|
-
const
|
|
1306
|
+
exports.deserializeAws_json1_1DeleteDatasetCommand = deserializeAws_json1_1DeleteDatasetCommand;
|
|
1307
|
+
const deserializeAws_json1_1DeleteDatasetCommandError = async (output, context) => {
|
|
1127
1308
|
const parsedOutput = {
|
|
1128
1309
|
...output,
|
|
1129
1310
|
body: await parseBody(output.body, context),
|
|
@@ -1156,6 +1337,14 @@ const deserializeAws_json1_1DeleteFacesCommandError = async (output, context) =>
|
|
|
1156
1337
|
$metadata: deserializeMetadata(output),
|
|
1157
1338
|
};
|
|
1158
1339
|
break;
|
|
1340
|
+
case "LimitExceededException":
|
|
1341
|
+
case "com.amazonaws.rekognition#LimitExceededException":
|
|
1342
|
+
response = {
|
|
1343
|
+
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
1344
|
+
name: errorCode,
|
|
1345
|
+
$metadata: deserializeMetadata(output),
|
|
1346
|
+
};
|
|
1347
|
+
break;
|
|
1159
1348
|
case "ProvisionedThroughputExceededException":
|
|
1160
1349
|
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
1161
1350
|
response = {
|
|
@@ -1164,6 +1353,14 @@ const deserializeAws_json1_1DeleteFacesCommandError = async (output, context) =>
|
|
|
1164
1353
|
$metadata: deserializeMetadata(output),
|
|
1165
1354
|
};
|
|
1166
1355
|
break;
|
|
1356
|
+
case "ResourceInUseException":
|
|
1357
|
+
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
1358
|
+
response = {
|
|
1359
|
+
...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
|
|
1360
|
+
name: errorCode,
|
|
1361
|
+
$metadata: deserializeMetadata(output),
|
|
1362
|
+
};
|
|
1363
|
+
break;
|
|
1167
1364
|
case "ResourceNotFoundException":
|
|
1168
1365
|
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
1169
1366
|
response = {
|
|
@@ -1196,21 +1393,21 @@ const deserializeAws_json1_1DeleteFacesCommandError = async (output, context) =>
|
|
|
1196
1393
|
delete response.Message;
|
|
1197
1394
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1198
1395
|
};
|
|
1199
|
-
const
|
|
1396
|
+
const deserializeAws_json1_1DeleteFacesCommand = async (output, context) => {
|
|
1200
1397
|
if (output.statusCode >= 300) {
|
|
1201
|
-
return
|
|
1398
|
+
return deserializeAws_json1_1DeleteFacesCommandError(output, context);
|
|
1202
1399
|
}
|
|
1203
1400
|
const data = await parseBody(output.body, context);
|
|
1204
1401
|
let contents = {};
|
|
1205
|
-
contents =
|
|
1402
|
+
contents = deserializeAws_json1_1DeleteFacesResponse(data, context);
|
|
1206
1403
|
const response = {
|
|
1207
1404
|
$metadata: deserializeMetadata(output),
|
|
1208
1405
|
...contents,
|
|
1209
1406
|
};
|
|
1210
1407
|
return Promise.resolve(response);
|
|
1211
1408
|
};
|
|
1212
|
-
exports.
|
|
1213
|
-
const
|
|
1409
|
+
exports.deserializeAws_json1_1DeleteFacesCommand = deserializeAws_json1_1DeleteFacesCommand;
|
|
1410
|
+
const deserializeAws_json1_1DeleteFacesCommandError = async (output, context) => {
|
|
1214
1411
|
const parsedOutput = {
|
|
1215
1412
|
...output,
|
|
1216
1413
|
body: await parseBody(output.body, context),
|
|
@@ -1251,14 +1448,6 @@ const deserializeAws_json1_1DeleteProjectCommandError = async (output, context)
|
|
|
1251
1448
|
$metadata: deserializeMetadata(output),
|
|
1252
1449
|
};
|
|
1253
1450
|
break;
|
|
1254
|
-
case "ResourceInUseException":
|
|
1255
|
-
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
1256
|
-
response = {
|
|
1257
|
-
...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
|
|
1258
|
-
name: errorCode,
|
|
1259
|
-
$metadata: deserializeMetadata(output),
|
|
1260
|
-
};
|
|
1261
|
-
break;
|
|
1262
1451
|
case "ResourceNotFoundException":
|
|
1263
1452
|
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
1264
1453
|
response = {
|
|
@@ -1291,21 +1480,21 @@ const deserializeAws_json1_1DeleteProjectCommandError = async (output, context)
|
|
|
1291
1480
|
delete response.Message;
|
|
1292
1481
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1293
1482
|
};
|
|
1294
|
-
const
|
|
1483
|
+
const deserializeAws_json1_1DeleteProjectCommand = async (output, context) => {
|
|
1295
1484
|
if (output.statusCode >= 300) {
|
|
1296
|
-
return
|
|
1485
|
+
return deserializeAws_json1_1DeleteProjectCommandError(output, context);
|
|
1297
1486
|
}
|
|
1298
1487
|
const data = await parseBody(output.body, context);
|
|
1299
1488
|
let contents = {};
|
|
1300
|
-
contents =
|
|
1489
|
+
contents = deserializeAws_json1_1DeleteProjectResponse(data, context);
|
|
1301
1490
|
const response = {
|
|
1302
1491
|
$metadata: deserializeMetadata(output),
|
|
1303
1492
|
...contents,
|
|
1304
1493
|
};
|
|
1305
1494
|
return Promise.resolve(response);
|
|
1306
1495
|
};
|
|
1307
|
-
exports.
|
|
1308
|
-
const
|
|
1496
|
+
exports.deserializeAws_json1_1DeleteProjectCommand = deserializeAws_json1_1DeleteProjectCommand;
|
|
1497
|
+
const deserializeAws_json1_1DeleteProjectCommandError = async (output, context) => {
|
|
1309
1498
|
const parsedOutput = {
|
|
1310
1499
|
...output,
|
|
1311
1500
|
body: await parseBody(output.body, context),
|
|
@@ -1386,21 +1575,21 @@ const deserializeAws_json1_1DeleteProjectVersionCommandError = async (output, co
|
|
|
1386
1575
|
delete response.Message;
|
|
1387
1576
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1388
1577
|
};
|
|
1389
|
-
const
|
|
1578
|
+
const deserializeAws_json1_1DeleteProjectVersionCommand = async (output, context) => {
|
|
1390
1579
|
if (output.statusCode >= 300) {
|
|
1391
|
-
return
|
|
1580
|
+
return deserializeAws_json1_1DeleteProjectVersionCommandError(output, context);
|
|
1392
1581
|
}
|
|
1393
1582
|
const data = await parseBody(output.body, context);
|
|
1394
1583
|
let contents = {};
|
|
1395
|
-
contents =
|
|
1584
|
+
contents = deserializeAws_json1_1DeleteProjectVersionResponse(data, context);
|
|
1396
1585
|
const response = {
|
|
1397
1586
|
$metadata: deserializeMetadata(output),
|
|
1398
1587
|
...contents,
|
|
1399
1588
|
};
|
|
1400
1589
|
return Promise.resolve(response);
|
|
1401
1590
|
};
|
|
1402
|
-
exports.
|
|
1403
|
-
const
|
|
1591
|
+
exports.deserializeAws_json1_1DeleteProjectVersionCommand = deserializeAws_json1_1DeleteProjectVersionCommand;
|
|
1592
|
+
const deserializeAws_json1_1DeleteProjectVersionCommandError = async (output, context) => {
|
|
1404
1593
|
const parsedOutput = {
|
|
1405
1594
|
...output,
|
|
1406
1595
|
body: await parseBody(output.body, context),
|
|
@@ -1481,21 +1670,21 @@ const deserializeAws_json1_1DeleteStreamProcessorCommandError = async (output, c
|
|
|
1481
1670
|
delete response.Message;
|
|
1482
1671
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1483
1672
|
};
|
|
1484
|
-
const
|
|
1673
|
+
const deserializeAws_json1_1DeleteStreamProcessorCommand = async (output, context) => {
|
|
1485
1674
|
if (output.statusCode >= 300) {
|
|
1486
|
-
return
|
|
1675
|
+
return deserializeAws_json1_1DeleteStreamProcessorCommandError(output, context);
|
|
1487
1676
|
}
|
|
1488
1677
|
const data = await parseBody(output.body, context);
|
|
1489
1678
|
let contents = {};
|
|
1490
|
-
contents =
|
|
1679
|
+
contents = deserializeAws_json1_1DeleteStreamProcessorResponse(data, context);
|
|
1491
1680
|
const response = {
|
|
1492
1681
|
$metadata: deserializeMetadata(output),
|
|
1493
1682
|
...contents,
|
|
1494
1683
|
};
|
|
1495
1684
|
return Promise.resolve(response);
|
|
1496
1685
|
};
|
|
1497
|
-
exports.
|
|
1498
|
-
const
|
|
1686
|
+
exports.deserializeAws_json1_1DeleteStreamProcessorCommand = deserializeAws_json1_1DeleteStreamProcessorCommand;
|
|
1687
|
+
const deserializeAws_json1_1DeleteStreamProcessorCommandError = async (output, context) => {
|
|
1499
1688
|
const parsedOutput = {
|
|
1500
1689
|
...output,
|
|
1501
1690
|
body: await parseBody(output.body, context),
|
|
@@ -1536,6 +1725,14 @@ const deserializeAws_json1_1DescribeCollectionCommandError = async (output, cont
|
|
|
1536
1725
|
$metadata: deserializeMetadata(output),
|
|
1537
1726
|
};
|
|
1538
1727
|
break;
|
|
1728
|
+
case "ResourceInUseException":
|
|
1729
|
+
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
1730
|
+
response = {
|
|
1731
|
+
...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
|
|
1732
|
+
name: errorCode,
|
|
1733
|
+
$metadata: deserializeMetadata(output),
|
|
1734
|
+
};
|
|
1735
|
+
break;
|
|
1539
1736
|
case "ResourceNotFoundException":
|
|
1540
1737
|
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
1541
1738
|
response = {
|
|
@@ -1568,21 +1765,21 @@ const deserializeAws_json1_1DescribeCollectionCommandError = async (output, cont
|
|
|
1568
1765
|
delete response.Message;
|
|
1569
1766
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1570
1767
|
};
|
|
1571
|
-
const
|
|
1768
|
+
const deserializeAws_json1_1DescribeCollectionCommand = async (output, context) => {
|
|
1572
1769
|
if (output.statusCode >= 300) {
|
|
1573
|
-
return
|
|
1770
|
+
return deserializeAws_json1_1DescribeCollectionCommandError(output, context);
|
|
1574
1771
|
}
|
|
1575
1772
|
const data = await parseBody(output.body, context);
|
|
1576
1773
|
let contents = {};
|
|
1577
|
-
contents =
|
|
1774
|
+
contents = deserializeAws_json1_1DescribeCollectionResponse(data, context);
|
|
1578
1775
|
const response = {
|
|
1579
1776
|
$metadata: deserializeMetadata(output),
|
|
1580
1777
|
...contents,
|
|
1581
1778
|
};
|
|
1582
1779
|
return Promise.resolve(response);
|
|
1583
1780
|
};
|
|
1584
|
-
exports.
|
|
1585
|
-
const
|
|
1781
|
+
exports.deserializeAws_json1_1DescribeCollectionCommand = deserializeAws_json1_1DescribeCollectionCommand;
|
|
1782
|
+
const deserializeAws_json1_1DescribeCollectionCommandError = async (output, context) => {
|
|
1586
1783
|
const parsedOutput = {
|
|
1587
1784
|
...output,
|
|
1588
1785
|
body: await parseBody(output.body, context),
|
|
@@ -1607,14 +1804,6 @@ const deserializeAws_json1_1DescribeProjectsCommandError = async (output, contex
|
|
|
1607
1804
|
$metadata: deserializeMetadata(output),
|
|
1608
1805
|
};
|
|
1609
1806
|
break;
|
|
1610
|
-
case "InvalidPaginationTokenException":
|
|
1611
|
-
case "com.amazonaws.rekognition#InvalidPaginationTokenException":
|
|
1612
|
-
response = {
|
|
1613
|
-
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
1614
|
-
name: errorCode,
|
|
1615
|
-
$metadata: deserializeMetadata(output),
|
|
1616
|
-
};
|
|
1617
|
-
break;
|
|
1618
1807
|
case "InvalidParameterException":
|
|
1619
1808
|
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
1620
1809
|
response = {
|
|
@@ -1631,6 +1820,14 @@ const deserializeAws_json1_1DescribeProjectsCommandError = async (output, contex
|
|
|
1631
1820
|
$metadata: deserializeMetadata(output),
|
|
1632
1821
|
};
|
|
1633
1822
|
break;
|
|
1823
|
+
case "ResourceNotFoundException":
|
|
1824
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
1825
|
+
response = {
|
|
1826
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1827
|
+
name: errorCode,
|
|
1828
|
+
$metadata: deserializeMetadata(output),
|
|
1829
|
+
};
|
|
1830
|
+
break;
|
|
1634
1831
|
case "ThrottlingException":
|
|
1635
1832
|
case "com.amazonaws.rekognition#ThrottlingException":
|
|
1636
1833
|
response = {
|
|
@@ -1655,21 +1852,195 @@ const deserializeAws_json1_1DescribeProjectsCommandError = async (output, contex
|
|
|
1655
1852
|
delete response.Message;
|
|
1656
1853
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
1657
1854
|
};
|
|
1658
|
-
const
|
|
1855
|
+
const deserializeAws_json1_1DescribeDatasetCommand = async (output, context) => {
|
|
1659
1856
|
if (output.statusCode >= 300) {
|
|
1660
|
-
return
|
|
1857
|
+
return deserializeAws_json1_1DescribeDatasetCommandError(output, context);
|
|
1661
1858
|
}
|
|
1662
1859
|
const data = await parseBody(output.body, context);
|
|
1663
1860
|
let contents = {};
|
|
1664
|
-
contents =
|
|
1861
|
+
contents = deserializeAws_json1_1DescribeDatasetResponse(data, context);
|
|
1665
1862
|
const response = {
|
|
1666
1863
|
$metadata: deserializeMetadata(output),
|
|
1667
1864
|
...contents,
|
|
1668
1865
|
};
|
|
1669
1866
|
return Promise.resolve(response);
|
|
1670
1867
|
};
|
|
1671
|
-
exports.
|
|
1672
|
-
const
|
|
1868
|
+
exports.deserializeAws_json1_1DescribeDatasetCommand = deserializeAws_json1_1DescribeDatasetCommand;
|
|
1869
|
+
const deserializeAws_json1_1DescribeDatasetCommandError = 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 "AccessDeniedException":
|
|
1879
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
1880
|
+
response = {
|
|
1881
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1882
|
+
name: errorCode,
|
|
1883
|
+
$metadata: deserializeMetadata(output),
|
|
1884
|
+
};
|
|
1885
|
+
break;
|
|
1886
|
+
case "InternalServerError":
|
|
1887
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
1888
|
+
response = {
|
|
1889
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1890
|
+
name: errorCode,
|
|
1891
|
+
$metadata: deserializeMetadata(output),
|
|
1892
|
+
};
|
|
1893
|
+
break;
|
|
1894
|
+
case "InvalidParameterException":
|
|
1895
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
1896
|
+
response = {
|
|
1897
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1898
|
+
name: errorCode,
|
|
1899
|
+
$metadata: deserializeMetadata(output),
|
|
1900
|
+
};
|
|
1901
|
+
break;
|
|
1902
|
+
case "ProvisionedThroughputExceededException":
|
|
1903
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
1904
|
+
response = {
|
|
1905
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
1906
|
+
name: errorCode,
|
|
1907
|
+
$metadata: deserializeMetadata(output),
|
|
1908
|
+
};
|
|
1909
|
+
break;
|
|
1910
|
+
case "ResourceNotFoundException":
|
|
1911
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
1912
|
+
response = {
|
|
1913
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
1914
|
+
name: errorCode,
|
|
1915
|
+
$metadata: deserializeMetadata(output),
|
|
1916
|
+
};
|
|
1917
|
+
break;
|
|
1918
|
+
case "ThrottlingException":
|
|
1919
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
1920
|
+
response = {
|
|
1921
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
1922
|
+
name: errorCode,
|
|
1923
|
+
$metadata: deserializeMetadata(output),
|
|
1924
|
+
};
|
|
1925
|
+
break;
|
|
1926
|
+
default:
|
|
1927
|
+
const parsedBody = parsedOutput.body;
|
|
1928
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
1929
|
+
response = {
|
|
1930
|
+
...parsedBody,
|
|
1931
|
+
name: `${errorCode}`,
|
|
1932
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
1933
|
+
$fault: "client",
|
|
1934
|
+
$metadata: deserializeMetadata(output),
|
|
1935
|
+
};
|
|
1936
|
+
}
|
|
1937
|
+
const message = response.message || response.Message || errorCode;
|
|
1938
|
+
response.message = message;
|
|
1939
|
+
delete response.Message;
|
|
1940
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
1941
|
+
};
|
|
1942
|
+
const deserializeAws_json1_1DescribeProjectsCommand = async (output, context) => {
|
|
1943
|
+
if (output.statusCode >= 300) {
|
|
1944
|
+
return deserializeAws_json1_1DescribeProjectsCommandError(output, context);
|
|
1945
|
+
}
|
|
1946
|
+
const data = await parseBody(output.body, context);
|
|
1947
|
+
let contents = {};
|
|
1948
|
+
contents = deserializeAws_json1_1DescribeProjectsResponse(data, context);
|
|
1949
|
+
const response = {
|
|
1950
|
+
$metadata: deserializeMetadata(output),
|
|
1951
|
+
...contents,
|
|
1952
|
+
};
|
|
1953
|
+
return Promise.resolve(response);
|
|
1954
|
+
};
|
|
1955
|
+
exports.deserializeAws_json1_1DescribeProjectsCommand = deserializeAws_json1_1DescribeProjectsCommand;
|
|
1956
|
+
const deserializeAws_json1_1DescribeProjectsCommandError = async (output, context) => {
|
|
1957
|
+
const parsedOutput = {
|
|
1958
|
+
...output,
|
|
1959
|
+
body: await parseBody(output.body, context),
|
|
1960
|
+
};
|
|
1961
|
+
let response;
|
|
1962
|
+
let errorCode = "UnknownError";
|
|
1963
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1964
|
+
switch (errorCode) {
|
|
1965
|
+
case "AccessDeniedException":
|
|
1966
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
1967
|
+
response = {
|
|
1968
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
1969
|
+
name: errorCode,
|
|
1970
|
+
$metadata: deserializeMetadata(output),
|
|
1971
|
+
};
|
|
1972
|
+
break;
|
|
1973
|
+
case "InternalServerError":
|
|
1974
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
1975
|
+
response = {
|
|
1976
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
1977
|
+
name: errorCode,
|
|
1978
|
+
$metadata: deserializeMetadata(output),
|
|
1979
|
+
};
|
|
1980
|
+
break;
|
|
1981
|
+
case "InvalidPaginationTokenException":
|
|
1982
|
+
case "com.amazonaws.rekognition#InvalidPaginationTokenException":
|
|
1983
|
+
response = {
|
|
1984
|
+
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
1985
|
+
name: errorCode,
|
|
1986
|
+
$metadata: deserializeMetadata(output),
|
|
1987
|
+
};
|
|
1988
|
+
break;
|
|
1989
|
+
case "InvalidParameterException":
|
|
1990
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
1991
|
+
response = {
|
|
1992
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
1993
|
+
name: errorCode,
|
|
1994
|
+
$metadata: deserializeMetadata(output),
|
|
1995
|
+
};
|
|
1996
|
+
break;
|
|
1997
|
+
case "ProvisionedThroughputExceededException":
|
|
1998
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
1999
|
+
response = {
|
|
2000
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
2001
|
+
name: errorCode,
|
|
2002
|
+
$metadata: deserializeMetadata(output),
|
|
2003
|
+
};
|
|
2004
|
+
break;
|
|
2005
|
+
case "ThrottlingException":
|
|
2006
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
2007
|
+
response = {
|
|
2008
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2009
|
+
name: errorCode,
|
|
2010
|
+
$metadata: deserializeMetadata(output),
|
|
2011
|
+
};
|
|
2012
|
+
break;
|
|
2013
|
+
default:
|
|
2014
|
+
const parsedBody = parsedOutput.body;
|
|
2015
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2016
|
+
response = {
|
|
2017
|
+
...parsedBody,
|
|
2018
|
+
name: `${errorCode}`,
|
|
2019
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2020
|
+
$fault: "client",
|
|
2021
|
+
$metadata: deserializeMetadata(output),
|
|
2022
|
+
};
|
|
2023
|
+
}
|
|
2024
|
+
const message = response.message || response.Message || errorCode;
|
|
2025
|
+
response.message = message;
|
|
2026
|
+
delete response.Message;
|
|
2027
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2028
|
+
};
|
|
2029
|
+
const deserializeAws_json1_1DescribeProjectVersionsCommand = async (output, context) => {
|
|
2030
|
+
if (output.statusCode >= 300) {
|
|
2031
|
+
return deserializeAws_json1_1DescribeProjectVersionsCommandError(output, context);
|
|
2032
|
+
}
|
|
2033
|
+
const data = await parseBody(output.body, context);
|
|
2034
|
+
let contents = {};
|
|
2035
|
+
contents = deserializeAws_json1_1DescribeProjectVersionsResponse(data, context);
|
|
2036
|
+
const response = {
|
|
2037
|
+
$metadata: deserializeMetadata(output),
|
|
2038
|
+
...contents,
|
|
2039
|
+
};
|
|
2040
|
+
return Promise.resolve(response);
|
|
2041
|
+
};
|
|
2042
|
+
exports.deserializeAws_json1_1DescribeProjectVersionsCommand = deserializeAws_json1_1DescribeProjectVersionsCommand;
|
|
2043
|
+
const deserializeAws_json1_1DescribeProjectVersionsCommandError = async (output, context) => {
|
|
1673
2044
|
const parsedOutput = {
|
|
1674
2045
|
...output,
|
|
1675
2046
|
body: await parseBody(output.body, context),
|
|
@@ -2487,6 +2858,101 @@ const deserializeAws_json1_1DetectTextCommandError = async (output, context) =>
|
|
|
2487
2858
|
delete response.Message;
|
|
2488
2859
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
2489
2860
|
};
|
|
2861
|
+
const deserializeAws_json1_1DistributeDatasetEntriesCommand = async (output, context) => {
|
|
2862
|
+
if (output.statusCode >= 300) {
|
|
2863
|
+
return deserializeAws_json1_1DistributeDatasetEntriesCommandError(output, context);
|
|
2864
|
+
}
|
|
2865
|
+
const data = await parseBody(output.body, context);
|
|
2866
|
+
let contents = {};
|
|
2867
|
+
contents = deserializeAws_json1_1DistributeDatasetEntriesResponse(data, context);
|
|
2868
|
+
const response = {
|
|
2869
|
+
$metadata: deserializeMetadata(output),
|
|
2870
|
+
...contents,
|
|
2871
|
+
};
|
|
2872
|
+
return Promise.resolve(response);
|
|
2873
|
+
};
|
|
2874
|
+
exports.deserializeAws_json1_1DistributeDatasetEntriesCommand = deserializeAws_json1_1DistributeDatasetEntriesCommand;
|
|
2875
|
+
const deserializeAws_json1_1DistributeDatasetEntriesCommandError = async (output, context) => {
|
|
2876
|
+
const parsedOutput = {
|
|
2877
|
+
...output,
|
|
2878
|
+
body: await parseBody(output.body, context),
|
|
2879
|
+
};
|
|
2880
|
+
let response;
|
|
2881
|
+
let errorCode = "UnknownError";
|
|
2882
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
2883
|
+
switch (errorCode) {
|
|
2884
|
+
case "AccessDeniedException":
|
|
2885
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
2886
|
+
response = {
|
|
2887
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
2888
|
+
name: errorCode,
|
|
2889
|
+
$metadata: deserializeMetadata(output),
|
|
2890
|
+
};
|
|
2891
|
+
break;
|
|
2892
|
+
case "InternalServerError":
|
|
2893
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
2894
|
+
response = {
|
|
2895
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
2896
|
+
name: errorCode,
|
|
2897
|
+
$metadata: deserializeMetadata(output),
|
|
2898
|
+
};
|
|
2899
|
+
break;
|
|
2900
|
+
case "InvalidParameterException":
|
|
2901
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
2902
|
+
response = {
|
|
2903
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
2904
|
+
name: errorCode,
|
|
2905
|
+
$metadata: deserializeMetadata(output),
|
|
2906
|
+
};
|
|
2907
|
+
break;
|
|
2908
|
+
case "ProvisionedThroughputExceededException":
|
|
2909
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
2910
|
+
response = {
|
|
2911
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
2912
|
+
name: errorCode,
|
|
2913
|
+
$metadata: deserializeMetadata(output),
|
|
2914
|
+
};
|
|
2915
|
+
break;
|
|
2916
|
+
case "ResourceNotFoundException":
|
|
2917
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
2918
|
+
response = {
|
|
2919
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
2920
|
+
name: errorCode,
|
|
2921
|
+
$metadata: deserializeMetadata(output),
|
|
2922
|
+
};
|
|
2923
|
+
break;
|
|
2924
|
+
case "ResourceNotReadyException":
|
|
2925
|
+
case "com.amazonaws.rekognition#ResourceNotReadyException":
|
|
2926
|
+
response = {
|
|
2927
|
+
...(await deserializeAws_json1_1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
2928
|
+
name: errorCode,
|
|
2929
|
+
$metadata: deserializeMetadata(output),
|
|
2930
|
+
};
|
|
2931
|
+
break;
|
|
2932
|
+
case "ThrottlingException":
|
|
2933
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
2934
|
+
response = {
|
|
2935
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
2936
|
+
name: errorCode,
|
|
2937
|
+
$metadata: deserializeMetadata(output),
|
|
2938
|
+
};
|
|
2939
|
+
break;
|
|
2940
|
+
default:
|
|
2941
|
+
const parsedBody = parsedOutput.body;
|
|
2942
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
2943
|
+
response = {
|
|
2944
|
+
...parsedBody,
|
|
2945
|
+
name: `${errorCode}`,
|
|
2946
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
2947
|
+
$fault: "client",
|
|
2948
|
+
$metadata: deserializeMetadata(output),
|
|
2949
|
+
};
|
|
2950
|
+
}
|
|
2951
|
+
const message = response.message || response.Message || errorCode;
|
|
2952
|
+
response.message = message;
|
|
2953
|
+
delete response.Message;
|
|
2954
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
2955
|
+
};
|
|
2490
2956
|
const deserializeAws_json1_1GetCelebrityInfoCommand = async (output, context) => {
|
|
2491
2957
|
if (output.statusCode >= 300) {
|
|
2492
2958
|
return deserializeAws_json1_1GetCelebrityInfoCommandError(output, context);
|
|
@@ -3548,6 +4014,228 @@ const deserializeAws_json1_1ListCollectionsCommandError = async (output, context
|
|
|
3548
4014
|
delete response.Message;
|
|
3549
4015
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
3550
4016
|
};
|
|
4017
|
+
const deserializeAws_json1_1ListDatasetEntriesCommand = async (output, context) => {
|
|
4018
|
+
if (output.statusCode >= 300) {
|
|
4019
|
+
return deserializeAws_json1_1ListDatasetEntriesCommandError(output, context);
|
|
4020
|
+
}
|
|
4021
|
+
const data = await parseBody(output.body, context);
|
|
4022
|
+
let contents = {};
|
|
4023
|
+
contents = deserializeAws_json1_1ListDatasetEntriesResponse(data, context);
|
|
4024
|
+
const response = {
|
|
4025
|
+
$metadata: deserializeMetadata(output),
|
|
4026
|
+
...contents,
|
|
4027
|
+
};
|
|
4028
|
+
return Promise.resolve(response);
|
|
4029
|
+
};
|
|
4030
|
+
exports.deserializeAws_json1_1ListDatasetEntriesCommand = deserializeAws_json1_1ListDatasetEntriesCommand;
|
|
4031
|
+
const deserializeAws_json1_1ListDatasetEntriesCommandError = async (output, context) => {
|
|
4032
|
+
const parsedOutput = {
|
|
4033
|
+
...output,
|
|
4034
|
+
body: await parseBody(output.body, context),
|
|
4035
|
+
};
|
|
4036
|
+
let response;
|
|
4037
|
+
let errorCode = "UnknownError";
|
|
4038
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4039
|
+
switch (errorCode) {
|
|
4040
|
+
case "AccessDeniedException":
|
|
4041
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
4042
|
+
response = {
|
|
4043
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
4044
|
+
name: errorCode,
|
|
4045
|
+
$metadata: deserializeMetadata(output),
|
|
4046
|
+
};
|
|
4047
|
+
break;
|
|
4048
|
+
case "InternalServerError":
|
|
4049
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
4050
|
+
response = {
|
|
4051
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
4052
|
+
name: errorCode,
|
|
4053
|
+
$metadata: deserializeMetadata(output),
|
|
4054
|
+
};
|
|
4055
|
+
break;
|
|
4056
|
+
case "InvalidPaginationTokenException":
|
|
4057
|
+
case "com.amazonaws.rekognition#InvalidPaginationTokenException":
|
|
4058
|
+
response = {
|
|
4059
|
+
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
4060
|
+
name: errorCode,
|
|
4061
|
+
$metadata: deserializeMetadata(output),
|
|
4062
|
+
};
|
|
4063
|
+
break;
|
|
4064
|
+
case "InvalidParameterException":
|
|
4065
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
4066
|
+
response = {
|
|
4067
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
4068
|
+
name: errorCode,
|
|
4069
|
+
$metadata: deserializeMetadata(output),
|
|
4070
|
+
};
|
|
4071
|
+
break;
|
|
4072
|
+
case "ProvisionedThroughputExceededException":
|
|
4073
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
4074
|
+
response = {
|
|
4075
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
4076
|
+
name: errorCode,
|
|
4077
|
+
$metadata: deserializeMetadata(output),
|
|
4078
|
+
};
|
|
4079
|
+
break;
|
|
4080
|
+
case "ResourceInUseException":
|
|
4081
|
+
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
4082
|
+
response = {
|
|
4083
|
+
...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
|
|
4084
|
+
name: errorCode,
|
|
4085
|
+
$metadata: deserializeMetadata(output),
|
|
4086
|
+
};
|
|
4087
|
+
break;
|
|
4088
|
+
case "ResourceNotFoundException":
|
|
4089
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
4090
|
+
response = {
|
|
4091
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
4092
|
+
name: errorCode,
|
|
4093
|
+
$metadata: deserializeMetadata(output),
|
|
4094
|
+
};
|
|
4095
|
+
break;
|
|
4096
|
+
case "ResourceNotReadyException":
|
|
4097
|
+
case "com.amazonaws.rekognition#ResourceNotReadyException":
|
|
4098
|
+
response = {
|
|
4099
|
+
...(await deserializeAws_json1_1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
4100
|
+
name: errorCode,
|
|
4101
|
+
$metadata: deserializeMetadata(output),
|
|
4102
|
+
};
|
|
4103
|
+
break;
|
|
4104
|
+
case "ThrottlingException":
|
|
4105
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
4106
|
+
response = {
|
|
4107
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
4108
|
+
name: errorCode,
|
|
4109
|
+
$metadata: deserializeMetadata(output),
|
|
4110
|
+
};
|
|
4111
|
+
break;
|
|
4112
|
+
default:
|
|
4113
|
+
const parsedBody = parsedOutput.body;
|
|
4114
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4115
|
+
response = {
|
|
4116
|
+
...parsedBody,
|
|
4117
|
+
name: `${errorCode}`,
|
|
4118
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4119
|
+
$fault: "client",
|
|
4120
|
+
$metadata: deserializeMetadata(output),
|
|
4121
|
+
};
|
|
4122
|
+
}
|
|
4123
|
+
const message = response.message || response.Message || errorCode;
|
|
4124
|
+
response.message = message;
|
|
4125
|
+
delete response.Message;
|
|
4126
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
4127
|
+
};
|
|
4128
|
+
const deserializeAws_json1_1ListDatasetLabelsCommand = async (output, context) => {
|
|
4129
|
+
if (output.statusCode >= 300) {
|
|
4130
|
+
return deserializeAws_json1_1ListDatasetLabelsCommandError(output, context);
|
|
4131
|
+
}
|
|
4132
|
+
const data = await parseBody(output.body, context);
|
|
4133
|
+
let contents = {};
|
|
4134
|
+
contents = deserializeAws_json1_1ListDatasetLabelsResponse(data, context);
|
|
4135
|
+
const response = {
|
|
4136
|
+
$metadata: deserializeMetadata(output),
|
|
4137
|
+
...contents,
|
|
4138
|
+
};
|
|
4139
|
+
return Promise.resolve(response);
|
|
4140
|
+
};
|
|
4141
|
+
exports.deserializeAws_json1_1ListDatasetLabelsCommand = deserializeAws_json1_1ListDatasetLabelsCommand;
|
|
4142
|
+
const deserializeAws_json1_1ListDatasetLabelsCommandError = async (output, context) => {
|
|
4143
|
+
const parsedOutput = {
|
|
4144
|
+
...output,
|
|
4145
|
+
body: await parseBody(output.body, context),
|
|
4146
|
+
};
|
|
4147
|
+
let response;
|
|
4148
|
+
let errorCode = "UnknownError";
|
|
4149
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
4150
|
+
switch (errorCode) {
|
|
4151
|
+
case "AccessDeniedException":
|
|
4152
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
4153
|
+
response = {
|
|
4154
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
4155
|
+
name: errorCode,
|
|
4156
|
+
$metadata: deserializeMetadata(output),
|
|
4157
|
+
};
|
|
4158
|
+
break;
|
|
4159
|
+
case "InternalServerError":
|
|
4160
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
4161
|
+
response = {
|
|
4162
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
4163
|
+
name: errorCode,
|
|
4164
|
+
$metadata: deserializeMetadata(output),
|
|
4165
|
+
};
|
|
4166
|
+
break;
|
|
4167
|
+
case "InvalidPaginationTokenException":
|
|
4168
|
+
case "com.amazonaws.rekognition#InvalidPaginationTokenException":
|
|
4169
|
+
response = {
|
|
4170
|
+
...(await deserializeAws_json1_1InvalidPaginationTokenExceptionResponse(parsedOutput, context)),
|
|
4171
|
+
name: errorCode,
|
|
4172
|
+
$metadata: deserializeMetadata(output),
|
|
4173
|
+
};
|
|
4174
|
+
break;
|
|
4175
|
+
case "InvalidParameterException":
|
|
4176
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
4177
|
+
response = {
|
|
4178
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
4179
|
+
name: errorCode,
|
|
4180
|
+
$metadata: deserializeMetadata(output),
|
|
4181
|
+
};
|
|
4182
|
+
break;
|
|
4183
|
+
case "ProvisionedThroughputExceededException":
|
|
4184
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
4185
|
+
response = {
|
|
4186
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
4187
|
+
name: errorCode,
|
|
4188
|
+
$metadata: deserializeMetadata(output),
|
|
4189
|
+
};
|
|
4190
|
+
break;
|
|
4191
|
+
case "ResourceInUseException":
|
|
4192
|
+
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
4193
|
+
response = {
|
|
4194
|
+
...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
|
|
4195
|
+
name: errorCode,
|
|
4196
|
+
$metadata: deserializeMetadata(output),
|
|
4197
|
+
};
|
|
4198
|
+
break;
|
|
4199
|
+
case "ResourceNotFoundException":
|
|
4200
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
4201
|
+
response = {
|
|
4202
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
4203
|
+
name: errorCode,
|
|
4204
|
+
$metadata: deserializeMetadata(output),
|
|
4205
|
+
};
|
|
4206
|
+
break;
|
|
4207
|
+
case "ResourceNotReadyException":
|
|
4208
|
+
case "com.amazonaws.rekognition#ResourceNotReadyException":
|
|
4209
|
+
response = {
|
|
4210
|
+
...(await deserializeAws_json1_1ResourceNotReadyExceptionResponse(parsedOutput, context)),
|
|
4211
|
+
name: errorCode,
|
|
4212
|
+
$metadata: deserializeMetadata(output),
|
|
4213
|
+
};
|
|
4214
|
+
break;
|
|
4215
|
+
case "ThrottlingException":
|
|
4216
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
4217
|
+
response = {
|
|
4218
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
4219
|
+
name: errorCode,
|
|
4220
|
+
$metadata: deserializeMetadata(output),
|
|
4221
|
+
};
|
|
4222
|
+
break;
|
|
4223
|
+
default:
|
|
4224
|
+
const parsedBody = parsedOutput.body;
|
|
4225
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
4226
|
+
response = {
|
|
4227
|
+
...parsedBody,
|
|
4228
|
+
name: `${errorCode}`,
|
|
4229
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
4230
|
+
$fault: "client",
|
|
4231
|
+
$metadata: deserializeMetadata(output),
|
|
4232
|
+
};
|
|
4233
|
+
}
|
|
4234
|
+
const message = response.message || response.Message || errorCode;
|
|
4235
|
+
response.message = message;
|
|
4236
|
+
delete response.Message;
|
|
4237
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
4238
|
+
};
|
|
3551
4239
|
const deserializeAws_json1_1ListFacesCommand = async (output, context) => {
|
|
3552
4240
|
if (output.statusCode >= 300) {
|
|
3553
4241
|
return deserializeAws_json1_1ListFacesCommandError(output, context);
|
|
@@ -5584,6 +6272,109 @@ const deserializeAws_json1_1UntagResourceCommandError = async (output, context)
|
|
|
5584
6272
|
delete response.Message;
|
|
5585
6273
|
return Promise.reject(Object.assign(new Error(message), response));
|
|
5586
6274
|
};
|
|
6275
|
+
const deserializeAws_json1_1UpdateDatasetEntriesCommand = async (output, context) => {
|
|
6276
|
+
if (output.statusCode >= 300) {
|
|
6277
|
+
return deserializeAws_json1_1UpdateDatasetEntriesCommandError(output, context);
|
|
6278
|
+
}
|
|
6279
|
+
const data = await parseBody(output.body, context);
|
|
6280
|
+
let contents = {};
|
|
6281
|
+
contents = deserializeAws_json1_1UpdateDatasetEntriesResponse(data, context);
|
|
6282
|
+
const response = {
|
|
6283
|
+
$metadata: deserializeMetadata(output),
|
|
6284
|
+
...contents,
|
|
6285
|
+
};
|
|
6286
|
+
return Promise.resolve(response);
|
|
6287
|
+
};
|
|
6288
|
+
exports.deserializeAws_json1_1UpdateDatasetEntriesCommand = deserializeAws_json1_1UpdateDatasetEntriesCommand;
|
|
6289
|
+
const deserializeAws_json1_1UpdateDatasetEntriesCommandError = async (output, context) => {
|
|
6290
|
+
const parsedOutput = {
|
|
6291
|
+
...output,
|
|
6292
|
+
body: await parseBody(output.body, context),
|
|
6293
|
+
};
|
|
6294
|
+
let response;
|
|
6295
|
+
let errorCode = "UnknownError";
|
|
6296
|
+
errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
6297
|
+
switch (errorCode) {
|
|
6298
|
+
case "AccessDeniedException":
|
|
6299
|
+
case "com.amazonaws.rekognition#AccessDeniedException":
|
|
6300
|
+
response = {
|
|
6301
|
+
...(await deserializeAws_json1_1AccessDeniedExceptionResponse(parsedOutput, context)),
|
|
6302
|
+
name: errorCode,
|
|
6303
|
+
$metadata: deserializeMetadata(output),
|
|
6304
|
+
};
|
|
6305
|
+
break;
|
|
6306
|
+
case "InternalServerError":
|
|
6307
|
+
case "com.amazonaws.rekognition#InternalServerError":
|
|
6308
|
+
response = {
|
|
6309
|
+
...(await deserializeAws_json1_1InternalServerErrorResponse(parsedOutput, context)),
|
|
6310
|
+
name: errorCode,
|
|
6311
|
+
$metadata: deserializeMetadata(output),
|
|
6312
|
+
};
|
|
6313
|
+
break;
|
|
6314
|
+
case "InvalidParameterException":
|
|
6315
|
+
case "com.amazonaws.rekognition#InvalidParameterException":
|
|
6316
|
+
response = {
|
|
6317
|
+
...(await deserializeAws_json1_1InvalidParameterExceptionResponse(parsedOutput, context)),
|
|
6318
|
+
name: errorCode,
|
|
6319
|
+
$metadata: deserializeMetadata(output),
|
|
6320
|
+
};
|
|
6321
|
+
break;
|
|
6322
|
+
case "LimitExceededException":
|
|
6323
|
+
case "com.amazonaws.rekognition#LimitExceededException":
|
|
6324
|
+
response = {
|
|
6325
|
+
...(await deserializeAws_json1_1LimitExceededExceptionResponse(parsedOutput, context)),
|
|
6326
|
+
name: errorCode,
|
|
6327
|
+
$metadata: deserializeMetadata(output),
|
|
6328
|
+
};
|
|
6329
|
+
break;
|
|
6330
|
+
case "ProvisionedThroughputExceededException":
|
|
6331
|
+
case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
|
|
6332
|
+
response = {
|
|
6333
|
+
...(await deserializeAws_json1_1ProvisionedThroughputExceededExceptionResponse(parsedOutput, context)),
|
|
6334
|
+
name: errorCode,
|
|
6335
|
+
$metadata: deserializeMetadata(output),
|
|
6336
|
+
};
|
|
6337
|
+
break;
|
|
6338
|
+
case "ResourceInUseException":
|
|
6339
|
+
case "com.amazonaws.rekognition#ResourceInUseException":
|
|
6340
|
+
response = {
|
|
6341
|
+
...(await deserializeAws_json1_1ResourceInUseExceptionResponse(parsedOutput, context)),
|
|
6342
|
+
name: errorCode,
|
|
6343
|
+
$metadata: deserializeMetadata(output),
|
|
6344
|
+
};
|
|
6345
|
+
break;
|
|
6346
|
+
case "ResourceNotFoundException":
|
|
6347
|
+
case "com.amazonaws.rekognition#ResourceNotFoundException":
|
|
6348
|
+
response = {
|
|
6349
|
+
...(await deserializeAws_json1_1ResourceNotFoundExceptionResponse(parsedOutput, context)),
|
|
6350
|
+
name: errorCode,
|
|
6351
|
+
$metadata: deserializeMetadata(output),
|
|
6352
|
+
};
|
|
6353
|
+
break;
|
|
6354
|
+
case "ThrottlingException":
|
|
6355
|
+
case "com.amazonaws.rekognition#ThrottlingException":
|
|
6356
|
+
response = {
|
|
6357
|
+
...(await deserializeAws_json1_1ThrottlingExceptionResponse(parsedOutput, context)),
|
|
6358
|
+
name: errorCode,
|
|
6359
|
+
$metadata: deserializeMetadata(output),
|
|
6360
|
+
};
|
|
6361
|
+
break;
|
|
6362
|
+
default:
|
|
6363
|
+
const parsedBody = parsedOutput.body;
|
|
6364
|
+
errorCode = parsedBody.code || parsedBody.Code || errorCode;
|
|
6365
|
+
response = {
|
|
6366
|
+
...parsedBody,
|
|
6367
|
+
name: `${errorCode}`,
|
|
6368
|
+
message: parsedBody.message || parsedBody.Message || errorCode,
|
|
6369
|
+
$fault: "client",
|
|
6370
|
+
$metadata: deserializeMetadata(output),
|
|
6371
|
+
};
|
|
6372
|
+
}
|
|
6373
|
+
const message = response.message || response.Message || errorCode;
|
|
6374
|
+
response.message = message;
|
|
6375
|
+
delete response.Message;
|
|
6376
|
+
return Promise.reject(Object.assign(new Error(message), response));
|
|
6377
|
+
};
|
|
5587
6378
|
const deserializeAws_json1_1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
|
|
5588
6379
|
const body = parsedOutput.body;
|
|
5589
6380
|
const deserialized = deserializeAws_json1_1AccessDeniedException(body, context);
|
|
@@ -5853,6 +6644,16 @@ const serializeAws_json1_1CreateCollectionRequest = (input, context) => {
|
|
|
5853
6644
|
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }),
|
|
5854
6645
|
};
|
|
5855
6646
|
};
|
|
6647
|
+
const serializeAws_json1_1CreateDatasetRequest = (input, context) => {
|
|
6648
|
+
return {
|
|
6649
|
+
...(input.DatasetSource !== undefined &&
|
|
6650
|
+
input.DatasetSource !== null && {
|
|
6651
|
+
DatasetSource: serializeAws_json1_1DatasetSource(input.DatasetSource, context),
|
|
6652
|
+
}),
|
|
6653
|
+
...(input.DatasetType !== undefined && input.DatasetType !== null && { DatasetType: input.DatasetType }),
|
|
6654
|
+
...(input.ProjectArn !== undefined && input.ProjectArn !== null && { ProjectArn: input.ProjectArn }),
|
|
6655
|
+
};
|
|
6656
|
+
};
|
|
5856
6657
|
const serializeAws_json1_1CreateProjectRequest = (input, context) => {
|
|
5857
6658
|
return {
|
|
5858
6659
|
...(input.ProjectName !== undefined && input.ProjectName !== null && { ProjectName: input.ProjectName }),
|
|
@@ -5885,11 +6686,41 @@ const serializeAws_json1_1CreateStreamProcessorRequest = (input, context) => {
|
|
|
5885
6686
|
...(input.Tags !== undefined && input.Tags !== null && { Tags: serializeAws_json1_1TagMap(input.Tags, context) }),
|
|
5886
6687
|
};
|
|
5887
6688
|
};
|
|
6689
|
+
const serializeAws_json1_1DatasetChanges = (input, context) => {
|
|
6690
|
+
return {
|
|
6691
|
+
...(input.GroundTruth !== undefined &&
|
|
6692
|
+
input.GroundTruth !== null && { GroundTruth: context.base64Encoder(input.GroundTruth) }),
|
|
6693
|
+
};
|
|
6694
|
+
};
|
|
6695
|
+
const serializeAws_json1_1DatasetLabels = (input, context) => {
|
|
6696
|
+
return input
|
|
6697
|
+
.filter((e) => e != null)
|
|
6698
|
+
.map((entry) => {
|
|
6699
|
+
if (entry === null) {
|
|
6700
|
+
return null;
|
|
6701
|
+
}
|
|
6702
|
+
return entry;
|
|
6703
|
+
});
|
|
6704
|
+
};
|
|
6705
|
+
const serializeAws_json1_1DatasetSource = (input, context) => {
|
|
6706
|
+
return {
|
|
6707
|
+
...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }),
|
|
6708
|
+
...(input.GroundTruthManifest !== undefined &&
|
|
6709
|
+
input.GroundTruthManifest !== null && {
|
|
6710
|
+
GroundTruthManifest: serializeAws_json1_1GroundTruthManifest(input.GroundTruthManifest, context),
|
|
6711
|
+
}),
|
|
6712
|
+
};
|
|
6713
|
+
};
|
|
5888
6714
|
const serializeAws_json1_1DeleteCollectionRequest = (input, context) => {
|
|
5889
6715
|
return {
|
|
5890
6716
|
...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }),
|
|
5891
6717
|
};
|
|
5892
6718
|
};
|
|
6719
|
+
const serializeAws_json1_1DeleteDatasetRequest = (input, context) => {
|
|
6720
|
+
return {
|
|
6721
|
+
...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }),
|
|
6722
|
+
};
|
|
6723
|
+
};
|
|
5893
6724
|
const serializeAws_json1_1DeleteFacesRequest = (input, context) => {
|
|
5894
6725
|
return {
|
|
5895
6726
|
...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }),
|
|
@@ -5918,10 +6749,17 @@ const serializeAws_json1_1DescribeCollectionRequest = (input, context) => {
|
|
|
5918
6749
|
...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }),
|
|
5919
6750
|
};
|
|
5920
6751
|
};
|
|
6752
|
+
const serializeAws_json1_1DescribeDatasetRequest = (input, context) => {
|
|
6753
|
+
return {
|
|
6754
|
+
...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }),
|
|
6755
|
+
};
|
|
6756
|
+
};
|
|
5921
6757
|
const serializeAws_json1_1DescribeProjectsRequest = (input, context) => {
|
|
5922
6758
|
return {
|
|
5923
6759
|
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
5924
6760
|
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
6761
|
+
...(input.ProjectNames !== undefined &&
|
|
6762
|
+
input.ProjectNames !== null && { ProjectNames: serializeAws_json1_1ProjectNames(input.ProjectNames, context) }),
|
|
5925
6763
|
};
|
|
5926
6764
|
};
|
|
5927
6765
|
const serializeAws_json1_1DescribeProjectVersionsRequest = (input, context) => {
|
|
@@ -6016,6 +6854,29 @@ const serializeAws_json1_1DetectTextRequest = (input, context) => {
|
|
|
6016
6854
|
input.Image !== null && { Image: serializeAws_json1_1Image(input.Image, context) }),
|
|
6017
6855
|
};
|
|
6018
6856
|
};
|
|
6857
|
+
const serializeAws_json1_1DistributeDataset = (input, context) => {
|
|
6858
|
+
return {
|
|
6859
|
+
...(input.Arn !== undefined && input.Arn !== null && { Arn: input.Arn }),
|
|
6860
|
+
};
|
|
6861
|
+
};
|
|
6862
|
+
const serializeAws_json1_1DistributeDatasetEntriesRequest = (input, context) => {
|
|
6863
|
+
return {
|
|
6864
|
+
...(input.Datasets !== undefined &&
|
|
6865
|
+
input.Datasets !== null && {
|
|
6866
|
+
Datasets: serializeAws_json1_1DistributeDatasetMetadataList(input.Datasets, context),
|
|
6867
|
+
}),
|
|
6868
|
+
};
|
|
6869
|
+
};
|
|
6870
|
+
const serializeAws_json1_1DistributeDatasetMetadataList = (input, context) => {
|
|
6871
|
+
return input
|
|
6872
|
+
.filter((e) => e != null)
|
|
6873
|
+
.map((entry) => {
|
|
6874
|
+
if (entry === null) {
|
|
6875
|
+
return null;
|
|
6876
|
+
}
|
|
6877
|
+
return serializeAws_json1_1DistributeDataset(entry, context);
|
|
6878
|
+
});
|
|
6879
|
+
};
|
|
6019
6880
|
const serializeAws_json1_1FaceIdList = (input, context) => {
|
|
6020
6881
|
return input
|
|
6021
6882
|
.filter((e) => e != null)
|
|
@@ -6162,6 +7023,28 @@ const serializeAws_json1_1ListCollectionsRequest = (input, context) => {
|
|
|
6162
7023
|
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
6163
7024
|
};
|
|
6164
7025
|
};
|
|
7026
|
+
const serializeAws_json1_1ListDatasetEntriesRequest = (input, context) => {
|
|
7027
|
+
return {
|
|
7028
|
+
...(input.ContainsLabels !== undefined &&
|
|
7029
|
+
input.ContainsLabels !== null && {
|
|
7030
|
+
ContainsLabels: serializeAws_json1_1DatasetLabels(input.ContainsLabels, context),
|
|
7031
|
+
}),
|
|
7032
|
+
...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }),
|
|
7033
|
+
...(input.HasErrors !== undefined && input.HasErrors !== null && { HasErrors: input.HasErrors }),
|
|
7034
|
+
...(input.Labeled !== undefined && input.Labeled !== null && { Labeled: input.Labeled }),
|
|
7035
|
+
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
7036
|
+
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
7037
|
+
...(input.SourceRefContains !== undefined &&
|
|
7038
|
+
input.SourceRefContains !== null && { SourceRefContains: input.SourceRefContains }),
|
|
7039
|
+
};
|
|
7040
|
+
};
|
|
7041
|
+
const serializeAws_json1_1ListDatasetLabelsRequest = (input, context) => {
|
|
7042
|
+
return {
|
|
7043
|
+
...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }),
|
|
7044
|
+
...(input.MaxResults !== undefined && input.MaxResults !== null && { MaxResults: input.MaxResults }),
|
|
7045
|
+
...(input.NextToken !== undefined && input.NextToken !== null && { NextToken: input.NextToken }),
|
|
7046
|
+
};
|
|
7047
|
+
};
|
|
6165
7048
|
const serializeAws_json1_1ListFacesRequest = (input, context) => {
|
|
6166
7049
|
return {
|
|
6167
7050
|
...(input.CollectionId !== undefined && input.CollectionId !== null && { CollectionId: input.CollectionId }),
|
|
@@ -6192,6 +7075,16 @@ const serializeAws_json1_1OutputConfig = (input, context) => {
|
|
|
6192
7075
|
...(input.S3KeyPrefix !== undefined && input.S3KeyPrefix !== null && { S3KeyPrefix: input.S3KeyPrefix }),
|
|
6193
7076
|
};
|
|
6194
7077
|
};
|
|
7078
|
+
const serializeAws_json1_1ProjectNames = (input, context) => {
|
|
7079
|
+
return input
|
|
7080
|
+
.filter((e) => e != null)
|
|
7081
|
+
.map((entry) => {
|
|
7082
|
+
if (entry === null) {
|
|
7083
|
+
return null;
|
|
7084
|
+
}
|
|
7085
|
+
return entry;
|
|
7086
|
+
});
|
|
7087
|
+
};
|
|
6195
7088
|
const serializeAws_json1_1ProtectiveEquipmentSummarizationAttributes = (input, context) => {
|
|
6196
7089
|
return {
|
|
6197
7090
|
...(input.MinConfidence !== undefined &&
|
|
@@ -6519,6 +7412,13 @@ const serializeAws_json1_1UntagResourceRequest = (input, context) => {
|
|
|
6519
7412
|
input.TagKeys !== null && { TagKeys: serializeAws_json1_1TagKeyList(input.TagKeys, context) }),
|
|
6520
7413
|
};
|
|
6521
7414
|
};
|
|
7415
|
+
const serializeAws_json1_1UpdateDatasetEntriesRequest = (input, context) => {
|
|
7416
|
+
return {
|
|
7417
|
+
...(input.Changes !== undefined &&
|
|
7418
|
+
input.Changes !== null && { Changes: serializeAws_json1_1DatasetChanges(input.Changes, context) }),
|
|
7419
|
+
...(input.DatasetArn !== undefined && input.DatasetArn !== null && { DatasetArn: input.DatasetArn }),
|
|
7420
|
+
};
|
|
7421
|
+
};
|
|
6522
7422
|
const serializeAws_json1_1VersionNames = (input, context) => {
|
|
6523
7423
|
return input
|
|
6524
7424
|
.filter((e) => e != null)
|
|
@@ -6631,6 +7531,9 @@ const deserializeAws_json1_1CelebrityDetail = (output, context) => {
|
|
|
6631
7531
|
? deserializeAws_json1_1FaceDetail(output.Face, context)
|
|
6632
7532
|
: undefined,
|
|
6633
7533
|
Id: smithy_client_1.expectString(output.Id),
|
|
7534
|
+
KnownGender: output.KnownGender !== undefined && output.KnownGender !== null
|
|
7535
|
+
? deserializeAws_json1_1KnownGender(output.KnownGender, context)
|
|
7536
|
+
: undefined,
|
|
6634
7537
|
Name: smithy_client_1.expectString(output.Name),
|
|
6635
7538
|
Urls: output.Urls !== undefined && output.Urls !== null ? deserializeAws_json1_1Urls(output.Urls, context) : undefined,
|
|
6636
7539
|
};
|
|
@@ -6786,6 +7689,11 @@ const deserializeAws_json1_1CreateCollectionResponse = (output, context) => {
|
|
|
6786
7689
|
StatusCode: smithy_client_1.expectInt32(output.StatusCode),
|
|
6787
7690
|
};
|
|
6788
7691
|
};
|
|
7692
|
+
const deserializeAws_json1_1CreateDatasetResponse = (output, context) => {
|
|
7693
|
+
return {
|
|
7694
|
+
DatasetArn: smithy_client_1.expectString(output.DatasetArn),
|
|
7695
|
+
};
|
|
7696
|
+
};
|
|
6789
7697
|
const deserializeAws_json1_1CreateProjectResponse = (output, context) => {
|
|
6790
7698
|
return {
|
|
6791
7699
|
ProjectArn: smithy_client_1.expectString(output.ProjectArn),
|
|
@@ -6820,11 +7728,94 @@ const deserializeAws_json1_1CustomLabels = (output, context) => {
|
|
|
6820
7728
|
return deserializeAws_json1_1CustomLabel(entry, context);
|
|
6821
7729
|
});
|
|
6822
7730
|
};
|
|
7731
|
+
const deserializeAws_json1_1DatasetDescription = (output, context) => {
|
|
7732
|
+
return {
|
|
7733
|
+
CreationTimestamp: output.CreationTimestamp !== undefined && output.CreationTimestamp !== null
|
|
7734
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreationTimestamp)))
|
|
7735
|
+
: undefined,
|
|
7736
|
+
DatasetStats: output.DatasetStats !== undefined && output.DatasetStats !== null
|
|
7737
|
+
? deserializeAws_json1_1DatasetStats(output.DatasetStats, context)
|
|
7738
|
+
: undefined,
|
|
7739
|
+
LastUpdatedTimestamp: output.LastUpdatedTimestamp !== undefined && output.LastUpdatedTimestamp !== null
|
|
7740
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.LastUpdatedTimestamp)))
|
|
7741
|
+
: undefined,
|
|
7742
|
+
Status: smithy_client_1.expectString(output.Status),
|
|
7743
|
+
StatusMessage: smithy_client_1.expectString(output.StatusMessage),
|
|
7744
|
+
StatusMessageCode: smithy_client_1.expectString(output.StatusMessageCode),
|
|
7745
|
+
};
|
|
7746
|
+
};
|
|
7747
|
+
const deserializeAws_json1_1DatasetEntries = (output, context) => {
|
|
7748
|
+
return (output || [])
|
|
7749
|
+
.filter((e) => e != null)
|
|
7750
|
+
.map((entry) => {
|
|
7751
|
+
if (entry === null) {
|
|
7752
|
+
return null;
|
|
7753
|
+
}
|
|
7754
|
+
return smithy_client_1.expectString(entry);
|
|
7755
|
+
});
|
|
7756
|
+
};
|
|
7757
|
+
const deserializeAws_json1_1DatasetLabelDescription = (output, context) => {
|
|
7758
|
+
return {
|
|
7759
|
+
LabelName: smithy_client_1.expectString(output.LabelName),
|
|
7760
|
+
LabelStats: output.LabelStats !== undefined && output.LabelStats !== null
|
|
7761
|
+
? deserializeAws_json1_1DatasetLabelStats(output.LabelStats, context)
|
|
7762
|
+
: undefined,
|
|
7763
|
+
};
|
|
7764
|
+
};
|
|
7765
|
+
const deserializeAws_json1_1DatasetLabelDescriptions = (output, context) => {
|
|
7766
|
+
return (output || [])
|
|
7767
|
+
.filter((e) => e != null)
|
|
7768
|
+
.map((entry) => {
|
|
7769
|
+
if (entry === null) {
|
|
7770
|
+
return null;
|
|
7771
|
+
}
|
|
7772
|
+
return deserializeAws_json1_1DatasetLabelDescription(entry, context);
|
|
7773
|
+
});
|
|
7774
|
+
};
|
|
7775
|
+
const deserializeAws_json1_1DatasetLabelStats = (output, context) => {
|
|
7776
|
+
return {
|
|
7777
|
+
BoundingBoxCount: smithy_client_1.expectInt32(output.BoundingBoxCount),
|
|
7778
|
+
EntryCount: smithy_client_1.expectInt32(output.EntryCount),
|
|
7779
|
+
};
|
|
7780
|
+
};
|
|
7781
|
+
const deserializeAws_json1_1DatasetMetadata = (output, context) => {
|
|
7782
|
+
return {
|
|
7783
|
+
CreationTimestamp: output.CreationTimestamp !== undefined && output.CreationTimestamp !== null
|
|
7784
|
+
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreationTimestamp)))
|
|
7785
|
+
: undefined,
|
|
7786
|
+
DatasetArn: smithy_client_1.expectString(output.DatasetArn),
|
|
7787
|
+
DatasetType: smithy_client_1.expectString(output.DatasetType),
|
|
7788
|
+
Status: smithy_client_1.expectString(output.Status),
|
|
7789
|
+
StatusMessage: smithy_client_1.expectString(output.StatusMessage),
|
|
7790
|
+
StatusMessageCode: smithy_client_1.expectString(output.StatusMessageCode),
|
|
7791
|
+
};
|
|
7792
|
+
};
|
|
7793
|
+
const deserializeAws_json1_1DatasetMetadataList = (output, context) => {
|
|
7794
|
+
return (output || [])
|
|
7795
|
+
.filter((e) => e != null)
|
|
7796
|
+
.map((entry) => {
|
|
7797
|
+
if (entry === null) {
|
|
7798
|
+
return null;
|
|
7799
|
+
}
|
|
7800
|
+
return deserializeAws_json1_1DatasetMetadata(entry, context);
|
|
7801
|
+
});
|
|
7802
|
+
};
|
|
7803
|
+
const deserializeAws_json1_1DatasetStats = (output, context) => {
|
|
7804
|
+
return {
|
|
7805
|
+
ErrorEntries: smithy_client_1.expectInt32(output.ErrorEntries),
|
|
7806
|
+
LabeledEntries: smithy_client_1.expectInt32(output.LabeledEntries),
|
|
7807
|
+
TotalEntries: smithy_client_1.expectInt32(output.TotalEntries),
|
|
7808
|
+
TotalLabels: smithy_client_1.expectInt32(output.TotalLabels),
|
|
7809
|
+
};
|
|
7810
|
+
};
|
|
6823
7811
|
const deserializeAws_json1_1DeleteCollectionResponse = (output, context) => {
|
|
6824
7812
|
return {
|
|
6825
7813
|
StatusCode: smithy_client_1.expectInt32(output.StatusCode),
|
|
6826
7814
|
};
|
|
6827
7815
|
};
|
|
7816
|
+
const deserializeAws_json1_1DeleteDatasetResponse = (output, context) => {
|
|
7817
|
+
return {};
|
|
7818
|
+
};
|
|
6828
7819
|
const deserializeAws_json1_1DeleteFacesResponse = (output, context) => {
|
|
6829
7820
|
return {
|
|
6830
7821
|
DeletedFaces: output.DeletedFaces !== undefined && output.DeletedFaces !== null
|
|
@@ -6855,6 +7846,13 @@ const deserializeAws_json1_1DescribeCollectionResponse = (output, context) => {
|
|
|
6855
7846
|
FaceModelVersion: smithy_client_1.expectString(output.FaceModelVersion),
|
|
6856
7847
|
};
|
|
6857
7848
|
};
|
|
7849
|
+
const deserializeAws_json1_1DescribeDatasetResponse = (output, context) => {
|
|
7850
|
+
return {
|
|
7851
|
+
DatasetDescription: output.DatasetDescription !== undefined && output.DatasetDescription !== null
|
|
7852
|
+
? deserializeAws_json1_1DatasetDescription(output.DatasetDescription, context)
|
|
7853
|
+
: undefined,
|
|
7854
|
+
};
|
|
7855
|
+
};
|
|
6858
7856
|
const deserializeAws_json1_1DescribeProjectsResponse = (output, context) => {
|
|
6859
7857
|
return {
|
|
6860
7858
|
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
@@ -6949,6 +7947,9 @@ const deserializeAws_json1_1DetectTextResponse = (output, context) => {
|
|
|
6949
7947
|
TextModelVersion: smithy_client_1.expectString(output.TextModelVersion),
|
|
6950
7948
|
};
|
|
6951
7949
|
};
|
|
7950
|
+
const deserializeAws_json1_1DistributeDatasetEntriesResponse = (output, context) => {
|
|
7951
|
+
return {};
|
|
7952
|
+
};
|
|
6952
7953
|
const deserializeAws_json1_1Emotion = (output, context) => {
|
|
6953
7954
|
return {
|
|
6954
7955
|
Confidence: smithy_client_1.limitedParseFloat32(output.Confidence),
|
|
@@ -7513,6 +8514,22 @@ const deserializeAws_json1_1ListCollectionsResponse = (output, context) => {
|
|
|
7513
8514
|
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
7514
8515
|
};
|
|
7515
8516
|
};
|
|
8517
|
+
const deserializeAws_json1_1ListDatasetEntriesResponse = (output, context) => {
|
|
8518
|
+
return {
|
|
8519
|
+
DatasetEntries: output.DatasetEntries !== undefined && output.DatasetEntries !== null
|
|
8520
|
+
? deserializeAws_json1_1DatasetEntries(output.DatasetEntries, context)
|
|
8521
|
+
: undefined,
|
|
8522
|
+
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
8523
|
+
};
|
|
8524
|
+
};
|
|
8525
|
+
const deserializeAws_json1_1ListDatasetLabelsResponse = (output, context) => {
|
|
8526
|
+
return {
|
|
8527
|
+
DatasetLabelDescriptions: output.DatasetLabelDescriptions !== undefined && output.DatasetLabelDescriptions !== null
|
|
8528
|
+
? deserializeAws_json1_1DatasetLabelDescriptions(output.DatasetLabelDescriptions, context)
|
|
8529
|
+
: undefined,
|
|
8530
|
+
NextToken: smithy_client_1.expectString(output.NextToken),
|
|
8531
|
+
};
|
|
8532
|
+
};
|
|
7516
8533
|
const deserializeAws_json1_1ListFacesResponse = (output, context) => {
|
|
7517
8534
|
return {
|
|
7518
8535
|
FaceModelVersion: smithy_client_1.expectString(output.FaceModelVersion),
|
|
@@ -7665,6 +8682,9 @@ const deserializeAws_json1_1ProjectDescription = (output, context) => {
|
|
|
7665
8682
|
CreationTimestamp: output.CreationTimestamp !== undefined && output.CreationTimestamp !== null
|
|
7666
8683
|
? smithy_client_1.expectNonNull(smithy_client_1.parseEpochTimestamp(smithy_client_1.expectNumber(output.CreationTimestamp)))
|
|
7667
8684
|
: undefined,
|
|
8685
|
+
Datasets: output.Datasets !== undefined && output.Datasets !== null
|
|
8686
|
+
? deserializeAws_json1_1DatasetMetadataList(output.Datasets, context)
|
|
8687
|
+
: undefined,
|
|
7668
8688
|
ProjectArn: smithy_client_1.expectString(output.ProjectArn),
|
|
7669
8689
|
Status: smithy_client_1.expectString(output.Status),
|
|
7670
8690
|
};
|
|
@@ -8160,6 +9180,9 @@ const deserializeAws_json1_1UnindexedFaces = (output, context) => {
|
|
|
8160
9180
|
const deserializeAws_json1_1UntagResourceResponse = (output, context) => {
|
|
8161
9181
|
return {};
|
|
8162
9182
|
};
|
|
9183
|
+
const deserializeAws_json1_1UpdateDatasetEntriesResponse = (output, context) => {
|
|
9184
|
+
return {};
|
|
9185
|
+
};
|
|
8163
9186
|
const deserializeAws_json1_1Urls = (output, context) => {
|
|
8164
9187
|
return (output || [])
|
|
8165
9188
|
.filter((e) => e != null)
|