# Code generated by Lark OpenAPI.

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


class Config(object):
    _types = {
        "enable_forward": bool,
        "streaming_mode": bool,
        "summary": Summary,
    }

    def __init__(self, d=None):
        self.enable_forward: Optional[bool] = None
        self.streaming_mode: Optional[bool] = None
        self.summary: Optional[Summary] = None
        init(self, d, self._types)

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


class ConfigBuilder(object):
    def __init__(self) -> None:
        self._config = Config()

    def enable_forward(self, enable_forward: bool) -> "ConfigBuilder":
        self._config.enable_forward = enable_forward
        return self

    def streaming_mode(self, streaming_mode: bool) -> "ConfigBuilder":
        self._config.streaming_mode = streaming_mode
        return self

    def summary(self, summary: Summary) -> "ConfigBuilder":
        self._config.summary = summary
        return self

    def build(self) -> "Config":
        return self._config
