# 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 .chat_pin_icon import ChatPinIcon
from .i18n_names import I18nNames


class UpdateUrlPin(object):
    _types = {
        "icon": ChatPinIcon,
        "title": str,
        "i18n_title": I18nNames,
    }

    def __init__(self, d=None):
        self.icon: Optional[ChatPinIcon] = None
        self.title: Optional[str] = None
        self.i18n_title: Optional[I18nNames] = None
        init(self, d, self._types)

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


class UpdateUrlPinBuilder(object):
    def __init__(self) -> None:
        self._update_url_pin = UpdateUrlPin()

    def icon(self, icon: ChatPinIcon) -> "UpdateUrlPinBuilder":
        self._update_url_pin.icon = icon
        return self

    def title(self, title: str) -> "UpdateUrlPinBuilder":
        self._update_url_pin.title = title
        return self

    def i18n_title(self, i18n_title: I18nNames) -> "UpdateUrlPinBuilder":
        self._update_url_pin.i18n_title = i18n_title
        return self

    def build(self) -> "UpdateUrlPin":
        return self._update_url_pin
