# 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 .i18n import I18n


class Language(object):
    _types = {
        "language_id": str,
        "name": List[I18n],
        "ietf_language_tag": str,
        "status": int,
    }

    def __init__(self, d=None):
        self.language_id: Optional[str] = None
        self.name: Optional[List[I18n]] = None
        self.ietf_language_tag: Optional[str] = None
        self.status: Optional[int] = None
        init(self, d, self._types)

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


class LanguageBuilder(object):
    def __init__(self) -> None:
        self._language = Language()

    def language_id(self, language_id: str) -> "LanguageBuilder":
        self._language.language_id = language_id
        return self

    def name(self, name: List[I18n]) -> "LanguageBuilder":
        self._language.name = name
        return self

    def ietf_language_tag(self, ietf_language_tag: str) -> "LanguageBuilder":
        self._language.ietf_language_tag = ietf_language_tag
        return self

    def status(self, status: int) -> "LanguageBuilder":
        self._language.status = status
        return self

    def build(self) -> "Language":
        return self._language
