# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class SubscribedEvent(object):
    _types = {
        "subscription_type": str,
        "request_url": str,
        "subscribed_events": List[str],
    }

    def __init__(self, d=None):
        self.subscription_type: Optional[str] = None
        self.request_url: Optional[str] = None
        self.subscribed_events: Optional[List[str]] = None
        init(self, d, self._types)

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


class SubscribedEventBuilder(object):
    def __init__(self) -> None:
        self._subscribed_event = SubscribedEvent()

    def subscription_type(self, subscription_type: str) -> "SubscribedEventBuilder":
        self._subscribed_event.subscription_type = subscription_type
        return self

    def request_url(self, request_url: str) -> "SubscribedEventBuilder":
        self._subscribed_event.request_url = request_url
        return self

    def subscribed_events(self, subscribed_events: List[str]) -> "SubscribedEventBuilder":
        self._subscribed_event.subscribed_events = subscribed_events
        return self

    def build(self) -> "SubscribedEvent":
        return self._subscribed_event
