# 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 MessageAttachment(object):
    _types = {
        "attachment_id": str,
        "download_url": str,
    }

    def __init__(self, d=None):
        self.attachment_id: Optional[str] = None
        self.download_url: Optional[str] = None
        init(self, d, self._types)

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


class MessageAttachmentBuilder(object):
    def __init__(self) -> None:
        self._message_attachment = MessageAttachment()

    def attachment_id(self, attachment_id: str) -> "MessageAttachmentBuilder":
        self._message_attachment.attachment_id = attachment_id
        return self

    def download_url(self, download_url: str) -> "MessageAttachmentBuilder":
        self._message_attachment.download_url = download_url
        return self

    def build(self) -> "MessageAttachment":
        return self._message_attachment
