# 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 .imported_metric import ImportedMetric


class ImportMetricDetailRequestBody(object):
    _types = {
        "semester_id": int,
        "import_record_name": str,
        "imported_metrics": List[ImportedMetric],
    }

    def __init__(self, d=None):
        self.semester_id: Optional[int] = None
        self.import_record_name: Optional[str] = None
        self.imported_metrics: Optional[List[ImportedMetric]] = None
        init(self, d, self._types)

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


class ImportMetricDetailRequestBodyBuilder(object):
    def __init__(self) -> None:
        self._import_metric_detail_request_body = ImportMetricDetailRequestBody()

    def semester_id(self, semester_id: int) -> "ImportMetricDetailRequestBodyBuilder":
        self._import_metric_detail_request_body.semester_id = semester_id
        return self

    def import_record_name(self, import_record_name: str) -> "ImportMetricDetailRequestBodyBuilder":
        self._import_metric_detail_request_body.import_record_name = import_record_name
        return self

    def imported_metrics(self, imported_metrics: List[ImportedMetric]) -> "ImportMetricDetailRequestBodyBuilder":
        self._import_metric_detail_request_body.imported_metrics = imported_metrics
        return self

    def build(self) -> "ImportMetricDetailRequestBody":
        return self._import_metric_detail_request_body
