83 lines
2.5 KiB
Python
83 lines
2.5 KiB
Python
# 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 .social_plan_scope import SocialPlanScope
|
|
from .social_plan_item_detail import SocialPlanItemDetail
|
|
from .i18n import I18n
|
|
|
|
|
|
class SocialPlan(object):
|
|
_types = {
|
|
"plan_id": str,
|
|
"plan_tid": str,
|
|
"name": I18n,
|
|
"effective_date": str,
|
|
"active": bool,
|
|
"insurance_type": str,
|
|
"scope": SocialPlanScope,
|
|
"item_detail": List[SocialPlanItemDetail],
|
|
"remark": I18n,
|
|
}
|
|
|
|
def __init__(self, d=None):
|
|
self.plan_id: Optional[str] = None
|
|
self.plan_tid: Optional[str] = None
|
|
self.name: Optional[I18n] = None
|
|
self.effective_date: Optional[str] = None
|
|
self.active: Optional[bool] = None
|
|
self.insurance_type: Optional[str] = None
|
|
self.scope: Optional[SocialPlanScope] = None
|
|
self.item_detail: Optional[List[SocialPlanItemDetail]] = None
|
|
self.remark: Optional[I18n] = None
|
|
init(self, d, self._types)
|
|
|
|
@staticmethod
|
|
def builder() -> "SocialPlanBuilder":
|
|
return SocialPlanBuilder()
|
|
|
|
|
|
class SocialPlanBuilder(object):
|
|
def __init__(self) -> None:
|
|
self._social_plan = SocialPlan()
|
|
|
|
def plan_id(self, plan_id: str) -> "SocialPlanBuilder":
|
|
self._social_plan.plan_id = plan_id
|
|
return self
|
|
|
|
def plan_tid(self, plan_tid: str) -> "SocialPlanBuilder":
|
|
self._social_plan.plan_tid = plan_tid
|
|
return self
|
|
|
|
def name(self, name: I18n) -> "SocialPlanBuilder":
|
|
self._social_plan.name = name
|
|
return self
|
|
|
|
def effective_date(self, effective_date: str) -> "SocialPlanBuilder":
|
|
self._social_plan.effective_date = effective_date
|
|
return self
|
|
|
|
def active(self, active: bool) -> "SocialPlanBuilder":
|
|
self._social_plan.active = active
|
|
return self
|
|
|
|
def insurance_type(self, insurance_type: str) -> "SocialPlanBuilder":
|
|
self._social_plan.insurance_type = insurance_type
|
|
return self
|
|
|
|
def scope(self, scope: SocialPlanScope) -> "SocialPlanBuilder":
|
|
self._social_plan.scope = scope
|
|
return self
|
|
|
|
def item_detail(self, item_detail: List[SocialPlanItemDetail]) -> "SocialPlanBuilder":
|
|
self._social_plan.item_detail = item_detail
|
|
return self
|
|
|
|
def remark(self, remark: I18n) -> "SocialPlanBuilder":
|
|
self._social_plan.remark = remark
|
|
return self
|
|
|
|
def build(self) -> "SocialPlan":
|
|
return self._social_plan
|