# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class Event(object):
    _types = {
        "type": str,
        "subtype": str,
    }

    def __init__(self, d=None):
        self.type: Optional[str] = None
        self.subtype: Optional[str] = None
        init(self, d, self._types)

    @staticmethod
    def builder() -> "EventBuilder":
        return EventBuilder()


class EventBuilder(object):
    def __init__(self) -> None:
        self._event = Event()

    def type(self, type: str) -> "EventBuilder":
        self._event.type = type
        return self

    def subtype(self, subtype: str) -> "EventBuilder":
        self._event.subtype = subtype
        return self

    def build(self) -> "Event":
        return self._event
