# 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_field import ImportedMetricField


class ImportedMetric(object):
    _types = {
        "reviewee_user_id": str,
        "metric_id": int,
        "fields": List[ImportedMetricField],
    }

    def __init__(self, d=None):
        self.reviewee_user_id: Optional[str] = None
        self.metric_id: Optional[int] = None
        self.fields: Optional[List[ImportedMetricField]] = None
        init(self, d, self._types)

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


class ImportedMetricBuilder(object):
    def __init__(self) -> None:
        self._imported_metric = ImportedMetric()

    def reviewee_user_id(self, reviewee_user_id: str) -> "ImportedMetricBuilder":
        self._imported_metric.reviewee_user_id = reviewee_user_id
        return self

    def metric_id(self, metric_id: int) -> "ImportedMetricBuilder":
        self._imported_metric.metric_id = metric_id
        return self

    def fields(self, fields: List[ImportedMetricField]) -> "ImportedMetricBuilder":
        self._imported_metric.fields = fields
        return self

    def build(self) -> "ImportedMetric":
        return self._imported_metric
