# 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 Icon(object):
    _types = {
        "source": str,
        "color": str,
        "color_id": str,
        "icon": str,
    }

    def __init__(self, d=None):
        self.source: Optional[str] = None
        self.color: Optional[str] = None
        self.color_id: Optional[str] = None
        self.icon: Optional[str] = None
        init(self, d, self._types)

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


class IconBuilder(object):
    def __init__(self) -> None:
        self._icon = Icon()

    def source(self, source: str) -> "IconBuilder":
        self._icon.source = source
        return self

    def color(self, color: str) -> "IconBuilder":
        self._icon.color = color
        return self

    def color_id(self, color_id: str) -> "IconBuilder":
        self._icon.color_id = color_id
        return self

    def icon(self, icon: str) -> "IconBuilder":
        self._icon.icon = icon
        return self

    def build(self) -> "Icon":
        return self._icon
