@aws-sdk/client-rekognitionstreaming 3.306.0 → 3.309.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.
@@ -2,7 +2,7 @@ import { HttpRequest as __HttpRequest } from "@aws-sdk/protocol-http";
2
2
  import { decorateServiceException as __decorateServiceException, expectInt32 as __expectInt32, expectLong as __expectLong, expectString as __expectString, expectUnion as __expectUnion, limitedParseFloat32 as __limitedParseFloat32, map as __map, serializeFloat as __serializeFloat, throwDefaultError, } from "@aws-sdk/smithy-client";
3
3
  import { AccessDeniedException, ClientChallenge, InternalServerException, LivenessRequestStream, ServiceQuotaExceededException, ServiceUnavailableException, SessionNotFoundException, ThrottlingException, ValidationException, } from "../models/models_0";
4
4
  import { RekognitionStreamingServiceException as __BaseException } from "../models/RekognitionStreamingServiceException";
5
- export const serializeAws_restJson1StartFaceLivenessSessionCommand = async (input, context) => {
5
+ export const se_StartFaceLivenessSessionCommand = async (input, context) => {
6
6
  const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
7
7
  const headers = map({}, isSerializableHeaderValue, {
8
8
  "x-amz-rekognition-streaming-liveness-session-id": input.SessionId,
@@ -13,7 +13,7 @@ export const serializeAws_restJson1StartFaceLivenessSessionCommand = async (inpu
13
13
  const resolvedPath = `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/start-face-liveness-session";
14
14
  let body;
15
15
  if (input.LivenessRequestStream !== undefined) {
16
- body = serializeAws_restJson1LivenessRequestStream(input.LivenessRequestStream, context);
16
+ body = se_LivenessRequestStream(input.LivenessRequestStream, context);
17
17
  }
18
18
  return new __HttpRequest({
19
19
  protocol,
@@ -25,19 +25,19 @@ export const serializeAws_restJson1StartFaceLivenessSessionCommand = async (inpu
25
25
  body,
26
26
  });
27
27
  };
28
- export const deserializeAws_restJson1StartFaceLivenessSessionCommand = async (output, context) => {
28
+ export const de_StartFaceLivenessSessionCommand = async (output, context) => {
29
29
  if (output.statusCode !== 200 && output.statusCode >= 300) {
30
- return deserializeAws_restJson1StartFaceLivenessSessionCommandError(output, context);
30
+ return de_StartFaceLivenessSessionCommandError(output, context);
31
31
  }
32
32
  const contents = map({
33
33
  $metadata: deserializeMetadata(output),
34
34
  SessionId: [, output.headers["x-amz-rekognition-streaming-liveness-session-id"]],
35
35
  });
36
36
  const data = output.body;
37
- contents.LivenessResponseStream = deserializeAws_restJson1LivenessResponseStream(data, context);
37
+ contents.LivenessResponseStream = de_LivenessResponseStream(data, context);
38
38
  return contents;
39
39
  };
40
- const deserializeAws_restJson1StartFaceLivenessSessionCommandError = async (output, context) => {
40
+ const de_StartFaceLivenessSessionCommandError = async (output, context) => {
41
41
  const parsedOutput = {
42
42
  ...output,
43
43
  body: await parseErrorBody(output.body, context),
@@ -46,25 +46,25 @@ const deserializeAws_restJson1StartFaceLivenessSessionCommandError = async (outp
46
46
  switch (errorCode) {
47
47
  case "AccessDeniedException":
48
48
  case "com.amazonaws.rekognitionstreaming#AccessDeniedException":
49
- throw await deserializeAws_restJson1AccessDeniedExceptionResponse(parsedOutput, context);
49
+ throw await de_AccessDeniedExceptionRes(parsedOutput, context);
50
50
  case "InternalServerException":
51
51
  case "com.amazonaws.rekognitionstreaming#InternalServerException":
52
- throw await deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
52
+ throw await de_InternalServerExceptionRes(parsedOutput, context);
53
53
  case "ServiceQuotaExceededException":
54
54
  case "com.amazonaws.rekognitionstreaming#ServiceQuotaExceededException":
55
- throw await deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
55
+ throw await de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
56
56
  case "ServiceUnavailableException":
57
57
  case "com.amazonaws.rekognitionstreaming#ServiceUnavailableException":
58
- throw await deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
58
+ throw await de_ServiceUnavailableExceptionRes(parsedOutput, context);
59
59
  case "SessionNotFoundException":
60
60
  case "com.amazonaws.rekognitionstreaming#SessionNotFoundException":
61
- throw await deserializeAws_restJson1SessionNotFoundExceptionResponse(parsedOutput, context);
61
+ throw await de_SessionNotFoundExceptionRes(parsedOutput, context);
62
62
  case "ThrottlingException":
63
63
  case "com.amazonaws.rekognitionstreaming#ThrottlingException":
64
- throw await deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
64
+ throw await de_ThrottlingExceptionRes(parsedOutput, context);
65
65
  case "ValidationException":
66
66
  case "com.amazonaws.rekognitionstreaming#ValidationException":
67
- throw await deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
67
+ throw await de_ValidationExceptionRes(parsedOutput, context);
68
68
  default:
69
69
  const parsedBody = parsedOutput.body;
70
70
  throwDefaultError({
@@ -76,7 +76,7 @@ const deserializeAws_restJson1StartFaceLivenessSessionCommandError = async (outp
76
76
  }
77
77
  };
78
78
  const map = __map;
79
- const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutput, context) => {
79
+ const de_AccessDeniedExceptionRes = async (parsedOutput, context) => {
80
80
  const contents = map({});
81
81
  const data = parsedOutput.body;
82
82
  if (data.Code != null) {
@@ -91,7 +91,7 @@ const deserializeAws_restJson1AccessDeniedExceptionResponse = async (parsedOutpu
91
91
  });
92
92
  return __decorateServiceException(exception, parsedOutput.body);
93
93
  };
94
- const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOutput, context) => {
94
+ const de_InternalServerExceptionRes = async (parsedOutput, context) => {
95
95
  const contents = map({});
96
96
  const data = parsedOutput.body;
97
97
  if (data.Code != null) {
@@ -106,7 +106,7 @@ const deserializeAws_restJson1InternalServerExceptionResponse = async (parsedOut
106
106
  });
107
107
  return __decorateServiceException(exception, parsedOutput.body);
108
108
  };
109
- const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (parsedOutput, context) => {
109
+ const de_ServiceQuotaExceededExceptionRes = async (parsedOutput, context) => {
110
110
  const contents = map({});
111
111
  const data = parsedOutput.body;
112
112
  if (data.Code != null) {
@@ -121,7 +121,7 @@ const deserializeAws_restJson1ServiceQuotaExceededExceptionResponse = async (par
121
121
  });
122
122
  return __decorateServiceException(exception, parsedOutput.body);
123
123
  };
124
- const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parsedOutput, context) => {
124
+ const de_ServiceUnavailableExceptionRes = async (parsedOutput, context) => {
125
125
  const contents = map({});
126
126
  const data = parsedOutput.body;
127
127
  if (data.Code != null) {
@@ -136,7 +136,7 @@ const deserializeAws_restJson1ServiceUnavailableExceptionResponse = async (parse
136
136
  });
137
137
  return __decorateServiceException(exception, parsedOutput.body);
138
138
  };
139
- const deserializeAws_restJson1SessionNotFoundExceptionResponse = async (parsedOutput, context) => {
139
+ const de_SessionNotFoundExceptionRes = async (parsedOutput, context) => {
140
140
  const contents = map({});
141
141
  const data = parsedOutput.body;
142
142
  if (data.Code != null) {
@@ -151,7 +151,7 @@ const deserializeAws_restJson1SessionNotFoundExceptionResponse = async (parsedOu
151
151
  });
152
152
  return __decorateServiceException(exception, parsedOutput.body);
153
153
  };
154
- const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput, context) => {
154
+ const de_ThrottlingExceptionRes = async (parsedOutput, context) => {
155
155
  const contents = map({});
156
156
  const data = parsedOutput.body;
157
157
  if (data.Code != null) {
@@ -166,7 +166,7 @@ const deserializeAws_restJson1ThrottlingExceptionResponse = async (parsedOutput,
166
166
  });
167
167
  return __decorateServiceException(exception, parsedOutput.body);
168
168
  };
169
- const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput, context) => {
169
+ const de_ValidationExceptionRes = async (parsedOutput, context) => {
170
170
  const contents = map({});
171
171
  const data = parsedOutput.body;
172
172
  if (data.Code != null) {
@@ -181,124 +181,124 @@ const deserializeAws_restJson1ValidationExceptionResponse = async (parsedOutput,
181
181
  });
182
182
  return __decorateServiceException(exception, parsedOutput.body);
183
183
  };
184
- const serializeAws_restJson1LivenessRequestStream = (input, context) => {
184
+ const se_LivenessRequestStream = (input, context) => {
185
185
  const eventMarshallingVisitor = (event) => LivenessRequestStream.visit(event, {
186
- VideoEvent: (value) => serializeAws_restJson1VideoEvent_event(value, context),
187
- ClientSessionInformationEvent: (value) => serializeAws_restJson1ClientSessionInformationEvent_event(value, context),
186
+ VideoEvent: (value) => se_VideoEvent_event(value, context),
187
+ ClientSessionInformationEvent: (value) => se_ClientSessionInformationEvent_event(value, context),
188
188
  _: (value) => value,
189
189
  });
190
190
  return context.eventStreamMarshaller.serialize(input, eventMarshallingVisitor);
191
191
  };
192
- const serializeAws_restJson1ClientSessionInformationEvent_event = (input, context) => {
192
+ const se_ClientSessionInformationEvent_event = (input, context) => {
193
193
  const headers = {
194
194
  ":event-type": { type: "string", value: "ClientSessionInformationEvent" },
195
195
  ":message-type": { type: "string", value: "event" },
196
196
  ":content-type": { type: "string", value: "application/json" },
197
197
  };
198
198
  let body = new Uint8Array();
199
- body = serializeAws_restJson1ClientSessionInformationEvent(input, context);
199
+ body = se_ClientSessionInformationEvent(input, context);
200
200
  body = context.utf8Decoder(JSON.stringify(body));
201
201
  return { headers, body };
202
202
  };
203
- const serializeAws_restJson1VideoEvent_event = (input, context) => {
203
+ const se_VideoEvent_event = (input, context) => {
204
204
  const headers = {
205
205
  ":event-type": { type: "string", value: "VideoEvent" },
206
206
  ":message-type": { type: "string", value: "event" },
207
207
  ":content-type": { type: "string", value: "application/json" },
208
208
  };
209
209
  let body = new Uint8Array();
210
- body = serializeAws_restJson1VideoEvent(input, context);
210
+ body = se_VideoEvent(input, context);
211
211
  body = context.utf8Decoder(JSON.stringify(body));
212
212
  return { headers, body };
213
213
  };
214
- const deserializeAws_restJson1LivenessResponseStream = (output, context) => {
214
+ const de_LivenessResponseStream = (output, context) => {
215
215
  return context.eventStreamMarshaller.deserialize(output, async (event) => {
216
216
  if (event["ServerSessionInformationEvent"] != null) {
217
217
  return {
218
- ServerSessionInformationEvent: await deserializeAws_restJson1ServerSessionInformationEvent_event(event["ServerSessionInformationEvent"], context),
218
+ ServerSessionInformationEvent: await de_ServerSessionInformationEvent_event(event["ServerSessionInformationEvent"], context),
219
219
  };
220
220
  }
221
221
  if (event["DisconnectionEvent"] != null) {
222
222
  return {
223
- DisconnectionEvent: await deserializeAws_restJson1DisconnectionEvent_event(event["DisconnectionEvent"], context),
223
+ DisconnectionEvent: await de_DisconnectionEvent_event(event["DisconnectionEvent"], context),
224
224
  };
225
225
  }
226
226
  if (event["ValidationException"] != null) {
227
227
  return {
228
- ValidationException: await deserializeAws_restJson1ValidationException_event(event["ValidationException"], context),
228
+ ValidationException: await de_ValidationException_event(event["ValidationException"], context),
229
229
  };
230
230
  }
231
231
  if (event["InternalServerException"] != null) {
232
232
  return {
233
- InternalServerException: await deserializeAws_restJson1InternalServerException_event(event["InternalServerException"], context),
233
+ InternalServerException: await de_InternalServerException_event(event["InternalServerException"], context),
234
234
  };
235
235
  }
236
236
  if (event["ThrottlingException"] != null) {
237
237
  return {
238
- ThrottlingException: await deserializeAws_restJson1ThrottlingException_event(event["ThrottlingException"], context),
238
+ ThrottlingException: await de_ThrottlingException_event(event["ThrottlingException"], context),
239
239
  };
240
240
  }
241
241
  if (event["ServiceQuotaExceededException"] != null) {
242
242
  return {
243
- ServiceQuotaExceededException: await deserializeAws_restJson1ServiceQuotaExceededException_event(event["ServiceQuotaExceededException"], context),
243
+ ServiceQuotaExceededException: await de_ServiceQuotaExceededException_event(event["ServiceQuotaExceededException"], context),
244
244
  };
245
245
  }
246
246
  if (event["ServiceUnavailableException"] != null) {
247
247
  return {
248
- ServiceUnavailableException: await deserializeAws_restJson1ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
248
+ ServiceUnavailableException: await de_ServiceUnavailableException_event(event["ServiceUnavailableException"], context),
249
249
  };
250
250
  }
251
251
  return { $unknown: output };
252
252
  });
253
253
  };
254
- const deserializeAws_restJson1DisconnectionEvent_event = async (output, context) => {
254
+ const de_DisconnectionEvent_event = async (output, context) => {
255
255
  const contents = {};
256
256
  const data = await parseBody(output.body, context);
257
- Object.assign(contents, deserializeAws_restJson1DisconnectionEvent(data, context));
257
+ Object.assign(contents, de_DisconnectionEvent(data, context));
258
258
  return contents;
259
259
  };
260
- const deserializeAws_restJson1InternalServerException_event = async (output, context) => {
260
+ const de_InternalServerException_event = async (output, context) => {
261
261
  const parsedOutput = {
262
262
  ...output,
263
263
  body: await parseBody(output.body, context),
264
264
  };
265
- return deserializeAws_restJson1InternalServerExceptionResponse(parsedOutput, context);
265
+ return de_InternalServerExceptionRes(parsedOutput, context);
266
266
  };
267
- const deserializeAws_restJson1ServerSessionInformationEvent_event = async (output, context) => {
267
+ const de_ServerSessionInformationEvent_event = async (output, context) => {
268
268
  const contents = {};
269
269
  const data = await parseBody(output.body, context);
270
- Object.assign(contents, deserializeAws_restJson1ServerSessionInformationEvent(data, context));
270
+ Object.assign(contents, de_ServerSessionInformationEvent(data, context));
271
271
  return contents;
272
272
  };
273
- const deserializeAws_restJson1ServiceQuotaExceededException_event = async (output, context) => {
273
+ const de_ServiceQuotaExceededException_event = async (output, context) => {
274
274
  const parsedOutput = {
275
275
  ...output,
276
276
  body: await parseBody(output.body, context),
277
277
  };
278
- return deserializeAws_restJson1ServiceQuotaExceededExceptionResponse(parsedOutput, context);
278
+ return de_ServiceQuotaExceededExceptionRes(parsedOutput, context);
279
279
  };
280
- const deserializeAws_restJson1ServiceUnavailableException_event = async (output, context) => {
280
+ const de_ServiceUnavailableException_event = async (output, context) => {
281
281
  const parsedOutput = {
282
282
  ...output,
283
283
  body: await parseBody(output.body, context),
284
284
  };
285
- return deserializeAws_restJson1ServiceUnavailableExceptionResponse(parsedOutput, context);
285
+ return de_ServiceUnavailableExceptionRes(parsedOutput, context);
286
286
  };
287
- const deserializeAws_restJson1ThrottlingException_event = async (output, context) => {
287
+ const de_ThrottlingException_event = async (output, context) => {
288
288
  const parsedOutput = {
289
289
  ...output,
290
290
  body: await parseBody(output.body, context),
291
291
  };
292
- return deserializeAws_restJson1ThrottlingExceptionResponse(parsedOutput, context);
292
+ return de_ThrottlingExceptionRes(parsedOutput, context);
293
293
  };
294
- const deserializeAws_restJson1ValidationException_event = async (output, context) => {
294
+ const de_ValidationException_event = async (output, context) => {
295
295
  const parsedOutput = {
296
296
  ...output,
297
297
  body: await parseBody(output.body, context),
298
298
  };
299
- return deserializeAws_restJson1ValidationExceptionResponse(parsedOutput, context);
299
+ return de_ValidationExceptionRes(parsedOutput, context);
300
300
  };
301
- const serializeAws_restJson1BoundingBox = (input, context) => {
301
+ const se_BoundingBox = (input, context) => {
302
302
  return {
303
303
  ...(input.Height != null && { Height: __serializeFloat(input.Height) }),
304
304
  ...(input.Left != null && { Left: __serializeFloat(input.Left) }),
@@ -306,66 +306,60 @@ const serializeAws_restJson1BoundingBox = (input, context) => {
306
306
  ...(input.Width != null && { Width: __serializeFloat(input.Width) }),
307
307
  };
308
308
  };
309
- const serializeAws_restJson1ClientChallenge = (input, context) => {
309
+ const se_ClientChallenge = (input, context) => {
310
310
  return ClientChallenge.visit(input, {
311
311
  FaceMovementAndLightChallenge: (value) => ({
312
- FaceMovementAndLightChallenge: serializeAws_restJson1FaceMovementAndLightClientChallenge(value, context),
312
+ FaceMovementAndLightChallenge: se_FaceMovementAndLightClientChallenge(value, context),
313
313
  }),
314
314
  _: (name, value) => ({ name: value }),
315
315
  });
316
316
  };
317
- const serializeAws_restJson1ClientSessionInformationEvent = (input, context) => {
317
+ const se_ClientSessionInformationEvent = (input, context) => {
318
318
  return {
319
- ...(input.Challenge != null && { Challenge: serializeAws_restJson1ClientChallenge(input.Challenge, context) }),
319
+ ...(input.Challenge != null && { Challenge: se_ClientChallenge(input.Challenge, context) }),
320
320
  };
321
321
  };
322
- const serializeAws_restJson1ColorComponentList = (input, context) => {
322
+ const se_ColorComponentList = (input, context) => {
323
323
  return input
324
324
  .filter((e) => e != null)
325
325
  .map((entry) => {
326
326
  return entry;
327
327
  });
328
328
  };
329
- const serializeAws_restJson1ColorDisplayed = (input, context) => {
329
+ const se_ColorDisplayed = (input, context) => {
330
330
  return {
331
- ...(input.CurrentColor != null && {
332
- CurrentColor: serializeAws_restJson1FreshnessColor(input.CurrentColor, context),
333
- }),
331
+ ...(input.CurrentColor != null && { CurrentColor: se_FreshnessColor(input.CurrentColor, context) }),
334
332
  ...(input.CurrentColorStartTimestamp != null && { CurrentColorStartTimestamp: input.CurrentColorStartTimestamp }),
335
- ...(input.PreviousColor != null && {
336
- PreviousColor: serializeAws_restJson1FreshnessColor(input.PreviousColor, context),
337
- }),
333
+ ...(input.PreviousColor != null && { PreviousColor: se_FreshnessColor(input.PreviousColor, context) }),
338
334
  ...(input.SequenceNumber != null && { SequenceNumber: input.SequenceNumber }),
339
335
  };
340
336
  };
341
- const serializeAws_restJson1FaceMovementAndLightClientChallenge = (input, context) => {
337
+ const se_FaceMovementAndLightClientChallenge = (input, context) => {
342
338
  return {
343
339
  ...(input.ChallengeId != null && { ChallengeId: input.ChallengeId }),
344
- ...(input.ColorDisplayed != null && {
345
- ColorDisplayed: serializeAws_restJson1ColorDisplayed(input.ColorDisplayed, context),
346
- }),
347
- ...(input.InitialFace != null && { InitialFace: serializeAws_restJson1InitialFace(input.InitialFace, context) }),
348
- ...(input.TargetFace != null && { TargetFace: serializeAws_restJson1TargetFace(input.TargetFace, context) }),
340
+ ...(input.ColorDisplayed != null && { ColorDisplayed: se_ColorDisplayed(input.ColorDisplayed, context) }),
341
+ ...(input.InitialFace != null && { InitialFace: se_InitialFace(input.InitialFace, context) }),
342
+ ...(input.TargetFace != null && { TargetFace: se_TargetFace(input.TargetFace, context) }),
349
343
  ...(input.VideoEndTimestamp != null && { VideoEndTimestamp: input.VideoEndTimestamp }),
350
344
  ...(input.VideoStartTimestamp != null && { VideoStartTimestamp: input.VideoStartTimestamp }),
351
345
  };
352
346
  };
353
- const serializeAws_restJson1FreshnessColor = (input, context) => {
347
+ const se_FreshnessColor = (input, context) => {
354
348
  return {
355
- ...(input.RGB != null && { RGB: serializeAws_restJson1ColorComponentList(input.RGB, context) }),
349
+ ...(input.RGB != null && { RGB: se_ColorComponentList(input.RGB, context) }),
356
350
  };
357
351
  };
358
- const serializeAws_restJson1InitialFace = (input, context) => {
352
+ const se_InitialFace = (input, context) => {
359
353
  return {
360
- ...(input.BoundingBox != null && { BoundingBox: serializeAws_restJson1BoundingBox(input.BoundingBox, context) }),
354
+ ...(input.BoundingBox != null && { BoundingBox: se_BoundingBox(input.BoundingBox, context) }),
361
355
  ...(input.InitialFaceDetectedTimestamp != null && {
362
356
  InitialFaceDetectedTimestamp: input.InitialFaceDetectedTimestamp,
363
357
  }),
364
358
  };
365
359
  };
366
- const serializeAws_restJson1TargetFace = (input, context) => {
360
+ const se_TargetFace = (input, context) => {
367
361
  return {
368
- ...(input.BoundingBox != null && { BoundingBox: serializeAws_restJson1BoundingBox(input.BoundingBox, context) }),
362
+ ...(input.BoundingBox != null && { BoundingBox: se_BoundingBox(input.BoundingBox, context) }),
369
363
  ...(input.FaceDetectedInTargetPositionEndTimestamp != null && {
370
364
  FaceDetectedInTargetPositionEndTimestamp: input.FaceDetectedInTargetPositionEndTimestamp,
371
365
  }),
@@ -374,13 +368,13 @@ const serializeAws_restJson1TargetFace = (input, context) => {
374
368
  }),
375
369
  };
376
370
  };
377
- const serializeAws_restJson1VideoEvent = (input, context) => {
371
+ const se_VideoEvent = (input, context) => {
378
372
  return {
379
373
  ...(input.TimestampMillis != null && { TimestampMillis: input.TimestampMillis }),
380
374
  ...(input.VideoChunk != null && { VideoChunk: context.base64Encoder(input.VideoChunk) }),
381
375
  };
382
376
  };
383
- const deserializeAws_restJson1ChallengeConfig = (output, context) => {
377
+ const de_ChallengeConfig = (output, context) => {
384
378
  return {
385
379
  BlazeFaceDetectionThreshold: __limitedParseFloat32(output.BlazeFaceDetectionThreshold),
386
380
  FaceDistanceThreshold: __limitedParseFloat32(output.FaceDistanceThreshold),
@@ -394,7 +388,7 @@ const deserializeAws_restJson1ChallengeConfig = (output, context) => {
394
388
  OvalIouWidthThreshold: __limitedParseFloat32(output.OvalIouWidthThreshold),
395
389
  };
396
390
  };
397
- const deserializeAws_restJson1ColorComponentList = (output, context) => {
391
+ const de_ColorComponentList = (output, context) => {
398
392
  const retVal = (output || [])
399
393
  .filter((e) => e != null)
400
394
  .map((entry) => {
@@ -405,51 +399,43 @@ const deserializeAws_restJson1ColorComponentList = (output, context) => {
405
399
  });
406
400
  return retVal;
407
401
  };
408
- const deserializeAws_restJson1ColorSequence = (output, context) => {
402
+ const de_ColorSequence = (output, context) => {
409
403
  return {
410
404
  DownscrollDuration: __limitedParseFloat32(output.DownscrollDuration),
411
405
  FlatDisplayDuration: __limitedParseFloat32(output.FlatDisplayDuration),
412
- FreshnessColor: output.FreshnessColor != null
413
- ? deserializeAws_restJson1FreshnessColor(output.FreshnessColor, context)
414
- : undefined,
406
+ FreshnessColor: output.FreshnessColor != null ? de_FreshnessColor(output.FreshnessColor, context) : undefined,
415
407
  };
416
408
  };
417
- const deserializeAws_restJson1ColorSequences = (output, context) => {
409
+ const de_ColorSequences = (output, context) => {
418
410
  const retVal = (output || [])
419
411
  .filter((e) => e != null)
420
412
  .map((entry) => {
421
413
  if (entry === null) {
422
414
  return null;
423
415
  }
424
- return deserializeAws_restJson1ColorSequence(entry, context);
416
+ return de_ColorSequence(entry, context);
425
417
  });
426
418
  return retVal;
427
419
  };
428
- const deserializeAws_restJson1DisconnectionEvent = (output, context) => {
420
+ const de_DisconnectionEvent = (output, context) => {
429
421
  return {
430
422
  TimestampMillis: __expectLong(output.TimestampMillis),
431
423
  };
432
424
  };
433
- const deserializeAws_restJson1FaceMovementAndLightServerChallenge = (output, context) => {
425
+ const de_FaceMovementAndLightServerChallenge = (output, context) => {
434
426
  return {
435
- ChallengeConfig: output.ChallengeConfig != null
436
- ? deserializeAws_restJson1ChallengeConfig(output.ChallengeConfig, context)
437
- : undefined,
438
- ColorSequences: output.ColorSequences != null
439
- ? deserializeAws_restJson1ColorSequences(output.ColorSequences, context)
440
- : undefined,
427
+ ChallengeConfig: output.ChallengeConfig != null ? de_ChallengeConfig(output.ChallengeConfig, context) : undefined,
428
+ ColorSequences: output.ColorSequences != null ? de_ColorSequences(output.ColorSequences, context) : undefined,
441
429
  LightChallengeType: __expectString(output.LightChallengeType),
442
- OvalParameters: output.OvalParameters != null
443
- ? deserializeAws_restJson1OvalParameters(output.OvalParameters, context)
444
- : undefined,
430
+ OvalParameters: output.OvalParameters != null ? de_OvalParameters(output.OvalParameters, context) : undefined,
445
431
  };
446
432
  };
447
- const deserializeAws_restJson1FreshnessColor = (output, context) => {
433
+ const de_FreshnessColor = (output, context) => {
448
434
  return {
449
- RGB: output.RGB != null ? deserializeAws_restJson1ColorComponentList(output.RGB, context) : undefined,
435
+ RGB: output.RGB != null ? de_ColorComponentList(output.RGB, context) : undefined,
450
436
  };
451
437
  };
452
- const deserializeAws_restJson1OvalParameters = (output, context) => {
438
+ const de_OvalParameters = (output, context) => {
453
439
  return {
454
440
  CenterX: __limitedParseFloat32(output.CenterX),
455
441
  CenterY: __limitedParseFloat32(output.CenterY),
@@ -457,26 +443,22 @@ const deserializeAws_restJson1OvalParameters = (output, context) => {
457
443
  Width: __limitedParseFloat32(output.Width),
458
444
  };
459
445
  };
460
- const deserializeAws_restJson1ServerChallenge = (output, context) => {
446
+ const de_ServerChallenge = (output, context) => {
461
447
  if (output.FaceMovementAndLightChallenge != null) {
462
448
  return {
463
- FaceMovementAndLightChallenge: deserializeAws_restJson1FaceMovementAndLightServerChallenge(output.FaceMovementAndLightChallenge, context),
449
+ FaceMovementAndLightChallenge: de_FaceMovementAndLightServerChallenge(output.FaceMovementAndLightChallenge, context),
464
450
  };
465
451
  }
466
452
  return { $unknown: Object.entries(output)[0] };
467
453
  };
468
- const deserializeAws_restJson1ServerSessionInformationEvent = (output, context) => {
454
+ const de_ServerSessionInformationEvent = (output, context) => {
469
455
  return {
470
- SessionInformation: output.SessionInformation != null
471
- ? deserializeAws_restJson1SessionInformation(output.SessionInformation, context)
472
- : undefined,
456
+ SessionInformation: output.SessionInformation != null ? de_SessionInformation(output.SessionInformation, context) : undefined,
473
457
  };
474
458
  };
475
- const deserializeAws_restJson1SessionInformation = (output, context) => {
459
+ const de_SessionInformation = (output, context) => {
476
460
  return {
477
- Challenge: output.Challenge != null
478
- ? deserializeAws_restJson1ServerChallenge(__expectUnion(output.Challenge), context)
479
- : undefined,
461
+ Challenge: output.Challenge != null ? de_ServerChallenge(__expectUnion(output.Challenge), context) : undefined,
480
462
  };
481
463
  };
482
464
  const deserializeMetadata = (output) => ({
@@ -3,10 +3,41 @@ import { StartFaceLivenessSessionCommandInput, StartFaceLivenessSessionCommandOu
3
3
  import { RekognitionStreamingClient } from "./RekognitionStreamingClient";
4
4
  /**
5
5
  * @public
6
+ * <p>A real-time video processing service based on Rekognition. This section documents the API
7
+ * operations for Rekognition Face Liveness.</p>
8
+ * <p>
9
+ * <b>Amazon Rekognition Face Liveness</b>
10
+ * </p>
11
+ * <ul>
12
+ * <li>
13
+ * <p>
14
+ * <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateFaceLivenessSession.html">CreateFaceLivenessSession</a>
15
+ * </p>
16
+ * </li>
17
+ * <li>
18
+ * <p>
19
+ * <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetFaceLivenessSessionResults.html">GetFaceLivenessSessionResults</a>
20
+ * </p>
21
+ * </li>
22
+ * <li>
23
+ * <p>
24
+ * <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_rekognitionstreaming_StartFaceLivenessSession.html">StartFaceLivenessSession</a>
25
+ * </p>
26
+ * </li>
27
+ * </ul>
6
28
  */
7
29
  export declare class RekognitionStreaming extends RekognitionStreamingClient {
8
30
  /**
9
31
  * @public
32
+ * <p>Starts a Face Liveness video stream and liveness detection process for a given
33
+ * session.</p>
34
+ * <p>Requires <code>sessionId</code>, <code>ChallengeVersions</code>, <code>VideoWidth</code>,
35
+ * <code>VideoHeight</code> and a <code>RequestEventStream</code> as input. The event stream
36
+ * contains information about different events for the session, including the challenge
37
+ * information used for verification. </p>
38
+ * <p>The maximum video size for Face Liveness is 10 MB. Face Liveness throws a
39
+ * <code>ValidationException</code> if the video does not match the necessary formatting and
40
+ * size parameters. </p>
10
41
  */
11
42
  startFaceLivenessSession(args: StartFaceLivenessSessionCommandInput, options?: __HttpHandlerOptions): Promise<StartFaceLivenessSessionCommandOutput>;
12
43
  startFaceLivenessSession(args: StartFaceLivenessSessionCommandInput, cb: (err: any, data?: StartFaceLivenessSessionCommandOutput) => void): void;
@@ -156,6 +156,28 @@ export interface RekognitionStreamingClientResolvedConfig extends RekognitionStr
156
156
  }
157
157
  /**
158
158
  * @public
159
+ * <p>A real-time video processing service based on Rekognition. This section documents the API
160
+ * operations for Rekognition Face Liveness.</p>
161
+ * <p>
162
+ * <b>Amazon Rekognition Face Liveness</b>
163
+ * </p>
164
+ * <ul>
165
+ * <li>
166
+ * <p>
167
+ * <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_CreateFaceLivenessSession.html">CreateFaceLivenessSession</a>
168
+ * </p>
169
+ * </li>
170
+ * <li>
171
+ * <p>
172
+ * <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_GetFaceLivenessSessionResults.html">GetFaceLivenessSessionResults</a>
173
+ * </p>
174
+ * </li>
175
+ * <li>
176
+ * <p>
177
+ * <a href="https://docs.aws.amazon.com/rekognition/latest/APIReference/API_rekognitionstreaming_StartFaceLivenessSession.html">StartFaceLivenessSession</a>
178
+ * </p>
179
+ * </li>
180
+ * </ul>
159
181
  */
160
182
  export declare class RekognitionStreamingClient extends __Client<__HttpHandlerOptions, ServiceInputTypes, ServiceOutputTypes, RekognitionStreamingClientResolvedConfig> {
161
183
  /**