# 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 ConnectorInstanceRefInfo(object):
    _types = {
        "source_api_name": str,
        "source_type": str,
        "extra": Dict[str, str],
    }

    def __init__(self, d=None):
        self.source_api_name: Optional[str] = None
        self.source_type: Optional[str] = None
        self.extra: Optional[Dict[str, str]] = None
        init(self, d, self._types)

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


class ConnectorInstanceRefInfoBuilder(object):
    def __init__(self) -> None:
        self._connector_instance_ref_info = ConnectorInstanceRefInfo()

    def source_api_name(self, source_api_name: str) -> "ConnectorInstanceRefInfoBuilder":
        self._connector_instance_ref_info.source_api_name = source_api_name
        return self

    def source_type(self, source_type: str) -> "ConnectorInstanceRefInfoBuilder":
        self._connector_instance_ref_info.source_type = source_type
        return self

    def extra(self, extra: Dict[str, str]) -> "ConnectorInstanceRefInfoBuilder":
        self._connector_instance_ref_info.extra = extra
        return self

    def build(self) -> "ConnectorInstanceRefInfo":
        return self._connector_instance_ref_info
