from typing import (
    Optional,
)

from messagebus import Event
from ._AsyncTargetDto import AsyncTargetDto


class PublishEventRequest(object):
    def __init__(
        self,
        event: Event,
        target: Optional[str],
        async_target: Optional[AsyncTargetDto],
        external_code: Optional[str],
        fifo: bool
    ):
        self.event = event
        self.target = target
        self.async_target = async_target
        self.external_code = external_code
        self.fifo = fifo
