
    Yi                         S r SSKJrJrJr  SSKJr  SSKJr  SSK	J
r
  \(       a  SSKJr  \" SSS	S
9r " S S\5      rg)z3Common base class for media objects with thumbnails    )TYPE_CHECKINGOptionalTypeVar)_BaseMedium)	PhotoSize)JSONDict)BotThumbedMT_co_BaseThumbedMediumT)bound	covariantc                      ^  \ rS rSrSrSr  SSS.S\S\S\\   S	\\	   S
\\
   4
U 4S jjjjr\ SS\\   S\\
   S\S   S\\   4U 4S jjj5       rSrU =r$ )r   !   a  
Base class for objects representing the various media file types that may include a thumbnail.

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

Args:
    file_id (:obj:`str`): Identifier for this file, which can be used to download
        or reuse the file.
    file_unique_id (:obj:`str`): Unique identifier for this file, which
        is supposed to be the same over time and for different bots.
        Can't be used to download or reuse the file.
    file_size (:obj:`int`, optional): File size.
    thumbnail (:class:`telegram.PhotoSize`, optional): Thumbnail as defined by the sender.

        .. versionadded:: 20.2

Attributes:
    file_id (:obj:`str`): File identifier.
    file_unique_id (:obj:`str`): Unique identifier for this file, which
        is supposed to be the same over time and for different bots.
        Can't be used to download or reuse the file.
    file_size (:obj:`int`): Optional. File size.
    thumbnail (:class:`telegram.PhotoSize`): Optional. Thumbnail as defined by the sender.

        .. versionadded:: 20.2

)	thumbnailN)
api_kwargsfile_idfile_unique_id	file_sizer   r   c                2   > [         TU ]  UUUUS9  X@l        g )N)r   r   r   r   )super__init__r   )selfr   r   r   r   r   	__class__s         M/app/.venv/lib/python3.13/site-packages/telegram/_files/_basethumbedmedium.pyr   _BaseThumbedMedium.__init__A   s*     	)!	 	 	
 /8    clsdatabotr	   returnc                 <  > U R                  U5      nU(       d  g[        UR                  S5      [        5      (       d)  [        R                  " UR                  S5      U5      US'   0 nUR                  S5      b  UR                  S5      US'   [        TU ]  XUS9$ )z,See :meth:`telegram.TelegramObject.de_json`.Nr   thumb)r   r   r   )_parse_data
isinstancegetr   de_jsonpopr   _de_json)r   r   r   r   r   s       r   r&   _BaseThumbedMedium.de_jsonS   s    
 t$ $((;/;; ) 1 1$((;2G MD
 88G("&((7"3JwwTzJJr   )NN)N)__name__
__module____qualname____firstlineno____doc__	__slots__strr   intr   r   r   classmethodtyper
   r&   __static_attributes____classcell__)r   s   @r   r   r   !   s    : I $()-8 *.88 8 C=	8
 I&8 X&8 8$ RVK,K'/'9K@HK	,	K Kr   N)r.   typingr   r   r   telegram._files._basemediumr   telegram._files.photosizer   telegram._utils.typesr   telegramr	   r
   r    r   r   <module>r<      s@   & : 3 3 3 / * ~-ATRFK FKr   