# 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 .connector_attached_object import ConnectorAttachedObject
from .point import Point


class ConnectorInfo(object):
    _types = {
        "attached_object": ConnectorAttachedObject,
        "position": Point,
        "arrow_style": str,
    }

    def __init__(self, d=None):
        self.attached_object: Optional[ConnectorAttachedObject] = None
        self.position: Optional[Point] = None
        self.arrow_style: Optional[str] = None
        init(self, d, self._types)

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


class ConnectorInfoBuilder(object):
    def __init__(self) -> None:
        self._connector_info = ConnectorInfo()

    def attached_object(self, attached_object: ConnectorAttachedObject) -> "ConnectorInfoBuilder":
        self._connector_info.attached_object = attached_object
        return self

    def position(self, position: Point) -> "ConnectorInfoBuilder":
        self._connector_info.position = position
        return self

    def arrow_style(self, arrow_style: str) -> "ConnectorInfoBuilder":
        self._connector_info.arrow_style = arrow_style
        return self

    def build(self) -> "ConnectorInfo":
        return self._connector_info
