# 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 .leave_time import LeaveTime
from .leave_time import LeaveTime


class LeaveRequestCreated(object):
    _types = {
        "employment_id": str,
        "leave_type_id": str,
        "start_time": LeaveTime,
        "end_time": LeaveTime,
        "time_zone": str,
        "daily_leave_mode": str,
        "arrive_late_minutes": int,
        "leave_early_minutes": int,
        "notes": str,
        "date_of_marriage_certificate": str,
        "provide_premarital_examination_materials": bool,
        "is_couple_live_apart": bool,
        "difficulty_giving_birth": bool,
        "pregnant_months": int,
        "due_date": str,
        "child_date_of_birth": str,
        "number_of_newborns": int,
        "applicable_scenarios": str,
    }

    def __init__(self, d=None):
        self.employment_id: Optional[str] = None
        self.leave_type_id: Optional[str] = None
        self.start_time: Optional[LeaveTime] = None
        self.end_time: Optional[LeaveTime] = None
        self.time_zone: Optional[str] = None
        self.daily_leave_mode: Optional[str] = None
        self.arrive_late_minutes: Optional[int] = None
        self.leave_early_minutes: Optional[int] = None
        self.notes: Optional[str] = None
        self.date_of_marriage_certificate: Optional[str] = None
        self.provide_premarital_examination_materials: Optional[bool] = None
        self.is_couple_live_apart: Optional[bool] = None
        self.difficulty_giving_birth: Optional[bool] = None
        self.pregnant_months: Optional[int] = None
        self.due_date: Optional[str] = None
        self.child_date_of_birth: Optional[str] = None
        self.number_of_newborns: Optional[int] = None
        self.applicable_scenarios: Optional[str] = None
        init(self, d, self._types)

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


class LeaveRequestCreatedBuilder(object):
    def __init__(self) -> None:
        self._leave_request_created = LeaveRequestCreated()

    def employment_id(self, employment_id: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.employment_id = employment_id
        return self

    def leave_type_id(self, leave_type_id: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.leave_type_id = leave_type_id
        return self

    def start_time(self, start_time: LeaveTime) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.start_time = start_time
        return self

    def end_time(self, end_time: LeaveTime) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.end_time = end_time
        return self

    def time_zone(self, time_zone: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.time_zone = time_zone
        return self

    def daily_leave_mode(self, daily_leave_mode: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.daily_leave_mode = daily_leave_mode
        return self

    def arrive_late_minutes(self, arrive_late_minutes: int) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.arrive_late_minutes = arrive_late_minutes
        return self

    def leave_early_minutes(self, leave_early_minutes: int) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.leave_early_minutes = leave_early_minutes
        return self

    def notes(self, notes: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.notes = notes
        return self

    def date_of_marriage_certificate(self, date_of_marriage_certificate: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.date_of_marriage_certificate = date_of_marriage_certificate
        return self

    def provide_premarital_examination_materials(self,
                                                 provide_premarital_examination_materials: bool) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.provide_premarital_examination_materials = provide_premarital_examination_materials
        return self

    def is_couple_live_apart(self, is_couple_live_apart: bool) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.is_couple_live_apart = is_couple_live_apart
        return self

    def difficulty_giving_birth(self, difficulty_giving_birth: bool) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.difficulty_giving_birth = difficulty_giving_birth
        return self

    def pregnant_months(self, pregnant_months: int) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.pregnant_months = pregnant_months
        return self

    def due_date(self, due_date: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.due_date = due_date
        return self

    def child_date_of_birth(self, child_date_of_birth: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.child_date_of_birth = child_date_of_birth
        return self

    def number_of_newborns(self, number_of_newborns: int) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.number_of_newborns = number_of_newborns
        return self

    def applicable_scenarios(self, applicable_scenarios: str) -> "LeaveRequestCreatedBuilder":
        self._leave_request_created.applicable_scenarios = applicable_scenarios
        return self

    def build(self) -> "LeaveRequestCreated":
        return self._leave_request_created
