# 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 JobGradeCreate(object):
    _types = {
        "grade_order": int,
        "code": str,
        "names": List[I18n],
        "descriptions": List[I18n],
    }

    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
        init(self, d, self._types)

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


class JobGradeCreateBuilder(object):
    def __init__(self) -> None:
        self._job_grade_create = JobGradeCreate()

    def grade_order(self, grade_order: int) -> "JobGradeCreateBuilder":
        self._job_grade_create.grade_order = grade_order
        return self

    def code(self, code: str) -> "JobGradeCreateBuilder":
        self._job_grade_create.code = code
        return self

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

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

    def build(self) -> "JobGradeCreate":
        return self._job_grade_create
