# 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


class SocialArchive(object):
    _types = {
        "user_id": str,
        "details": List[SocialArchiveDetail],
    }

    def __init__(self, d=None):
        self.user_id: Optional[str] = None
        self.details: Optional[List[SocialArchiveDetail]] = None
        init(self, d, self._types)

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


class SocialArchiveBuilder(object):
    def __init__(self) -> None:
        self._social_archive = SocialArchive()

    def user_id(self, user_id: str) -> "SocialArchiveBuilder":
        self._social_archive.user_id = user_id
        return self

    def details(self, details: List[SocialArchiveDetail]) -> "SocialArchiveBuilder":
        self._social_archive.details = details
        return self

    def build(self) -> "SocialArchive":
        return self._social_archive
