# 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 .enum import Enum
from .enum import Enum
from .enum import Enum
from .custom_field_data import CustomFieldData
from .enum import Enum


class OffboardingInfo(object):
    _types = {
        "employment_id": str,
        "hrbp_id": List[str],
        "expected_offboarding_date": str,
        "offboarding_date": str,
        "reason": Enum,
        "reason_explanation": str,
        "employee_reason": Enum,
        "employee_reason_explanation": str,
        "add_block_list": str,
        "block_reason": Enum,
        "block_reason_explanation": str,
        "custom_fields": List[CustomFieldData],
        "retain_account": bool,
        "social_insurance_end_date": str,
        "provident_fund_end_date": str,
        "enforce_noncompete_agreement": bool,
        "noncompete_agreement_id": str,
        "noncompete_agreement_company": str,
        "noncompete_agreement_start_date": str,
        "noncompete_agreement_end_date": str,
        "sign_type": Enum,
        "signature_file": str,
        "last_attendance_date": str,
        "is_transfer_with_workforce": bool,
    }

    def __init__(self, d=None):
        self.employment_id: Optional[str] = None
        self.hrbp_id: Optional[List[str]] = None
        self.expected_offboarding_date: Optional[str] = None
        self.offboarding_date: Optional[str] = None
        self.reason: Optional[Enum] = None
        self.reason_explanation: Optional[str] = None
        self.employee_reason: Optional[Enum] = None
        self.employee_reason_explanation: Optional[str] = None
        self.add_block_list: Optional[str] = None
        self.block_reason: Optional[Enum] = None
        self.block_reason_explanation: Optional[str] = None
        self.custom_fields: Optional[List[CustomFieldData]] = None
        self.retain_account: Optional[bool] = None
        self.social_insurance_end_date: Optional[str] = None
        self.provident_fund_end_date: Optional[str] = None
        self.enforce_noncompete_agreement: Optional[bool] = None
        self.noncompete_agreement_id: Optional[str] = None
        self.noncompete_agreement_company: Optional[str] = None
        self.noncompete_agreement_start_date: Optional[str] = None
        self.noncompete_agreement_end_date: Optional[str] = None
        self.sign_type: Optional[Enum] = None
        self.signature_file: Optional[str] = None
        self.last_attendance_date: Optional[str] = None
        self.is_transfer_with_workforce: Optional[bool] = None
        init(self, d, self._types)

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


class OffboardingInfoBuilder(object):
    def __init__(self) -> None:
        self._offboarding_info = OffboardingInfo()

    def employment_id(self, employment_id: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.employment_id = employment_id
        return self

    def hrbp_id(self, hrbp_id: List[str]) -> "OffboardingInfoBuilder":
        self._offboarding_info.hrbp_id = hrbp_id
        return self

    def expected_offboarding_date(self, expected_offboarding_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.expected_offboarding_date = expected_offboarding_date
        return self

    def offboarding_date(self, offboarding_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.offboarding_date = offboarding_date
        return self

    def reason(self, reason: Enum) -> "OffboardingInfoBuilder":
        self._offboarding_info.reason = reason
        return self

    def reason_explanation(self, reason_explanation: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.reason_explanation = reason_explanation
        return self

    def employee_reason(self, employee_reason: Enum) -> "OffboardingInfoBuilder":
        self._offboarding_info.employee_reason = employee_reason
        return self

    def employee_reason_explanation(self, employee_reason_explanation: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.employee_reason_explanation = employee_reason_explanation
        return self

    def add_block_list(self, add_block_list: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.add_block_list = add_block_list
        return self

    def block_reason(self, block_reason: Enum) -> "OffboardingInfoBuilder":
        self._offboarding_info.block_reason = block_reason
        return self

    def block_reason_explanation(self, block_reason_explanation: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.block_reason_explanation = block_reason_explanation
        return self

    def custom_fields(self, custom_fields: List[CustomFieldData]) -> "OffboardingInfoBuilder":
        self._offboarding_info.custom_fields = custom_fields
        return self

    def retain_account(self, retain_account: bool) -> "OffboardingInfoBuilder":
        self._offboarding_info.retain_account = retain_account
        return self

    def social_insurance_end_date(self, social_insurance_end_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.social_insurance_end_date = social_insurance_end_date
        return self

    def provident_fund_end_date(self, provident_fund_end_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.provident_fund_end_date = provident_fund_end_date
        return self

    def enforce_noncompete_agreement(self, enforce_noncompete_agreement: bool) -> "OffboardingInfoBuilder":
        self._offboarding_info.enforce_noncompete_agreement = enforce_noncompete_agreement
        return self

    def noncompete_agreement_id(self, noncompete_agreement_id: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.noncompete_agreement_id = noncompete_agreement_id
        return self

    def noncompete_agreement_company(self, noncompete_agreement_company: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.noncompete_agreement_company = noncompete_agreement_company
        return self

    def noncompete_agreement_start_date(self, noncompete_agreement_start_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.noncompete_agreement_start_date = noncompete_agreement_start_date
        return self

    def noncompete_agreement_end_date(self, noncompete_agreement_end_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.noncompete_agreement_end_date = noncompete_agreement_end_date
        return self

    def sign_type(self, sign_type: Enum) -> "OffboardingInfoBuilder":
        self._offboarding_info.sign_type = sign_type
        return self

    def signature_file(self, signature_file: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.signature_file = signature_file
        return self

    def last_attendance_date(self, last_attendance_date: str) -> "OffboardingInfoBuilder":
        self._offboarding_info.last_attendance_date = last_attendance_date
        return self

    def is_transfer_with_workforce(self, is_transfer_with_workforce: bool) -> "OffboardingInfoBuilder":
        self._offboarding_info.is_transfer_with_workforce = is_transfer_with_workforce
        return self

    def build(self) -> "OffboardingInfo":
        return self._offboarding_info
