# Code generated by Lark OpenAPI.

from typing import Optional, List

from lark_oapi.core.construct import init
from .leave_type import LeaveType


class LeaveTypesLeaveResponseBody(object):
    _types = {
        "leave_type_list": List[LeaveType],
        "has_more": bool,
        "page_token": str,
    }

    def __init__(self, d=None):
        self.leave_type_list: Optional[List[LeaveType]] = None
        self.has_more: Optional[bool] = None
        self.page_token: Optional[str] = None
        init(self, d, self._types)

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


class LeaveTypesLeaveResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._leave_types_leave_response_body = LeaveTypesLeaveResponseBody()

    def leave_type_list(self, leave_type_list: List[LeaveType]) -> "LeaveTypesLeaveResponseBodyBuilder":
        self._leave_types_leave_response_body.leave_type_list = leave_type_list
        return self

    def has_more(self, has_more: bool) -> "LeaveTypesLeaveResponseBodyBuilder":
        self._leave_types_leave_response_body.has_more = has_more
        return self

    def page_token(self, page_token: str) -> "LeaveTypesLeaveResponseBodyBuilder":
        self._leave_types_leave_response_body.page_token = page_token
        return self

    def build(self) -> "LeaveTypesLeaveResponseBody":
        return self._leave_types_leave_response_body
