from typing import Dict, Any
from abc import ABCMeta, abstractmethod
from messagebus import Message, Event
from ._LambdaEventType import LambdaEventType


class LambdaAdapter(object):
    __metaclass__ = ABCMeta

    @abstractmethod
    def get_type(self, event, context):
        # type: (Dict, Dict) -> LambdaEventType
        raise NotImplementedError()

    @abstractmethod
    def create_message(self, event, context):
        # type: (Dict, Dict) -> Message
        raise NotImplementedError()

    @abstractmethod
    def create_event(self, event, context):
        # type: (Dict, Dict) -> Event
        raise NotImplementedError()

    @abstractmethod
    def create_reply(self, event, context, message):
        # type: (Dict, Dict, Message) -> Any
        raise NotImplementedError()
