"""
Module contains request class for standalone lambda
"""
from typing import Any, final
from luna_lambda_tools.private.request import BaseStandaloneLambdaRequest
from luna_lambda_tools.public.clients import Clients
from luna_lambda_tools.public.clients.events import Events
from luna_lambda_tools.public.clients.faces import Faces
from luna_lambda_tools.public.clients.lis import LIS
from luna_lambda_tools.public.clients.lpm import LPM
from luna_lambda_tools.public.clients.lrs import LRS
from luna_lambda_tools.public.clients.sender import Sender
[docs]
@final
class StandaloneLambdaRequest(BaseStandaloneLambdaRequest):
"""Standalone lambda request"""
[docs]
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._clients: Clients | None = None
@property
def clients(self):
if self._clients is None:
self._clients = Clients(
faces=Faces(**self._getFacesClientKwargs()),
events=Events(**self._getEventsClientKwargs()),
matcher=LPM(**self._getLPMClientKwargs()),
faceSamplesStore=LIS(**self._getFacesSamplesClientKwargs()),
bodySamplesStore=LIS(**self._getBodySamplesClientKwargs()),
imageOriginStore=LIS(**self._getImageOriginClientKwargs()),
sdk=LRS(**self._getLRSClientKwargs()),
sender=Sender(**self._getSenderClientKwargs()),
)
return self._clients
@property
def json(self) -> int | float | list | dict[str, Any]:
"""Get json from request"""
return super().json
def getBody(self) -> bytes:
"""Get body from request"""
return super().getBody()