# 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


class Plan(object):
    _types = {
        "plan_id": str,
        "plan_tid": str,
        "name": I18n,
        "people_id": int,
    }

    def __init__(self, d=None):
        self.plan_id: Optional[str] = None
        self.plan_tid: Optional[str] = None
        self.name: Optional[I18n] = None
        self.people_id: Optional[int] = None
        init(self, d, self._types)

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


class PlanBuilder(object):
    def __init__(self) -> None:
        self._plan = Plan()

    def plan_id(self, plan_id: str) -> "PlanBuilder":
        self._plan.plan_id = plan_id
        return self

    def plan_tid(self, plan_tid: str) -> "PlanBuilder":
        self._plan.plan_tid = plan_tid
        return self

    def name(self, name: I18n) -> "PlanBuilder":
        self._plan.name = name
        return self

    def people_id(self, people_id: int) -> "PlanBuilder":
        self._plan.people_id = people_id
        return self

    def build(self) -> "Plan":
        return self._plan
