# 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 Point(object):
    _types = {
        "x": float,
        "y": float,
    }

    def __init__(self, d=None):
        self.x: Optional[float] = None
        self.y: Optional[float] = None
        init(self, d, self._types)

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


class PointBuilder(object):
    def __init__(self) -> None:
        self._point = Point()

    def x(self, x: float) -> "PointBuilder":
        self._point.x = x
        return self

    def y(self, y: float) -> "PointBuilder":
        self._point.y = y
        return self

    def build(self) -> "Point":
        return self._point
