# 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
from .talent_customized_data_child import TalentCustomizedDataChild


class CompositeTalentCustomizedData(object):
    _types = {
        "module_id": str,
        "name": I18n,
        "object_type": int,
        "children": List[TalentCustomizedDataChild],
    }

    def __init__(self, d=None):
        self.module_id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.object_type: Optional[int] = None
        self.children: Optional[List[TalentCustomizedDataChild]] = None
        init(self, d, self._types)

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


class CompositeTalentCustomizedDataBuilder(object):
    def __init__(self) -> None:
        self._composite_talent_customized_data = CompositeTalentCustomizedData()

    def module_id(self, module_id: str) -> "CompositeTalentCustomizedDataBuilder":
        self._composite_talent_customized_data.module_id = module_id
        return self

    def name(self, name: I18n) -> "CompositeTalentCustomizedDataBuilder":
        self._composite_talent_customized_data.name = name
        return self

    def object_type(self, object_type: int) -> "CompositeTalentCustomizedDataBuilder":
        self._composite_talent_customized_data.object_type = object_type
        return self

    def children(self, children: List[TalentCustomizedDataChild]) -> "CompositeTalentCustomizedDataBuilder":
        self._composite_talent_customized_data.children = children
        return self

    def build(self) -> "CompositeTalentCustomizedData":
        return self._composite_talent_customized_data
