# 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 .object_field_data import ObjectFieldData


class JobFamily(object):
    _types = {
        "id": str,
        "name": List[I18n],
        "active": bool,
        "selectable": bool,
        "parent_id": str,
        "pathway_ids": List[str],
        "effective_time": str,
        "expiration_time": str,
        "code": str,
        "description": List[I18n],
        "custom_fields": List[ObjectFieldData],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.name: Optional[List[I18n]] = None
        self.active: Optional[bool] = None
        self.selectable: Optional[bool] = None
        self.parent_id: Optional[str] = None
        self.pathway_ids: Optional[List[str]] = None
        self.effective_time: Optional[str] = None
        self.expiration_time: Optional[str] = None
        self.code: Optional[str] = None
        self.description: Optional[List[I18n]] = None
        self.custom_fields: Optional[List[ObjectFieldData]] = None
        init(self, d, self._types)

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


class JobFamilyBuilder(object):
    def __init__(self) -> None:
        self._job_family = JobFamily()

    def id(self, id: str) -> "JobFamilyBuilder":
        self._job_family.id = id
        return self

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

    def active(self, active: bool) -> "JobFamilyBuilder":
        self._job_family.active = active
        return self

    def selectable(self, selectable: bool) -> "JobFamilyBuilder":
        self._job_family.selectable = selectable
        return self

    def parent_id(self, parent_id: str) -> "JobFamilyBuilder":
        self._job_family.parent_id = parent_id
        return self

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

    def effective_time(self, effective_time: str) -> "JobFamilyBuilder":
        self._job_family.effective_time = effective_time
        return self

    def expiration_time(self, expiration_time: str) -> "JobFamilyBuilder":
        self._job_family.expiration_time = expiration_time
        return self

    def code(self, code: str) -> "JobFamilyBuilder":
        self._job_family.code = code
        return self

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

    def custom_fields(self, custom_fields: List[ObjectFieldData]) -> "JobFamilyBuilder":
        self._job_family.custom_fields = custom_fields
        return self

    def build(self) -> "JobFamily":
        return self._job_family
