# 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 .verif_field_source_config import VerifFieldSourceConfig
from .verif_field_source_config import VerifFieldSourceConfig


class VerifSourceConfig(object):
    _types = {
        "formula_config": VerifFieldSourceConfig,
        "ref_source_config": VerifFieldSourceConfig,
    }

    def __init__(self, d=None):
        self.formula_config: Optional[VerifFieldSourceConfig] = None
        self.ref_source_config: Optional[VerifFieldSourceConfig] = None
        init(self, d, self._types)

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


class VerifSourceConfigBuilder(object):
    def __init__(self) -> None:
        self._verif_source_config = VerifSourceConfig()

    def formula_config(self, formula_config: VerifFieldSourceConfig) -> "VerifSourceConfigBuilder":
        self._verif_source_config.formula_config = formula_config
        return self

    def ref_source_config(self, ref_source_config: VerifFieldSourceConfig) -> "VerifSourceConfigBuilder":
        self._verif_source_config.ref_source_config = ref_source_config
        return self

    def build(self) -> "VerifSourceConfig":
        return self._verif_source_config
