# 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 AppRichDescriptionSegment(object):
    _types = {
        "segment_type": str,
        "text": str,
        "link": str,
    }

    def __init__(self, d=None):
        self.segment_type: Optional[str] = None
        self.text: Optional[str] = None
        self.link: Optional[str] = None
        init(self, d, self._types)

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


class AppRichDescriptionSegmentBuilder(object):
    def __init__(self) -> None:
        self._app_rich_description_segment = AppRichDescriptionSegment()

    def segment_type(self, segment_type: str) -> "AppRichDescriptionSegmentBuilder":
        self._app_rich_description_segment.segment_type = segment_type
        return self

    def text(self, text: str) -> "AppRichDescriptionSegmentBuilder":
        self._app_rich_description_segment.text = text
        return self

    def link(self, link: str) -> "AppRichDescriptionSegmentBuilder":
        self._app_rich_description_segment.link = link
        return self

    def build(self) -> "AppRichDescriptionSegment":
        return self._app_rich_description_segment
