# Code generated by Lark OpenAPI.

from typing import Any, Optional, Union, Dict, List, Set, IO, Callable, Type
from lark_oapi.core.construct import init


class MetricGroup(object):
    _types = {
        "group_id": int,
        "name": str,
    }

    def __init__(self, d=None):
        self.group_id: Optional[int] = None
        self.name: Optional[str] = None
        init(self, d, self._types)

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


class MetricGroupBuilder(object):
    def __init__(self) -> None:
        self._metric_group = MetricGroup()

    def group_id(self, group_id: int) -> "MetricGroupBuilder":
        self._metric_group.group_id = group_id
        return self

    def name(self, name: str) -> "MetricGroupBuilder":
        self._metric_group.name = name
        return self

    def build(self) -> "MetricGroup":
        return self._metric_group
