# 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_string import I18nString


class Language(object):
    _types = {
        "id": str,
        "update_by": str,
        "create_by": str,
        "update_time": str,
        "create_time": str,
        "ietf_language_tag": str,
        "name": I18nString,
        "enable": bool,
        "mdm_code": str,
        "status": str,
        "system_status": str,
        "remark": str,
        "update_reason": str,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.update_by: Optional[str] = None
        self.create_by: Optional[str] = None
        self.update_time: Optional[str] = None
        self.create_time: Optional[str] = None
        self.ietf_language_tag: Optional[str] = None
        self.name: Optional[I18nString] = None
        self.enable: Optional[bool] = None
        self.mdm_code: Optional[str] = None
        self.status: Optional[str] = None
        self.system_status: Optional[str] = None
        self.remark: Optional[str] = None
        self.update_reason: Optional[str] = None
        init(self, d, self._types)

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


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

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

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

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

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

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

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

    def name(self, name: I18nString) -> "LanguageBuilder":
        self._language.name = name
        return self

    def enable(self, enable: bool) -> "LanguageBuilder":
        self._language.enable = enable
        return self

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

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

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

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

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

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