@aws-sdk/client-rekognition 3.350.0 → 3.352.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.
Files changed (94) hide show
  1. package/README.md +98 -7
  2. package/dist-cjs/Rekognition.js +14 -0
  3. package/dist-cjs/commands/AssociateFacesCommand.js +46 -0
  4. package/dist-cjs/commands/CreateUserCommand.js +46 -0
  5. package/dist-cjs/commands/DeleteUserCommand.js +46 -0
  6. package/dist-cjs/commands/DisassociateFacesCommand.js +46 -0
  7. package/dist-cjs/commands/ListUsersCommand.js +46 -0
  8. package/dist-cjs/commands/SearchUsersByImageCommand.js +46 -0
  9. package/dist-cjs/commands/SearchUsersCommand.js +46 -0
  10. package/dist-cjs/commands/index.js +7 -0
  11. package/dist-cjs/models/models_0.js +159 -130
  12. package/dist-cjs/models/models_1.js +18 -1
  13. package/dist-cjs/pagination/ListUsersPaginator.js +29 -0
  14. package/dist-cjs/pagination/index.js +1 -0
  15. package/dist-cjs/protocols/Aws_json1_1.js +565 -4
  16. package/dist-es/Rekognition.js +14 -0
  17. package/dist-es/commands/AssociateFacesCommand.js +42 -0
  18. package/dist-es/commands/CreateUserCommand.js +42 -0
  19. package/dist-es/commands/DeleteUserCommand.js +42 -0
  20. package/dist-es/commands/DisassociateFacesCommand.js +42 -0
  21. package/dist-es/commands/ListUsersCommand.js +42 -0
  22. package/dist-es/commands/SearchUsersByImageCommand.js +42 -0
  23. package/dist-es/commands/SearchUsersCommand.js +42 -0
  24. package/dist-es/commands/index.js +7 -0
  25. package/dist-es/models/models_0.js +149 -120
  26. package/dist-es/models/models_1.js +16 -0
  27. package/dist-es/pagination/ListUsersPaginator.js +25 -0
  28. package/dist-es/pagination/index.js +1 -0
  29. package/dist-es/protocols/Aws_json1_1.js +548 -1
  30. package/dist-types/Rekognition.d.ts +84 -0
  31. package/dist-types/RekognitionClient.d.ts +44 -2
  32. package/dist-types/commands/AssociateFacesCommand.d.ts +203 -0
  33. package/dist-types/commands/CreateUserCommand.d.ts +126 -0
  34. package/dist-types/commands/DeleteFacesCommand.d.ts +9 -0
  35. package/dist-types/commands/DeleteUserCommand.d.ts +119 -0
  36. package/dist-types/commands/DescribeCollectionCommand.d.ts +1 -0
  37. package/dist-types/commands/DisassociateFacesCommand.d.ts +164 -0
  38. package/dist-types/commands/GetFaceSearchCommand.d.ts +1 -0
  39. package/dist-types/commands/IndexFacesCommand.d.ts +1 -0
  40. package/dist-types/commands/ListFacesCommand.d.ts +5 -0
  41. package/dist-types/commands/ListUsersCommand.d.ts +134 -0
  42. package/dist-types/commands/SearchFacesByImageCommand.d.ts +1 -0
  43. package/dist-types/commands/SearchFacesCommand.d.ts +1 -0
  44. package/dist-types/commands/SearchUsersByImageCommand.d.ts +366 -0
  45. package/dist-types/commands/SearchUsersCommand.d.ts +148 -0
  46. package/dist-types/commands/StartCelebrityRecognitionCommand.d.ts +2 -1
  47. package/dist-types/commands/StartContentModerationCommand.d.ts +1 -1
  48. package/dist-types/commands/StartFaceDetectionCommand.d.ts +1 -1
  49. package/dist-types/commands/StartFaceSearchCommand.d.ts +1 -1
  50. package/dist-types/commands/StartLabelDetectionCommand.d.ts +1 -1
  51. package/dist-types/commands/StartPersonTrackingCommand.d.ts +1 -1
  52. package/dist-types/commands/StartProjectVersionCommand.d.ts +1 -1
  53. package/dist-types/commands/StartSegmentDetectionCommand.d.ts +1 -1
  54. package/dist-types/commands/StartStreamProcessorCommand.d.ts +1 -1
  55. package/dist-types/commands/StartTextDetectionCommand.d.ts +1 -1
  56. package/dist-types/commands/StopProjectVersionCommand.d.ts +1 -1
  57. package/dist-types/commands/StopStreamProcessorCommand.d.ts +1 -1
  58. package/dist-types/commands/TagResourceCommand.d.ts +1 -1
  59. package/dist-types/commands/index.d.ts +7 -0
  60. package/dist-types/index.d.ts +35 -0
  61. package/dist-types/models/models_0.d.ts +668 -604
  62. package/dist-types/models/models_1.d.ts +562 -1
  63. package/dist-types/pagination/ListUsersPaginator.d.ts +7 -0
  64. package/dist-types/pagination/index.d.ts +1 -0
  65. package/dist-types/protocols/Aws_json1_1.d.ts +63 -0
  66. package/dist-types/ts3.4/Rekognition.d.ts +119 -0
  67. package/dist-types/ts3.4/RekognitionClient.d.ts +42 -0
  68. package/dist-types/ts3.4/commands/AssociateFacesCommand.d.ts +38 -0
  69. package/dist-types/ts3.4/commands/CreateUserCommand.d.ts +35 -0
  70. package/dist-types/ts3.4/commands/DeleteUserCommand.d.ts +35 -0
  71. package/dist-types/ts3.4/commands/DisassociateFacesCommand.d.ts +39 -0
  72. package/dist-types/ts3.4/commands/ListUsersCommand.d.ts +35 -0
  73. package/dist-types/ts3.4/commands/SearchUsersByImageCommand.d.ts +39 -0
  74. package/dist-types/ts3.4/commands/SearchUsersCommand.d.ts +35 -0
  75. package/dist-types/ts3.4/commands/StartCelebrityRecognitionCommand.d.ts +2 -4
  76. package/dist-types/ts3.4/commands/StartContentModerationCommand.d.ts +1 -1
  77. package/dist-types/ts3.4/commands/StartFaceDetectionCommand.d.ts +1 -1
  78. package/dist-types/ts3.4/commands/StartFaceSearchCommand.d.ts +1 -1
  79. package/dist-types/ts3.4/commands/StartLabelDetectionCommand.d.ts +1 -1
  80. package/dist-types/ts3.4/commands/StartPersonTrackingCommand.d.ts +1 -1
  81. package/dist-types/ts3.4/commands/StartProjectVersionCommand.d.ts +1 -1
  82. package/dist-types/ts3.4/commands/StartSegmentDetectionCommand.d.ts +1 -1
  83. package/dist-types/ts3.4/commands/StartStreamProcessorCommand.d.ts +1 -1
  84. package/dist-types/ts3.4/commands/StartTextDetectionCommand.d.ts +1 -1
  85. package/dist-types/ts3.4/commands/StopProjectVersionCommand.d.ts +1 -1
  86. package/dist-types/ts3.4/commands/StopStreamProcessorCommand.d.ts +1 -1
  87. package/dist-types/ts3.4/commands/TagResourceCommand.d.ts +1 -1
  88. package/dist-types/ts3.4/commands/index.d.ts +7 -0
  89. package/dist-types/ts3.4/models/models_0.d.ts +236 -206
  90. package/dist-types/ts3.4/models/models_1.d.ts +150 -0
  91. package/dist-types/ts3.4/pagination/ListUsersPaginator.d.ts +11 -0
  92. package/dist-types/ts3.4/pagination/index.d.ts +1 -0
  93. package/dist-types/ts3.4/protocols/Aws_json1_1.d.ts +84 -0
  94. package/package.json +8 -6
