# 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 TextStyle(object):
    _types = {
        "align": int,
        "done": bool,
        "folded": bool,
        "language": int,
        "wrap": bool,
        "background_color": str,
        "indentation_level": str,
        "sequence": str,
    }

    def __init__(self, d=None):
        self.align: Optional[int] = None
        self.done: Optional[bool] = None
        self.folded: Optional[bool] = None
        self.language: Optional[int] = None
        self.wrap: Optional[bool] = None
        self.background_color: Optional[str] = None
        self.indentation_level: Optional[str] = None
        self.sequence: Optional[str] = None
        init(self, d, self._types)

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


class TextStyleBuilder(object):
    def __init__(self) -> None:
        self._text_style = TextStyle()

    def align(self, align: int) -> "TextStyleBuilder":
        self._text_style.align = align
        return self

    def done(self, done: bool) -> "TextStyleBuilder":
        self._text_style.done = done
        return self

    def folded(self, folded: bool) -> "TextStyleBuilder":
        self._text_style.folded = folded
        return self

    def language(self, language: int) -> "TextStyleBuilder":
        self._text_style.language = language
        return self

    def wrap(self, wrap: bool) -> "TextStyleBuilder":
        self._text_style.wrap = wrap
        return self

    def background_color(self, background_color: str) -> "TextStyleBuilder":
        self._text_style.background_color = background_color
        return self

    def indentation_level(self, indentation_level: str) -> "TextStyleBuilder":
        self._text_style.indentation_level = indentation_level
        return self

    def sequence(self, sequence: str) -> "TextStyleBuilder":
        self._text_style.sequence = sequence
        return self

    def build(self) -> "TextStyle":
        return self._text_style
