# 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 .archive_field_data import ArchiveFieldData


class ArchiveReportData(object):
    _types = {
        "member_id": str,
        "start_time": str,
        "end_time": str,
        "field_datas": List[ArchiveFieldData],
    }

    def __init__(self, d=None):
        self.member_id: Optional[str] = None
        self.start_time: Optional[str] = None
        self.end_time: Optional[str] = None
        self.field_datas: Optional[List[ArchiveFieldData]] = None
        init(self, d, self._types)

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


class ArchiveReportDataBuilder(object):
    def __init__(self) -> None:
        self._archive_report_data = ArchiveReportData()

    def member_id(self, member_id: str) -> "ArchiveReportDataBuilder":
        self._archive_report_data.member_id = member_id
        return self

    def start_time(self, start_time: str) -> "ArchiveReportDataBuilder":
        self._archive_report_data.start_time = start_time
        return self

    def end_time(self, end_time: str) -> "ArchiveReportDataBuilder":
        self._archive_report_data.end_time = end_time
        return self

    def field_datas(self, field_datas: List[ArchiveFieldData]) -> "ArchiveReportDataBuilder":
        self._archive_report_data.field_datas = field_datas
        return self

    def build(self) -> "ArchiveReportData":
        return self._archive_report_data