@@ -1,7 +1,15 @@
1
1
  import { _json, decorateServiceException as __decorateServiceException, expectBoolean as __expectBoolean, expectInt32 as __expectInt32, expectLong as __expectLong, expectNonNull as __expectNonNull, expectNumber as __expectNumber, expectString as __expectString, LazyJsonString as __LazyJsonString, limitedParseFloat32 as __limitedParseFloat32, parseEpochTimestamp as __parseEpochTimestamp, serializeFloat as __serializeFloat, take, withBaseException, } from "@aws-sdk/smithy-client";
2
2
  import { HttpRequest as __HttpRequest } from "@smithy/protocol-http";
3
- import { AccessDeniedException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, ImageTooLargeException, InternalServerError, InvalidImageFormatException, InvalidPaginationTokenException, InvalidParameterException, InvalidPolicyRevisionIdException, InvalidS3ObjectException, LimitExceededException, MalformedPolicyDocumentException, ProvisionedThroughputExceededException, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, SessionNotFoundException, ThrottlingException, VideoTooLargeException, } from "../models/models_0";
3
+ import { v4 as generateIdempotencyToken } from "uuid";
4
+ import { AccessDeniedException, ConflictException, HumanLoopQuotaExceededException, IdempotentParameterMismatchException, ImageTooLargeException, InternalServerError, InvalidImageFormatException, InvalidPaginationTokenException, InvalidParameterException, InvalidPolicyRevisionIdException, InvalidS3ObjectException, LimitExceededException, MalformedPolicyDocumentException, ProvisionedThroughputExceededException, ResourceAlreadyExistsException, ResourceInUseException, ResourceNotFoundException, ResourceNotReadyException, ServiceQuotaExceededException, SessionNotFoundException, ThrottlingException, } from "../models/models_0";
5
+ import { VideoTooLargeException, } from "../models/models_1";
4
6
  import { RekognitionServiceException as __BaseException } from "../models/RekognitionServiceException";
