# 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 CodeDetail(object):
    _types = {
        "language": str,
        "language_name": str,
        "content": str,
    }

    def __init__(self, d=None):
        self.language: Optional[str] = None
        self.language_name: Optional[str] = None
        self.content: Optional[str] = None
        init(self, d, self._types)

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


class CodeDetailBuilder(object):
    def __init__(self) -> None:
        self._code_detail = CodeDetail()

    def language(self, language: str) -> "CodeDetailBuilder":
        self._code_detail.language = language
        return self

    def language_name(self, language_name: str) -> "CodeDetailBuilder":
        self._code_detail.language_name = language_name
        return self

    def content(self, content: str) -> "CodeDetailBuilder":
        self._code_detail.content = content
        return self

    def build(self) -> "CodeDetail":
        return self._code_detail
