Source code for luna_lambda_tools.public.handlers.handlers_request

"""
Module contains request class for handlers lambda
"""

from typing import final

from luna_lambda_tools.private.request import BaseHandlersRequest
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.lva import LVA
from luna_lambda_tools.public.clients.sender import Sender
from luna_lambda_tools.public.handlers.schemas import EventSourceSchema


[docs] @final class HandlersLambdaRequest(BaseHandlersRequest): """Handlers 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()), videoAgent=LVA(**self._getLVAClientKwargs()), sender=Sender(**self._getSenderClientKwargs()), ) return self._clients @property def data(self) -> EventSourceSchema: """Get events sources from request""" return super().getRequestData(EventSourceSchema)