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


class ConnectorAttachedObject(object):
    _types = {
        "id": str,
        "snap_to": str,
        "position": Point,
    }

    def __init__(self, d=None):
        self.id: Optional[str] = None
        self.snap_to: Optional[str] = None
        self.position: Optional[Point] = None
        init(self, d, self._types)

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


class ConnectorAttachedObjectBuilder(object):
    def __init__(self) -> None:
        self._connector_attached_object = ConnectorAttachedObject()

    def id(self, id: str) -> "ConnectorAttachedObjectBuilder":
        self._connector_attached_object.id = id
        return self

    def snap_to(self, snap_to: str) -> "ConnectorAttachedObjectBuilder":
        self._connector_attached_object.snap_to = snap_to
        return self

    def position(self, position: Point) -> "ConnectorAttachedObjectBuilder":
        self._connector_attached_object.position = position
        return self

    def build(self) -> "ConnectorAttachedObject":
        return self._connector_attached_object
