# 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 .social_archive_detail import SocialArchiveDetail
from .social_archive_detail import SocialArchiveDetail


class SocialArchiveEventDetail(object):
    _types = {
        "insurance_type": str,
        "operate_type": str,
        "source_type": str,
        "after_social_archive_detail": SocialArchiveDetail,
        "before_social_archive_detail": SocialArchiveDetail,
    }

    def __init__(self, d=None):
        self.insurance_type: Optional[str] = None
        self.operate_type: Optional[str] = None
        self.source_type: Optional[str] = None
        self.after_social_archive_detail: Optional[SocialArchiveDetail] = None
        self.before_social_archive_detail: Optional[SocialArchiveDetail] = None
        init(self, d, self._types)

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


class SocialArchiveEventDetailBuilder(object):
    def __init__(self) -> None:
        self._social_archive_event_detail = SocialArchiveEventDetail()

    def insurance_type(self, insurance_type: str) -> "SocialArchiveEventDetailBuilder":
        self._social_archive_event_detail.insurance_type = insurance_type
        return self

    def operate_type(self, operate_type: str) -> "SocialArchiveEventDetailBuilder":
        self._social_archive_event_detail.operate_type = operate_type
        return self

    def source_type(self, source_type: str) -> "SocialArchiveEventDetailBuilder":
        self._social_archive_event_detail.source_type = source_type
        return self

    def after_social_archive_detail(self,
                                    after_social_archive_detail: SocialArchiveDetail) -> "SocialArchiveEventDetailBuilder":
        self._social_archive_event_detail.after_social_archive_detail = after_social_archive_detail
        return self

    def before_social_archive_detail(self,
                                     before_social_archive_detail: SocialArchiveDetail) -> "SocialArchiveEventDetailBuilder":
        self._social_archive_event_detail.before_social_archive_detail = before_social_archive_detail
        return self

    def build(self) -> "SocialArchiveEventDetail":
        return self._social_archive_event_detail
