# Code generated by Lark OpenAPI.

from typing import Optional

from lark_oapi.core.construct import init


class IframeComponent(object):
    _types = {
        "iframe_type": int,
        "url": str,
    }

    def __init__(self, d=None):
        self.iframe_type: Optional[int] = None
        self.url: Optional[str] = None
        init(self, d, self._types)

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


class IframeComponentBuilder(object):
    def __init__(self) -> None:
        self._iframe_component = IframeComponent()

    def iframe_type(self, iframe_type: int) -> "IframeComponentBuilder":
        self._iframe_component.iframe_type = iframe_type
        return self

    def url(self, url: str) -> "IframeComponentBuilder":
        self._iframe_component.url = url
        return self

    def build(self) -> "IframeComponent":
        return self._iframe_component
