# 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


class JobGradeUpdate(object):
    _types = {
        "grade_order": int,
        "code": str,
        "names": List[I18n],
        "descriptions": List[I18n],
        "active": bool,
    }

    def __init__(self, d=None):
        self.grade_order: Optional[int] = None
        self.code: Optional[str] = None
        self.names: Optional[List[I18n]] = None
        self.descriptions: Optional[List[I18n]] = None
        self.active: Optional[bool] = None
        init(self, d, self._types)

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


class JobGradeUpdateBuilder(object):
    def __init__(self) -> None:
        self._job_grade_update = JobGradeUpdate()

    def grade_order(self, grade_order: int) -> "JobGradeUpdateBuilder":
        self._job_grade_update.grade_order = grade_order
        return self

    def code(self, code: str) -> "JobGradeUpdateBuilder":
        self._job_grade_update.code = code
        return self

    def names(self, names: List[I18n]) -> "JobGradeUpdateBuilder":
        self._job_grade_update.names = names
        return self

    def descriptions(self, descriptions: List[I18n]) -> "JobGradeUpdateBuilder":
        self._job_grade_update.descriptions = descriptions
        return self

    def active(self, active: bool) -> "JobGradeUpdateBuilder":
        self._job_grade_update.active = active
        return self

    def build(self) -> "JobGradeUpdate":
        return self._job_grade_update
