# 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 JobLevel(object):
    _types = {
        "job_level_id": str,
        "level_order": int,
        "code": str,
        "name": List[I18n],
        "description": List[I18n],
        "active": bool,
        "custom_fields": List[CustomFieldData],
        "job_grade": List[str],
        "pathway_ids": List[str],
    }

    def __init__(self, d=None):
        self.job_level_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
        self.job_grade: Optional[List[str]] = None
        self.pathway_ids: Optional[List[str]] = None
        init(self, d, self._types)

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


class JobLevelBuilder(object):
    def __init__(self) -> None:
        self._job_level = JobLevel()

    def job_level_id(self, job_level_id: str) -> "JobLevelBuilder":
        self._job_level.job_level_id = job_level_id
        return self

    def level_order(self, level_order: int) -> "JobLevelBuilder":
        self._job_level.level_order = level_order
        return self

    def code(self, code: str) -> "JobLevelBuilder":
        self._job_level.code = code
        return self

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

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

    def active(self, active: bool) -> "JobLevelBuilder":
        self._job_level.active = active
        return self

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

    def job_grade(self, job_grade: List[str]) -> "JobLevelBuilder":
        self._job_level.job_grade = job_grade
        return self

    def pathway_ids(self, pathway_ids: List[str]) -> "JobLevelBuilder":
        self._job_level.pathway_ids = pathway_ids
        return self

    def build(self) -> "JobLevel":
        return self._job_level
