
    iq                     r    d Z ddlZddlmZ ddlmZ ddlmZm	Z	 ddl
mZ erddlmZ  G d d	e          ZdS )
zRThis module contains an object that represents a Telegram Prepared inline Message.    N)TYPE_CHECKING)TelegramObject)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc                   t     e Zd ZdZdZdddedej        dedz  f fdZ	e
dd	ed
ddd f fd            Z xZS )PreparedInlineMessagea  Describes an inline message to be sent by a user of a Mini App.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`id` is equal.

    .. versionadded:: 21.8

    Args:
        id (:obj:`str`): Unique identifier of the prepared message
        expiration_date (:class:`datetime.datetime`): Expiration date of the prepared message.
            Expired prepared messages can no longer be used.
            |datetime_localization|

    Attributes:
        id (:obj:`str`): Unique identifier of the prepared message
        expiration_date (:class:`datetime.datetime`): Expiration date of the prepared message.
            Expired prepared messages can no longer be used.
            |datetime_localization|
    )expiration_dateidN
api_kwargsr   r   r   c                    t                                          |           || _        || _        | j        f| _        |                                  d S )Nr   )super__init__r   r   	_id_attrs_freeze)selfr   r   r   	__class__s       f/Users/shanyulin/my-agent/.venv/lib/python3.11/site-packages/telegram/_inline/preparedinlinemessage.pyr   zPreparedInlineMessage.__init__7   sK     	J///-<'    databotz
Bot | Nonereturnc                     |                      |          }t          |          }t          |                    d          |          |d<   t	                                          ||          S )z,See :meth:`telegram.TelegramObject.de_json`.r   )tzinfo)r   r   )_parse_datar   r   getr   de_json)clsr   r   
loc_tzinfor   s       r   r   zPreparedInlineMessage.de_jsonF   se     t$$ 2#66
"0:K1L1LU_"`"`"`wwDc222r   )N)__name__
__module____qualname____doc__	__slots__strdtmdatetimer   r   classmethodr   __classcell__)r   s   @r   r
   r
       s         ( *I '+   
 tO      3 38 3, 3BY 3 3 3 3 3 [3 3 3 3 3r   r
   )r%   r)   r(   typingr   telegram._telegramobjectr   telegram._utils.datetimer   r   telegram._utils.typesr   telegramr   r
    r   r   <module>r2      s   & Y X                 3 3 3 3 3 3 Q Q Q Q Q Q Q Q * * * * * * /3 /3 /3 /3 /3N /3 /3 /3 /3 /3r   