# 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 CardLink(object):
    _types = {
        "url": str,
        "pc_url": str,
        "ios_url": str,
        "android_url": str,
    }

    def __init__(self, d=None):
        self.url: Optional[str] = None
        self.pc_url: Optional[str] = None
        self.ios_url: Optional[str] = None
        self.android_url: Optional[str] = None
        init(self, d, self._types)

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


class CardLinkBuilder(object):
    def __init__(self) -> None:
        self._card_link = CardLink()

    def url(self, url: str) -> "CardLinkBuilder":
        self._card_link.url = url
        return self

    def pc_url(self, pc_url: str) -> "CardLinkBuilder":
        self._card_link.pc_url = pc_url
        return self

    def ios_url(self, ios_url: str) -> "CardLinkBuilder":
        self._card_link.ios_url = ios_url
        return self

    def android_url(self, android_url: str) -> "CardLinkBuilder":
        self._card_link.android_url = android_url
        return self

    def build(self) -> "CardLink":
        return self._card_link
