# 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 AilyMessageFilePreview(object):
    _types = {
        "url": str,
        "expired_at": int,
    }

    def __init__(self, d=None):
        self.url: Optional[str] = None
        self.expired_at: Optional[int] = None
        init(self, d, self._types)

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


class AilyMessageFilePreviewBuilder(object):
    def __init__(self) -> None:
        self._aily_message_file_preview = AilyMessageFilePreview()

    def url(self, url: str) -> "AilyMessageFilePreviewBuilder":
        self._aily_message_file_preview.url = url
        return self

    def expired_at(self, expired_at: int) -> "AilyMessageFilePreviewBuilder":
        self._aily_message_file_preview.expired_at = expired_at
        return self

    def build(self) -> "AilyMessageFilePreview":
        return self._aily_message_file_preview
