# 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 AppConfigCallback(object):
    _types = {
        "callback_type": str,
        "request_url": str,
        "add_callbacks": List[str],
        "remove_callbacks": List[str],
    }

    def __init__(self, d=None):
        self.callback_type: Optional[str] = None
        self.request_url: Optional[str] = None
        self.add_callbacks: Optional[List[str]] = None
        self.remove_callbacks: Optional[List[str]] = None
        init(self, d, self._types)

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


class AppConfigCallbackBuilder(object):
    def __init__(self) -> None:
        self._app_config_callback = AppConfigCallback()

    def callback_type(self, callback_type: str) -> "AppConfigCallbackBuilder":
        self._app_config_callback.callback_type = callback_type
        return self

    def request_url(self, request_url: str) -> "AppConfigCallbackBuilder":
        self._app_config_callback.request_url = request_url
        return self

    def add_callbacks(self, add_callbacks: List[str]) -> "AppConfigCallbackBuilder":
        self._app_config_callback.add_callbacks = add_callbacks
        return self

    def remove_callbacks(self, remove_callbacks: List[str]) -> "AppConfigCallbackBuilder":
        self._app_config_callback.remove_callbacks = remove_callbacks
        return self

    def build(self) -> "AppConfigCallback":
        return self._app_config_callback
