# 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 .related_dimension_setting import RelatedDimensionSetting


class RelatedDimensionConfig(object):
    _types = {
        "type": int,
        "related_dimension_settings": List[RelatedDimensionSetting],
    }

    def __init__(self, d=None):
        self.type: Optional[int] = None
        self.related_dimension_settings: Optional[List[RelatedDimensionSetting]] = None
        init(self, d, self._types)

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


class RelatedDimensionConfigBuilder(object):
    def __init__(self) -> None:
        self._related_dimension_config = RelatedDimensionConfig()

    def type(self, type: int) -> "RelatedDimensionConfigBuilder":
        self._related_dimension_config.type = type
        return self

    def related_dimension_settings(self, related_dimension_settings: List[
        RelatedDimensionSetting]) -> "RelatedDimensionConfigBuilder":
        self._related_dimension_config.related_dimension_settings = related_dimension_settings
        return self

    def build(self) -> "RelatedDimensionConfig":
        return self._related_dimension_config
