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

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

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


class TrapezoidBuilder(object):
    def __init__(self) -> None:
        self._trapezoid = Trapezoid()

    def top_length(self, top_length: float) -> "TrapezoidBuilder":
        self._trapezoid.top_length = top_length
        return self

    def build(self) -> "Trapezoid":
        return self._trapezoid
