in clients/client-rekognitionstreaming/src/protocols/Aws_restJson1.ts [461:610]
FaceMovementAndLightChallenge: se_FaceMovementAndLightClientChallenge(value, context),
}),
_: (name, value) => ({ [name]: value } as any),
});
};
/**
* serializeAws_restJson1ClientSessionInformationEvent
*/
const se_ClientSessionInformationEvent = (input: ClientSessionInformationEvent, context: __SerdeContext): any => {
return take(input, {
Challenge: (_) => se_ClientChallenge(_, context),
});
};
// se_ColorComponentList omitted.
// se_ColorDisplayed omitted.
/**
* serializeAws_restJson1FaceMovementAndLightClientChallenge
*/
const se_FaceMovementAndLightClientChallenge = (
input: FaceMovementAndLightClientChallenge,
context: __SerdeContext
): any => {
return take(input, {
ChallengeId: [],
ColorDisplayed: _json,
InitialFace: (_) => se_InitialFace(_, context),
TargetFace: (_) => se_TargetFace(_, context),
VideoEndTimestamp: [],
VideoStartTimestamp: [],
});
};
// se_FreshnessColor omitted.
/**
* serializeAws_restJson1InitialFace
*/
const se_InitialFace = (input: InitialFace, context: __SerdeContext): any => {
return take(input, {
BoundingBox: (_) => se_BoundingBox(_, context),
InitialFaceDetectedTimestamp: [],
});
};
/**
* serializeAws_restJson1TargetFace
*/
const se_TargetFace = (input: TargetFace, context: __SerdeContext): any => {
return take(input, {
BoundingBox: (_) => se_BoundingBox(_, context),
FaceDetectedInTargetPositionEndTimestamp: [],
FaceDetectedInTargetPositionStartTimestamp: [],
});
};
/**
* serializeAws_restJson1VideoEvent
*/
const se_VideoEvent = (input: VideoEvent, context: __SerdeContext): any => {
return take(input, {
TimestampMillis: [],
VideoChunk: context.base64Encoder,
});
};
/**
* deserializeAws_restJson1ChallengeConfig
*/
const de_ChallengeConfig = (output: any, context: __SerdeContext): ChallengeConfig => {
return take(output, {
BlazeFaceDetectionThreshold: __limitedParseFloat32,
FaceDistanceThreshold: __limitedParseFloat32,
FaceDistanceThresholdMax: __limitedParseFloat32,
FaceDistanceThresholdMin: __limitedParseFloat32,
FaceIouHeightThreshold: __limitedParseFloat32,
FaceIouWidthThreshold: __limitedParseFloat32,
OvalFitTimeout: __expectInt32,
OvalHeightWidthRatio: __limitedParseFloat32,
OvalIouHeightThreshold: __limitedParseFloat32,
OvalIouThreshold: __limitedParseFloat32,
OvalIouWidthThreshold: __limitedParseFloat32,
}) as any;
};
// de_ColorComponentList omitted.
/**
* deserializeAws_restJson1ColorSequence
*/
const de_ColorSequence = (output: any, context: __SerdeContext): ColorSequence => {
return take(output, {
DownscrollDuration: __limitedParseFloat32,
FlatDisplayDuration: __limitedParseFloat32,
FreshnessColor: _json,
}) as any;
};
/**
* deserializeAws_restJson1ColorSequences
*/
const de_ColorSequences = (output: any, context: __SerdeContext): ColorSequence[] => {
const retVal = (output || [])
.filter((e: any) => e != null)
.map((entry: any) => {
return de_ColorSequence(entry, context);
});
return retVal;
};
// de_DisconnectionEvent omitted.
/**
* deserializeAws_restJson1FaceMovementAndLightServerChallenge
*/
const de_FaceMovementAndLightServerChallenge = (
output: any,
context: __SerdeContext
): FaceMovementAndLightServerChallenge => {
return take(output, {
ChallengeConfig: (_: any) => de_ChallengeConfig(_, context),
ColorSequences: (_: any) => de_ColorSequences(_, context),
LightChallengeType: __expectString,
OvalParameters: (_: any) => de_OvalParameters(_, context),
}) as any;
};
// de_FreshnessColor omitted.
/**
* deserializeAws_restJson1OvalParameters
*/
const de_OvalParameters = (output: any, context: __SerdeContext): OvalParameters => {
return take(output, {
CenterX: __limitedParseFloat32,
CenterY: __limitedParseFloat32,
Height: __limitedParseFloat32,
Width: __limitedParseFloat32,
}) as any;
};
/**
* deserializeAws_restJson1ServerChallenge
*/
const de_ServerChallenge = (output: any, context: __SerdeContext): ServerChallenge => {
if (output.FaceMovementAndLightChallenge != null) {
return {