7
+ export const se_AssociateFacesCommand = async (input, context) => {
8
+ const headers = sharedHeaders("AssociateFaces");
9
+ let body;
10
+ body = JSON.stringify(se_AssociateFacesRequest(input, context));
11
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
12
+ };
5
13
  export const se_CompareFacesCommand = async (input, context) => {
6
14
  const headers = sharedHeaders("CompareFaces");
7
15
  let body;
@@ -50,6 +58,12 @@ export const se_CreateStreamProcessorCommand = async (input, context) => {
50
58
  body = JSON.stringify(se_CreateStreamProcessorRequest(input, context));
51
59
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
52
60
  };
61
+ export const se_CreateUserCommand = async (input, context) => {
62
+ const headers = sharedHeaders("CreateUser");
63
+ let body;
64
+ body = JSON.stringify(se_CreateUserRequest(input, context));
65
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
66
+ };
53
67
  export const se_DeleteCollectionCommand = async (input, context) => {
54
68
  const headers = sharedHeaders("DeleteCollection");
55
69
  let body;
@@ -92,6 +106,12 @@ export const se_DeleteStreamProcessorCommand = async (input, context) => {
92
106
  body = JSON.stringify(_json(input));
93
107
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
94
108
  };
109
+ export const se_DeleteUserCommand = async (input, context) => {
110
+ const headers = sharedHeaders("DeleteUser");
111
+ let body;
112
+ body = JSON.stringify(se_DeleteUserRequest(input, context));
113
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
114
+ };
95
115
  export const se_DescribeCollectionCommand = async (input, context) => {
96
116
  const headers = sharedHeaders("DescribeCollection");
97
117
  let body;
@@ -158,6 +178,12 @@ export const se_DetectTextCommand = async (input, context) => {
158
178
  body = JSON.stringify(se_DetectTextRequest(input, context));
159
179
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
160
180
  };
181
+ export const se_DisassociateFacesCommand = async (input, context) => {
182
+ const headers = sharedHeaders("DisassociateFaces");
183
+ let body;
184
+ body = JSON.stringify(se_DisassociateFacesRequest(input, context));
185
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
186
+ };
161
187
  export const se_DistributeDatasetEntriesCommand = async (input, context) => {
162
188
  const headers = sharedHeaders("DistributeDatasetEntries");
163
189
  let body;
@@ -272,6 +298,12 @@ export const se_ListTagsForResourceCommand = async (input, context) => {
272
298
  body = JSON.stringify(_json(input));
273
299
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
274
300
  };
301
+ export const se_ListUsersCommand = async (input, context) => {
302
+ const headers = sharedHeaders("ListUsers");
303
+ let body;
304
+ body = JSON.stringify(_json(input));
305
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
306
+ };
275
307
  export const se_PutProjectPolicyCommand = async (input, context) => {
276
308
  const headers = sharedHeaders("PutProjectPolicy");
277
309
  let body;
@@ -296,6 +328,18 @@ export const se_SearchFacesByImageCommand = async (input, context) => {
296
328
  body = JSON.stringify(se_SearchFacesByImageRequest(input, context));
297
329
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
298
330
  };
331
+ export const se_SearchUsersCommand = async (input, context) => {
332
+ const headers = sharedHeaders("SearchUsers");
333
+ let body;
334
+ body = JSON.stringify(se_SearchUsersRequest(input, context));
335
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
336
+ };
337
+ export const se_SearchUsersByImageCommand = async (input, context) => {
338
+ const headers = sharedHeaders("SearchUsersByImage");
339
+ let body;
340
+ body = JSON.stringify(se_SearchUsersByImageRequest(input, context));
341
+ return buildHttpRpcRequest(context, headers, "/", undefined, body);
342
+ };
299
343
  export const se_StartCelebrityRecognitionCommand = async (input, context) => {
300
344
  const headers = sharedHeaders("StartCelebrityRecognition");
301
345
  let body;
@@ -392,6 +436,62 @@ export const se_UpdateStreamProcessorCommand = async (input, context) => {
392
436
  body = JSON.stringify(se_UpdateStreamProcessorRequest(input, context));
393
437
  return buildHttpRpcRequest(context, headers, "/", undefined, body);
394
438
  };
439
+ export const de_AssociateFacesCommand = async (output, context) => {
440
+ if (output.statusCode >= 300) {
441
+ return de_AssociateFacesCommandError(output, context);
442
+ }
443
+ const data = await parseBody(output.body, context);
444
+ let contents = {};
445
+ contents = de_AssociateFacesResponse(data, context);
446
+ const response = {
447
+ $metadata: deserializeMetadata(output),
448
+ ...contents,
449
+ };
450
+ return response;
451
+ };
452
+ const de_AssociateFacesCommandError = async (output, context) => {
453
+ const parsedOutput = {
454
+ ...output,
455
+ body: await parseErrorBody(output.body, context),
456
+ };
457
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
458
+ switch (errorCode) {
459
+ case "AccessDeniedException":
460
+ case "com.amazonaws.rekognition#AccessDeniedException":
461
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
462
+ case "ConflictException":
463
+ case "com.amazonaws.rekognition#ConflictException":
464
+ throw await de_ConflictExceptionRes(parsedOutput, context);
465
+ case "IdempotentParameterMismatchException":
466
+ case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
467
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
468
+ case "InternalServerError":
469
+ case "com.amazonaws.rekognition#InternalServerError":
470
+ throw await de_InternalServerErrorRes(parsedOutput, context);
471
+ case "InvalidParameterException":
472
+ case "com.amazonaws.rekognition#InvalidParameterException":
473
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
474
+ case "ProvisionedThroughputExceededException":
475
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
476
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
477
+ case "ResourceNotFoundException":
478
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
479
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
480
+ case "ServiceQuotaExceededException":
481
+ case "com.amazonaws.rekognition#ServiceQuotaExceededException":
482
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
483
+ case "ThrottlingException":
484
+ case "com.amazonaws.rekognition#ThrottlingException":
485
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
486
+ default:
487
+ const parsedBody = parsedOutput.body;
488
+ return throwDefaultError({
489
+ output,
490
+ parsedBody,
491
+ errorCode,
492
+ });
493
+ }
494
+ };
395
495
  export const de_CompareFacesCommand = async (output, context) => {
396
496
  if (output.statusCode >= 300) {
397
497
  return de_CompareFacesCommandError(output, context);
@@ -810,6 +910,62 @@ const de_CreateStreamProcessorCommandError = async (output, context) => {
810
910
  });
811
911
  }
812
912
  };
913
+ export const de_CreateUserCommand = async (output, context) => {
914
+ if (output.statusCode >= 300) {
915
+ return de_CreateUserCommandError(output, context);
916
+ }
917
+ const data = await parseBody(output.body, context);
918
+ let contents = {};
919
+ contents = _json(data);
920
+ const response = {
921
+ $metadata: deserializeMetadata(output),
922
+ ...contents,
923
+ };
924
+ return response;
925
+ };
926
+ const de_CreateUserCommandError = async (output, context) => {
927
+ const parsedOutput = {
928
+ ...output,
929
+ body: await parseErrorBody(output.body, context),
930
+ };
931
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
932
+ switch (errorCode) {
933
+ case "AccessDeniedException":
934
+ case "com.amazonaws.rekognition#AccessDeniedException":
935
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
936
+ case "ConflictException":
937
+ case "com.amazonaws.rekognition#ConflictException":
938
+ throw await de_ConflictExceptionRes(parsedOutput, context);
939
+ case "IdempotentParameterMismatchException":
940
+ case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
941
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
942
+ case "InternalServerError":
943
+ case "com.amazonaws.rekognition#InternalServerError":
944
+ throw await de_InternalServerErrorRes(parsedOutput, context);
945
+ case "InvalidParameterException":
946
+ case "com.amazonaws.rekognition#InvalidParameterException":
947
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
948
+ case "ProvisionedThroughputExceededException":
949
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
950
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
951
+ case "ResourceNotFoundException":
952
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
953
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
954
+ case "ServiceQuotaExceededException":
955
+ case "com.amazonaws.rekognition#ServiceQuotaExceededException":
956
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
957
+ case "ThrottlingException":
958
+ case "com.amazonaws.rekognition#ThrottlingException":
959
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
960
+ default:
961
+ const parsedBody = parsedOutput.body;
962
+ return throwDefaultError({
963
+ output,
964
+ parsedBody,
965
+ errorCode,
966
+ });
967
+ }
968
+ };
813
969
  export const de_DeleteCollectionCommand = async (output, context) => {
814
970
  if (output.statusCode >= 300) {
815
971
  return de_DeleteCollectionCommandError(output, context);
@@ -1157,6 +1313,59 @@ const de_DeleteStreamProcessorCommandError = async (output, context) => {
1157
1313
  });
1158
1314
  }
1159
1315
  };
1316
+ export const de_DeleteUserCommand = async (output, context) => {
1317
+ if (output.statusCode >= 300) {
1318
+ return de_DeleteUserCommandError(output, context);
1319
+ }
1320
+ const data = await parseBody(output.body, context);
1321
+ let contents = {};
1322
+ contents = _json(data);
1323
+ const response = {
1324
+ $metadata: deserializeMetadata(output),
1325
+ ...contents,
1326
+ };
1327
+ return response;
1328
+ };
1329
+ const de_DeleteUserCommandError = async (output, context) => {
1330
+ const parsedOutput = {
1331
+ ...output,
1332
+ body: await parseErrorBody(output.body, context),
1333
+ };
1334
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1335
+ switch (errorCode) {
1336
+ case "AccessDeniedException":
1337
+ case "com.amazonaws.rekognition#AccessDeniedException":
1338
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1339
+ case "ConflictException":
1340
+ case "com.amazonaws.rekognition#ConflictException":
1341
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1342
+ case "IdempotentParameterMismatchException":
1343
+ case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
1344
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1345
+ case "InternalServerError":
1346
+ case "com.amazonaws.rekognition#InternalServerError":
1347
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1348
+ case "InvalidParameterException":
1349
+ case "com.amazonaws.rekognition#InvalidParameterException":
1350
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1351
+ case "ProvisionedThroughputExceededException":
1352
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1353
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1354
+ case "ResourceNotFoundException":
1355
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
1356
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1357
+ case "ThrottlingException":
1358
+ case "com.amazonaws.rekognition#ThrottlingException":
1359
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1360
+ default:
1361
+ const parsedBody = parsedOutput.body;
1362
+ return throwDefaultError({
1363
+ output,
1364
+ parsedBody,
1365
+ errorCode,
1366
+ });
1367
+ }
1368
+ };
1160
1369
  export const de_DescribeCollectionCommand = async (output, context) => {
1161
1370
  if (output.statusCode >= 300) {
1162
1371
  return de_DescribeCollectionCommandError(output, context);
@@ -1725,6 +1934,59 @@ const de_DetectTextCommandError = async (output, context) => {
1725
1934
  });
1726
1935
  }
1727
1936
  };
1937
+ export const de_DisassociateFacesCommand = async (output, context) => {
1938
+ if (output.statusCode >= 300) {
1939
+ return de_DisassociateFacesCommandError(output, context);
1940
+ }
1941
+ const data = await parseBody(output.body, context);
1942
+ let contents = {};
1943
+ contents = _json(data);
1944
+ const response = {
1945
+ $metadata: deserializeMetadata(output),
1946
+ ...contents,
1947
+ };
1948
+ return response;
1949
+ };
1950
+ const de_DisassociateFacesCommandError = async (output, context) => {
1951
+ const parsedOutput = {
1952
+ ...output,
1953
+ body: await parseErrorBody(output.body, context),
1954
+ };
1955
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
1956
+ switch (errorCode) {
1957
+ case "AccessDeniedException":
1958
+ case "com.amazonaws.rekognition#AccessDeniedException":
1959
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
1960
+ case "ConflictException":
1961
+ case "com.amazonaws.rekognition#ConflictException":
1962
+ throw await de_ConflictExceptionRes(parsedOutput, context);
1963
+ case "IdempotentParameterMismatchException":
1964
+ case "com.amazonaws.rekognition#IdempotentParameterMismatchException":
1965
+ throw await de_IdempotentParameterMismatchExceptionRes(parsedOutput, context);
1966
+ case "InternalServerError":
1967
+ case "com.amazonaws.rekognition#InternalServerError":
1968
+ throw await de_InternalServerErrorRes(parsedOutput, context);
1969
+ case "InvalidParameterException":
1970
+ case "com.amazonaws.rekognition#InvalidParameterException":
1971
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
1972
+ case "ProvisionedThroughputExceededException":
1973
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
1974
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
1975
+ case "ResourceNotFoundException":
1976
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
1977
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
1978
+ case "ThrottlingException":
1979
+ case "com.amazonaws.rekognition#ThrottlingException":
1980
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
1981
+ default:
1982
+ const parsedBody = parsedOutput.body;
1983
+ return throwDefaultError({
1984
+ output,
1985
+ parsedBody,
1986
+ errorCode,
1987
+ });
1988
+ }
1989
+ };
1728
1990
  export const de_DistributeDatasetEntriesCommand = async (output, context) => {
1729
1991
  if (output.statusCode >= 300) {
1730
1992
  return de_DistributeDatasetEntriesCommandError(output, context);
@@ -2684,6 +2946,56 @@ const de_ListTagsForResourceCommandError = async (output, context) => {
2684
2946
  });
2685
2947
  }
2686
2948
  };
2949
+ export const de_ListUsersCommand = async (output, context) => {
2950
+ if (output.statusCode >= 300) {
2951
+ return de_ListUsersCommandError(output, context);
2952
+ }
2953
+ const data = await parseBody(output.body, context);
2954
+ let contents = {};
2955
+ contents = _json(data);
2956
+ const response = {
2957
+ $metadata: deserializeMetadata(output),
2958
+ ...contents,
2959
+ };
2960
+ return response;
2961
+ };
2962
+ const de_ListUsersCommandError = async (output, context) => {
2963
+ const parsedOutput = {
2964
+ ...output,
2965
+ body: await parseErrorBody(output.body, context),
2966
+ };
2967
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
2968
+ switch (errorCode) {
2969
+ case "AccessDeniedException":
2970
+ case "com.amazonaws.rekognition#AccessDeniedException":
2971
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
2972
+ case "InternalServerError":
2973
+ case "com.amazonaws.rekognition#InternalServerError":
2974
+ throw await de_InternalServerErrorRes(parsedOutput, context);
2975
+ case "InvalidPaginationTokenException":
2976
+ case "com.amazonaws.rekognition#InvalidPaginationTokenException":
2977
+ throw await de_InvalidPaginationTokenExceptionRes(parsedOutput, context);
2978
+ case "InvalidParameterException":
2979
+ case "com.amazonaws.rekognition#InvalidParameterException":
2980
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
2981
+ case "ProvisionedThroughputExceededException":
2982
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
2983
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
2984
+ case "ResourceNotFoundException":
2985
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
2986
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
2987
+ case "ThrottlingException":
2988
+ case "com.amazonaws.rekognition#ThrottlingException":
2989
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
2990
+ default:
2991
+ const parsedBody = parsedOutput.body;
2992
+ return throwDefaultError({
2993
+ output,
2994
+ parsedBody,
2995
+ errorCode,
2996
+ });
2997
+ }
2998
+ };
2687
2999
  export const de_PutProjectPolicyCommand = async (output, context) => {
2688
3000
  if (output.statusCode >= 300) {
2689
3001
  return de_PutProjectPolicyCommandError(output, context);
@@ -2902,6 +3214,109 @@ const de_SearchFacesByImageCommandError = async (output, context) => {
2902
3214
  });
2903
3215
  }
2904
3216
  };
3217
+ export const de_SearchUsersCommand = async (output, context) => {
3218
+ if (output.statusCode >= 300) {
3219
+ return de_SearchUsersCommandError(output, context);
3220
+ }
3221
+ const data = await parseBody(output.body, context);
3222
+ let contents = {};
3223
+ contents = de_SearchUsersResponse(data, context);
3224
+ const response = {
3225
+ $metadata: deserializeMetadata(output),
3226
+ ...contents,
3227
+ };
3228
+ return response;
3229
+ };
3230
+ const de_SearchUsersCommandError = async (output, context) => {
3231
+ const parsedOutput = {
3232
+ ...output,
3233
+ body: await parseErrorBody(output.body, context),
3234
+ };
3235
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3236
+ switch (errorCode) {
3237
+ case "AccessDeniedException":
3238
+ case "com.amazonaws.rekognition#AccessDeniedException":
3239
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3240
+ case "InternalServerError":
3241
+ case "com.amazonaws.rekognition#InternalServerError":
3242
+ throw await de_InternalServerErrorRes(parsedOutput, context);
3243
+ case "InvalidParameterException":
3244
+ case "com.amazonaws.rekognition#InvalidParameterException":
3245
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3246
+ case "ProvisionedThroughputExceededException":
3247
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3248
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3249
+ case "ResourceNotFoundException":
3250
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
3251
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3252
+ case "ThrottlingException":
3253
+ case "com.amazonaws.rekognition#ThrottlingException":
3254
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3255
+ default:
3256
+ const parsedBody = parsedOutput.body;
3257
+ return throwDefaultError({
3258
+ output,
3259
+ parsedBody,
3260
+ errorCode,
3261
+ });
3262
+ }
3263
+ };
3264
+ export const de_SearchUsersByImageCommand = async (output, context) => {
3265
+ if (output.statusCode >= 300) {
3266
+ return de_SearchUsersByImageCommandError(output, context);
3267
+ }
3268
+ const data = await parseBody(output.body, context);
3269
+ let contents = {};
3270
+ contents = de_SearchUsersByImageResponse(data, context);
3271
+ const response = {
3272
+ $metadata: deserializeMetadata(output),
3273
+ ...contents,
3274
+ };
3275
+ return response;
3276
+ };
3277
+ const de_SearchUsersByImageCommandError = async (output, context) => {
3278
+ const parsedOutput = {
3279
+ ...output,
3280
+ body: await parseErrorBody(output.body, context),
3281
+ };
3282
+ const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
3283
+ switch (errorCode) {
3284
+ case "AccessDeniedException":
3285
+ case "com.amazonaws.rekognition#AccessDeniedException":
3286
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
3287
+ case "ImageTooLargeException":
3288
+ case "com.amazonaws.rekognition#ImageTooLargeException":
3289
+ throw await de_ImageTooLargeExceptionRes(parsedOutput, context);
3290
+ case "InternalServerError":
3291
+ case "com.amazonaws.rekognition#InternalServerError":
3292
+ throw await de_InternalServerErrorRes(parsedOutput, context);
3293
+ case "InvalidImageFormatException":
3294
+ case "com.amazonaws.rekognition#InvalidImageFormatException":
3295
+ throw await de_InvalidImageFormatExceptionRes(parsedOutput, context);
3296
+ case "InvalidParameterException":
3297
+ case "com.amazonaws.rekognition#InvalidParameterException":
3298
+ throw await de_InvalidParameterExceptionRes(parsedOutput, context);
3299
+ case "InvalidS3ObjectException":
3300
+ case "com.amazonaws.rekognition#InvalidS3ObjectException":
3301
+ throw await de_InvalidS3ObjectExceptionRes(parsedOutput, context);
3302
+ case "ProvisionedThroughputExceededException":
3303
+ case "com.amazonaws.rekognition#ProvisionedThroughputExceededException":
3304
+ throw await de_ProvisionedThroughputExceededExceptionRes(parsedOutput, context);
3305
+ case "ResourceNotFoundException":
3306
+ case "com.amazonaws.rekognition#ResourceNotFoundException":
3307
+ throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);
3308
+ case "ThrottlingException":
3309
+ case "com.amazonaws.rekognition#ThrottlingException":
3310
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
3311
+ default:
3312
+ const parsedBody = parsedOutput.body;
3313
+ return throwDefaultError({
3314
+ output,
3315
+ parsedBody,
3316
+ errorCode,
3317
+ });
3318
+ }
3319
+ };
2905
3320
  export const de_StartCelebrityRecognitionCommand = async (output, context) => {
2906
3321
  if (output.statusCode >= 300) {
2907
3322
  return de_StartCelebrityRecognitionCommandError(output, context);
@@ -3765,6 +4180,15 @@ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
3765
4180
  });
