# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class LeaveRequestCreatedErrorMessage(object):
    _types = {
        "employment_id": str,
        "leave_type_id": str,
        "start_time": str,
        "end_time": str,
        "code": int,
        "msg": str,
    }

    def __init__(self, d=None):
        self.employment_id: Optional[str] = None
        self.leave_type_id: Optional[str] = None
        self.start_time: Optional[str] = None
        self.end_time: Optional[str] = None
        self.code: Optional[int] = None
        self.msg: Optional[str] = None
        init(self, d, self._types)

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


class LeaveRequestCreatedErrorMessageBuilder(object):
    def __init__(self) -> None:
        self._leave_request_created_error_message = LeaveRequestCreatedErrorMessage()

    def employment_id(self, employment_id: str) -> "LeaveRequestCreatedErrorMessageBuilder":
        self._leave_request_created_error_message.employment_id = employment_id
        return self

    def leave_type_id(self, leave_type_id: str) -> "LeaveRequestCreatedErrorMessageBuilder":
        self._leave_request_created_error_message.leave_type_id = leave_type_id
        return self

    def start_time(self, start_time: str) -> "LeaveRequestCreatedErrorMessageBuilder":
        self._leave_request_created_error_message.start_time = start_time
        return self

    def end_time(self, end_time: str) -> "LeaveRequestCreatedErrorMessageBuilder":
        self._leave_request_created_error_message.end_time = end_time
        return self

    def code(self, code: int) -> "LeaveRequestCreatedErrorMessageBuilder":
        self._leave_request_created_error_message.code = code
        return self

    def msg(self, msg: str) -> "LeaveRequestCreatedErrorMessageBuilder":
        self._leave_request_created_error_message.msg = msg
        return self

    def build(self) -> "LeaveRequestCreatedErrorMessage":
        return self._leave_request_created_error_message
