# 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 .salary_grade import SalaryGrade


class SalaryLevel(object):
    _types = {
        "id": str,
        "name": I18n,
        "status": bool,
        "salary_grades": List[SalaryGrade],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[I18n] = None
        self.status: Optional[bool] = None
        self.salary_grades: Optional[List[SalaryGrade]] = None
        init(self, d, self._types)

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


class SalaryLevelBuilder(object):
    def __init__(self) -> None:
        self._salary_level = SalaryLevel()

    def id(self, id: str) -> "SalaryLevelBuilder":
        self._salary_level.id = id
        return self

    def name(self, name: I18n) -> "SalaryLevelBuilder":
        self._salary_level.name = name
        return self

    def status(self, status: bool) -> "SalaryLevelBuilder":
        self._salary_level.status = status
        return self

    def salary_grades(self, salary_grades: List[SalaryGrade]) -> "SalaryLevelBuilder":
        self._salary_level.salary_grades = salary_grades
        return self

    def build(self) -> "SalaryLevel":
        return self._salary_level
