# 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 Common(object):
    _types = {
        "tenant_id": str,
        "languages": List[str],
        "custom_executors": Dict[str, str],
    }

    def __init__(self, d=None):
        self.tenant_id: Optional[str] = None
        self.languages: Optional[List[str]] = None
        self.custom_executors: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class CommonBuilder(object):
    def __init__(self) -> None:
        self._common = Common()

    def tenant_id(self, tenant_id: str) -> "CommonBuilder":
        self._common.tenant_id = tenant_id
        return self

    def languages(self, languages: List[str]) -> "CommonBuilder":
        self._common.languages = languages
        return self

    def custom_executors(self, custom_executors: Dict[str, str]) -> "CommonBuilder":
        self._common.custom_executors = custom_executors
        return self

    def build(self) -> "Common":
        return self._common
