from typing import (
    Any,
    Dict,
    Generic,
    TypeVar,
)

from ._ContextMessageBus import ContextMessageBus

T = TypeVar("T")


class Context(Generic[T]):
    def __init__(
        self,
        context_name: str,
        message_bus: ContextMessageBus,
        context_config: T,
    ) -> None:

        self.context_name = context_name
        self.message_bus = message_bus
        self.context_config = context_config
        self.request_data = None

    def set_request_data(self, request_data: Any):
        self.request_data = request_data
