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

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

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


class AttachmentDownloadFailedReasonBuilder(object):
    def __init__(self) -> None:
        self._attachment_download_failed_reason = AttachmentDownloadFailedReason()

    def attachment_id(self, attachment_id: str) -> "AttachmentDownloadFailedReasonBuilder":
        self._attachment_download_failed_reason.attachment_id = attachment_id
        return self

    def reason(self, reason: str) -> "AttachmentDownloadFailedReasonBuilder":
        self._attachment_download_failed_reason.reason = reason
        return self

    def build(self) -> "AttachmentDownloadFailedReason":
        return self._attachment_download_failed_reason
