# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init
from .leave_granting_record import LeaveGrantingRecord


class CreateLeaveGrantingRecordResponseBody(object):
    _types = {
        "leave_granting_record": LeaveGrantingRecord,
    }

    def __init__(self, d=None):
        self.leave_granting_record: Optional[LeaveGrantingRecord] = None
        init(self, d, self._types)

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


class CreateLeaveGrantingRecordResponseBodyBuilder(object):
    def __init__(self) -> None:
        self._create_leave_granting_record_response_body = CreateLeaveGrantingRecordResponseBody()

    def leave_granting_record(self,
                              leave_granting_record: LeaveGrantingRecord) -> "CreateLeaveGrantingRecordResponseBodyBuilder":
        self._create_leave_granting_record_response_body.leave_granting_record = leave_granting_record
        return self

    def build(self) -> "CreateLeaveGrantingRecordResponseBody":
        return self._create_leave_granting_record_response_body
