from events.types.payload import Payload


class TrackingEventCreated(Payload):
    def __init__(self, tracking_event_id: str, child_id: str, entity_type: str, action: str):
        super().__init__({
            'tracking_event_id': tracking_event_id,
            'child_id': child_id,
            'entity_type': entity_type,
            'action': action
        })

    @property
    def tracking_event_id(self) -> str:
        return self.get("tracking_event_id")

    @property
    def child_id(self) -> str:
        return self.get("child_id")

    @property
    def entity_type(self) -> str:
        return self.get("entity_type")

    @property
    def action(self) -> str:
        return self.get("action")
