# 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 Level(object):
    _types = {
        "level": str,
        "body": str,
        "type": str,
    }

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

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


class LevelBuilder(object):
    def __init__(self) -> None:
        self._level = Level()

    def level(self, level: str) -> "LevelBuilder":
        self._level.level = level
        return self

    def body(self, body: str) -> "LevelBuilder":
        self._level.body = body
        return self

    def type(self, type: str) -> "LevelBuilder":
        self._level.type = type
        return self

    def build(self) -> "Level":
        return self._level