3766
4181
  return __decorateServiceException(exception, body);
3767
4182
  };
4183
+ const de_ConflictExceptionRes = async (parsedOutput, context) => {
4184
+ const body = parsedOutput.body;
4185
+ const deserialized = _json(body);
4186
+ const exception = new ConflictException({
4187
+ $metadata: deserializeMetadata(parsedOutput),
4188
+ ...deserialized,
4189
+ });
4190
+ return __decorateServiceException(exception, body);
4191
+ };
3768
4192
  const de_HumanLoopQuotaExceededExceptionRes = async (parsedOutput, context) => {
3769
4193
  const body = parsedOutput.body;
3770
4194
  const deserialized = _json(body);
@@ -3945,6 +4369,15 @@ const de_VideoTooLargeExceptionRes = async (parsedOutput, context) => {
3945
4369
  });
3946
4370
  return __decorateServiceException(exception, body);
3947
4371
  };
4372
+ const se_AssociateFacesRequest = (input, context) => {
4373
+ return take(input, {
4374
+ ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
4375
+ CollectionId: [],
4376
+ FaceIds: _json,
4377
+ UserId: [],
4378
+ UserMatchThreshold: __serializeFloat,
4379
+ });
4380
+ };
3948
4381
  const se_BlackFrame = (input, context) => {
3949
4382
  return take(input, {
3950
4383
  MaxPixelThreshold: __serializeFloat,
@@ -3993,11 +4426,25 @@ const se_CreateStreamProcessorRequest = (input, context) => {
3993
4426
  Tags: _json,
3994
4427
  });
3995
4428
  };
4429
+ const se_CreateUserRequest = (input, context) => {
4430
+ return take(input, {
4431
+ ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
4432
+ CollectionId: [],
4433
+ UserId: [],
4434
+ });
4435
+ };
3996
4436
  const se_DatasetChanges = (input, context) => {
3997
4437
  return take(input, {
3998
4438
  GroundTruth: context.base64Encoder,
3999
4439
  });
4000
4440
  };
4441
+ const se_DeleteUserRequest = (input, context) => {
4442
+ return take(input, {
4443
+ ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
4444
+ CollectionId: [],
4445
+ UserId: [],
4446
+ });
4447
+ };
4001
4448
  const se_DetectCustomLabelsRequest = (input, context) => {
4002
4449
  return take(input, {
4003
4450
  Image: (_) => se_Image(_, context),
@@ -4053,6 +4500,14 @@ const se_DetectTextRequest = (input, context) => {
4053
4500
  Image: (_) => se_Image(_, context),
4054
4501
  });
4055
4502
  };
4503
+ const se_DisassociateFacesRequest = (input, context) => {
4504
+ return take(input, {
4505
+ ClientRequestToken: [true, (_) => _ ?? generateIdempotencyToken()],
4506
+ CollectionId: [],
4507
+ FaceIds: _json,
4508
+ UserId: [],
4509
+ });
4510
+ };
4056
4511
  const se_FaceSearchSettings = (input, context) => {
4057
4512
  return take(input, {
4058
4513
  CollectionId: [],
@@ -4129,6 +4584,24 @@ const se_SearchFacesRequest = (input, context) => {
4129
4584
  MaxFaces: [],
4130
4585
  });
4131
4586
  };
4587
+ const se_SearchUsersByImageRequest = (input, context) => {
4588
+ return take(input, {
4589
+ CollectionId: [],
4590
+ Image: (_) => se_Image(_, context),
4591
+ MaxUsers: [],
4592
+ QualityFilter: [],
4593
+ UserMatchThreshold: __serializeFloat,
4594
+ });
4595
+ };
4596
+ const se_SearchUsersRequest = (input, context) => {
4597
+ return take(input, {
4598
+ CollectionId: [],
4599
+ FaceId: [],
4600
+ MaxUsers: [],
4601
+ UserId: [],
4602
+ UserMatchThreshold: __serializeFloat,
4603
+ });
4604
+ };
4132
4605
  const se_StartContentModerationRequest = (input, context) => {
4133
4606
  return take(input, {
4134
4607
  ClientRequestToken: [],
@@ -4227,6 +4700,13 @@ const se_UpdateStreamProcessorRequest = (input, context) => {
4227
4700
  SettingsForUpdate: (_) => se_StreamProcessorSettingsForUpdate(_, context),
4228
4701
  });
4229
4702
  };
4703
+ const de_AssociateFacesResponse = (output, context) => {
4704
+ return take(output, {
4705
+ AssociatedFaces: _json,
4706
+ UnsuccessfulFaceAssociations: (_) => de_UnsuccessfulFaceAssociationList(_, context),
4707
+ UserStatus: __expectString,
4708
+ });
4709
+ };
4230
4710
  const de_AuditImage = (output, context) => {
4231
4711
  return take(output, {
4232
4712
  BoundingBox: (_) => de_BoundingBox(_, context),
@@ -4441,6 +4921,7 @@ const de_DescribeCollectionResponse = (output, context) => {
4441
4921
  CreationTimestamp: (_) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))),
4442
4922
  FaceCount: __expectLong,
4443
4923
  FaceModelVersion: __expectString,
4924
+ UserCount: __expectLong,
4444
4925
  });
4445
4926
  };
4446
4927
  const de_DescribeDatasetResponse = (output, context) => {
@@ -4626,6 +5107,7 @@ const de_Face = (output, context) => {
4626
5107
  FaceId: __expectString,
4627
5108
  ImageId: __expectString,
4628
5109
  IndexFacesModelVersion: __expectString,
5110
+ UserId: __expectString,
4629
5111
  });
4630
5112
  };
4631
5113
  const de_FaceDetail = (output, context) => {
@@ -5131,6 +5613,11 @@ const de_RegionsOfInterest = (output, context) => {
5131
5613
  });
5132
5614
  return retVal;
5133
5615
  };
