o
    "h                     @   sh   d Z ddlZddlmZ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	 d	eZdS )
zRThis module contains an object that represents a Telegram Prepared inline Message.    N)TYPE_CHECKINGOptional)TelegramObject)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc                       sb   e Zd ZdZdZdddedejdee	 f fdd	Z
edd
e	ded dd f fddZ  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                   s0   t  j|d || _|| _| jf| _|   d S )Nr   )super__init__r   r
   	_id_attrs_freeze)selfr   r
   r   	__class__ Y/var/www/html/venv/lib/python3.10/site-packages/telegram/_inline/preparedinlinemessage.pyr   6   s
   
zPreparedInlineMessage.__init__databotr   returnc                    s8   |  |}t|}t|d|d|d< t j||dS )z,See :meth:`telegram.TelegramObject.de_json`.r
   )tzinfo)r   r   )_parse_datar   r   getr   de_json)clsr   r   
loc_tzinfor   r   r   r   E   s   
zPreparedInlineMessage.de_json)N)__name__
__module____qualname____doc__	__slots__strdtmdatetimer   r   r   classmethodr   __classcell__r   r   r   r   r	      s    *r	   )r#   r'   r&   typingr   r   telegram._telegramobjectr   telegram._utils.datetimer   r   telegram._utils.typesr   telegramr   r	   r   r   r   r   <module>   s   