# 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 .offer_email_info import OfferEmailInfo
from .acceptance import Acceptance
from .offer_file import OfferFile
from .offer_signature_info import OfferSignatureInfo


class OfferSendRecord(object):
    _types = {
        "offer_send_record_id": str,
        "operator_user_id": str,
        "send_time": str,
        "offer_letter_status": int,
        "email_info": OfferEmailInfo,
        "acceptance_list": List[Acceptance],
        "offer_file_list": List[OfferFile],
        "offer_signature_info": OfferSignatureInfo,
    }

    def __init__(self, d=None):
        self.offer_send_record_id: Optional[str] = None
        self.operator_user_id: Optional[str] = None
        self.send_time: Optional[str] = None
        self.offer_letter_status: Optional[int] = None
        self.email_info: Optional[OfferEmailInfo] = None
        self.acceptance_list: Optional[List[Acceptance]] = None
        self.offer_file_list: Optional[List[OfferFile]] = None
        self.offer_signature_info: Optional[OfferSignatureInfo] = None
        init(self, d, self._types)

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


class OfferSendRecordBuilder(object):
    def __init__(self) -> None:
        self._offer_send_record = OfferSendRecord()

    def offer_send_record_id(self, offer_send_record_id: str) -> "OfferSendRecordBuilder":
        self._offer_send_record.offer_send_record_id = offer_send_record_id
        return self

    def operator_user_id(self, operator_user_id: str) -> "OfferSendRecordBuilder":
        self._offer_send_record.operator_user_id = operator_user_id
        return self

    def send_time(self, send_time: str) -> "OfferSendRecordBuilder":
        self._offer_send_record.send_time = send_time
        return self

    def offer_letter_status(self, offer_letter_status: int) -> "OfferSendRecordBuilder":
        self._offer_send_record.offer_letter_status = offer_letter_status
        return self

    def email_info(self, email_info: OfferEmailInfo) -> "OfferSendRecordBuilder":
        self._offer_send_record.email_info = email_info
        return self

    def acceptance_list(self, acceptance_list: List[Acceptance]) -> "OfferSendRecordBuilder":
        self._offer_send_record.acceptance_list = acceptance_list
        return self

    def offer_file_list(self, offer_file_list: List[OfferFile]) -> "OfferSendRecordBuilder":
        self._offer_send_record.offer_file_list = offer_file_list
        return self

    def offer_signature_info(self, offer_signature_info: OfferSignatureInfo) -> "OfferSendRecordBuilder":
        self._offer_send_record.offer_signature_info = offer_signature_info
        return self

    def build(self) -> "OfferSendRecord":
        return self._offer_send_record
