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


class EmployeeJobLevel(object):
    _types = {
        "id": str,
        "level_order": int,
        "code": str,
        "name": List[I18n],
        "description": List[I18n],
        "active": bool,
        "custom_fields": List[CustomFieldData],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.level_order: Optional[int] = None
        self.code: Optional[str] = None
        self.name: Optional[List[I18n]] = None
        self.description: Optional[List[I18n]] = None
        self.active: Optional[bool] = None
        self.custom_fields: Optional[List[CustomFieldData]] = None
        init(self, d, self._types)

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


class EmployeeJobLevelBuilder(object):
    def __init__(self) -> None:
        self._employee_job_level = EmployeeJobLevel()

    def id(self, id: str) -> "EmployeeJobLevelBuilder":
        self._employee_job_level.id = id
        return self

    def level_order(self, level_order: int) -> "EmployeeJobLevelBuilder":
        self._employee_job_level.level_order = level_order
        return self

    def code(self, code: str) -> "EmployeeJobLevelBuilder":
        self._employee_job_level.code = code
        return self

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

    def description(self, description: List[I18n]) -> "EmployeeJobLevelBuilder":
        self._employee_job_level.description = description
        return self

    def active(self, active: bool) -> "EmployeeJobLevelBuilder":
        self._employee_job_level.active = active
        return self

    def custom_fields(self, custom_fields: List[CustomFieldData]) -> "EmployeeJobLevelBuilder":
        self._employee_job_level.custom_fields = custom_fields
        return self

    def build(self) -> "EmployeeJobLevel":
        return self._employee_job_level
