# 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 ConnectorInstanceDefinition(object):
    _types = {
        "connector_source_type": str,
        "connector_api_name": str,
        "action_api_name": str,
        "connection_api_name": str,
        "input_data": str,
        "output_data_schema": str,
    }

    def __init__(self, d=None):
        self.connector_source_type: Optional[str] = None
        self.connector_api_name: Optional[str] = None
        self.action_api_name: Optional[str] = None
        self.connection_api_name: Optional[str] = None
        self.input_data: Optional[str] = None
        self.output_data_schema: Optional[str] = None
        init(self, d, self._types)

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


class ConnectorInstanceDefinitionBuilder(object):
    def __init__(self) -> None:
        self._connector_instance_definition = ConnectorInstanceDefinition()

    def connector_source_type(self, connector_source_type: str) -> "ConnectorInstanceDefinitionBuilder":
        self._connector_instance_definition.connector_source_type = connector_source_type
        return self

    def connector_api_name(self, connector_api_name: str) -> "ConnectorInstanceDefinitionBuilder":
        self._connector_instance_definition.connector_api_name = connector_api_name
        return self

    def action_api_name(self, action_api_name: str) -> "ConnectorInstanceDefinitionBuilder":
        self._connector_instance_definition.action_api_name = action_api_name
        return self

    def connection_api_name(self, connection_api_name: str) -> "ConnectorInstanceDefinitionBuilder":
        self._connector_instance_definition.connection_api_name = connection_api_name
        return self

    def input_data(self, input_data: str) -> "ConnectorInstanceDefinitionBuilder":
        self._connector_instance_definition.input_data = input_data
        return self

    def output_data_schema(self, output_data_schema: str) -> "ConnectorInstanceDefinitionBuilder":
        self._connector_instance_definition.output_data_schema = output_data_schema
        return self

    def build(self) -> "ConnectorInstanceDefinition":
        return self._connector_instance_definition