5616
+ const de_SearchedFaceDetails = (output, context) => {
5617
+ return take(output, {
5618
+ FaceDetail: (_) => de_FaceDetail(_, context),
5619
+ });
5620
+ };
5134
5621
  const de_SearchFacesByImageResponse = (output, context) => {
5135
5622
  return take(output, {
5136
5623
  FaceMatches: (_) => de_FaceMatchList(_, context),
@@ -5146,6 +5633,22 @@ const de_SearchFacesResponse = (output, context) => {
5146
5633
  SearchedFaceId: __expectString,
5147
5634
  });
5148
5635
  };
5636
+ const de_SearchUsersByImageResponse = (output, context) => {
5637
+ return take(output, {
5638
+ FaceModelVersion: __expectString,
5639
+ SearchedFace: (_) => de_SearchedFaceDetails(_, context),
5640
+ UnsearchedFaces: (_) => de_UnsearchedFacesList(_, context),
5641
+ UserMatches: (_) => de_UserMatchList(_, context),
5642
+ });
5643
+ };
5644
+ const de_SearchUsersResponse = (output, context) => {
5645
+ return take(output, {
5646
+ FaceModelVersion: __expectString,
5647
+ SearchedFace: _json,
5648
+ SearchedUser: _json,
5649
+ UserMatches: (_) => de_UserMatchList(_, context),
5650
+ });
5651
+ };
5149
5652
  const de_SegmentDetection = (output, context) => {
5150
5653
  return take(output, {
5151
5654
  DurationFrames: __expectLong,
@@ -5246,6 +5749,50 @@ const de_UnindexedFaces = (output, context) => {
5246
5749
  });
5247
5750
  return retVal;
5248
5751
  };
5752
+ const de_UnsearchedFace = (output, context) => {
5753
+ return take(output, {
5754
+ FaceDetails: (_) => de_FaceDetail(_, context),
5755
+ Reasons: _json,
5756
+ });
5757
+ };
5758
+ const de_UnsearchedFacesList = (output, context) => {
5759
+ const retVal = (output || [])
5760
+ .filter((e) => e != null)
5761
+ .map((entry) => {
5762
+ return de_UnsearchedFace(entry, context);
5763
+ });
5764
+ return retVal;
5765
+ };
5766
+ const de_UnsuccessfulFaceAssociation = (output, context) => {
5767
+ return take(output, {
5768
+ Confidence: __limitedParseFloat32,
5769
+ FaceId: __expectString,
5770
+ Reasons: _json,
5771
+ UserId: __expectString,
5772
+ });
5773
+ };
5774
+ const de_UnsuccessfulFaceAssociationList = (output, context) => {
5775
+ const retVal = (output || [])
5776
+ .filter((e) => e != null)
5777
+ .map((entry) => {
5778
+ return de_UnsuccessfulFaceAssociation(entry, context);
5779
+ });
5780
+ return retVal;
5781
+ };
5782
+ const de_UserMatch = (output, context) => {
5783
+ return take(output, {
5784
+ Similarity: __limitedParseFloat32,
5785
+ User: _json,
5786
+ });
5787
+ };
5788
+ const de_UserMatchList = (output, context) => {
5789
+ const retVal = (output || [])
5790
+ .filter((e) => e != null)
5791
+ .map((entry) => {
5792
+ return de_UserMatch(entry, context);
5793
+ });
5794
+ return retVal;
5795
+ };
5249
5796
  const de_VideoMetadata = (output, context) => {
5250
5797
  return take(output, {
5251
5798
  Codec: __expectString,