# 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 .plan_scope import PlanScope
from .plan_item import PlanItem
from .plan_indicator import PlanIndicator
from .i18n_content import I18nContent
from .i18n_content import I18nContent


class PlanDetail(object):
    _types = {
        "id": str,
        "tid": str,
        "name": str,
        "description": str,
        "effective_date": str,
        "plan_scope": PlanScope,
        "currency_id": str,
        "probation_salary_status": bool,
        "plan_items": List[PlanItem],
        "plan_indicators": List[PlanIndicator],
        "i18n_names": List[I18nContent],
        "i18n_descriptions": List[I18nContent],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.tid: Optional[str] = None
        self.name: Optional[str] = None
        self.description: Optional[str] = None
        self.effective_date: Optional[str] = None
        self.plan_scope: Optional[PlanScope] = None
        self.currency_id: Optional[str] = None
        self.probation_salary_status: Optional[bool] = None
        self.plan_items: Optional[List[PlanItem]] = None
        self.plan_indicators: Optional[List[PlanIndicator]] = None
        self.i18n_names: Optional[List[I18nContent]] = None
        self.i18n_descriptions: Optional[List[I18nContent]] = None
        init(self, d, self._types)

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


class PlanDetailBuilder(object):
    def __init__(self) -> None:
        self._plan_detail = PlanDetail()

    def id(self, id: str) -> "PlanDetailBuilder":
        self._plan_detail.id = id
        return self

    def tid(self, tid: str) -> "PlanDetailBuilder":
        self._plan_detail.tid = tid
        return self

    def name(self, name: str) -> "PlanDetailBuilder":
        self._plan_detail.name = name
        return self

    def description(self, description: str) -> "PlanDetailBuilder":
        self._plan_detail.description = description
        return self

    def effective_date(self, effective_date: str) -> "PlanDetailBuilder":
        self._plan_detail.effective_date = effective_date
        return self

    def plan_scope(self, plan_scope: PlanScope) -> "PlanDetailBuilder":
        self._plan_detail.plan_scope = plan_scope
        return self

    def currency_id(self, currency_id: str) -> "PlanDetailBuilder":
        self._plan_detail.currency_id = currency_id
        return self

    def probation_salary_status(self, probation_salary_status: bool) -> "PlanDetailBuilder":
        self._plan_detail.probation_salary_status = probation_salary_status
        return self

    def plan_items(self, plan_items: List[PlanItem]) -> "PlanDetailBuilder":
        self._plan_detail.plan_items = plan_items
        return self

    def plan_indicators(self, plan_indicators: List[PlanIndicator]) -> "PlanDetailBuilder":
        self._plan_detail.plan_indicators = plan_indicators
        return self

    def i18n_names(self, i18n_names: List[I18nContent]) -> "PlanDetailBuilder":
        self._plan_detail.i18n_names = i18n_names
        return self

    def i18n_descriptions(self, i18n_descriptions: List[I18nContent]) -> "PlanDetailBuilder":
        self._plan_detail.i18n_descriptions = i18n_descriptions
        return self

    def build(self) -> "PlanDetail":
        return self._plan_detail
