# 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_content import I18nContent


class Calendar(object):
    _types = {
        "id": str,
        "names": List[I18nContent],
        "region": str,
        "work_calendar": str,
        "time_zone": str,
        "payroll_cycle": int,
        "status": int,
        "creator_id": str,
        "create_time": str,
        "effective_date": str,
        "period_years": List[str],
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.names: Optional[List[I18nContent]] = None
        self.region: Optional[str] = None
        self.work_calendar: Optional[str] = None
        self.time_zone: Optional[str] = None
        self.payroll_cycle: Optional[int] = None
        self.status: Optional[int] = None
        self.creator_id: Optional[str] = None
        self.create_time: Optional[str] = None
        self.effective_date: Optional[str] = None
        self.period_years: Optional[List[str]] = None
        init(self, d, self._types)

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


class CalendarBuilder(object):
    def __init__(self) -> None:
        self._calendar = Calendar()

    def id(self, id: str) -> "CalendarBuilder":
        self._calendar.id = id
        return self

    def names(self, names: List[I18nContent]) -> "CalendarBuilder":
        self._calendar.names = names
        return self

    def region(self, region: str) -> "CalendarBuilder":
        self._calendar.region = region
        return self

    def work_calendar(self, work_calendar: str) -> "CalendarBuilder":
        self._calendar.work_calendar = work_calendar
        return self

    def time_zone(self, time_zone: str) -> "CalendarBuilder":
        self._calendar.time_zone = time_zone
        return self

    def payroll_cycle(self, payroll_cycle: int) -> "CalendarBuilder":
        self._calendar.payroll_cycle = payroll_cycle
        return self

    def status(self, status: int) -> "CalendarBuilder":
        self._calendar.status = status
        return self

    def creator_id(self, creator_id: str) -> "CalendarBuilder":
        self._calendar.creator_id = creator_id
        return self

    def create_time(self, create_time: str) -> "CalendarBuilder":
        self._calendar.create_time = create_time
        return self

    def effective_date(self, effective_date: str) -> "CalendarBuilder":
        self._calendar.effective_date = effective_date
        return self

    def period_years(self, period_years: List[str]) -> "CalendarBuilder":
        self._calendar.period_years = period_years
        return self

    def build(self) -> "Calendar":
        return self._calendar
