L idZddlmZmZmZddlmZddlmZddl m Z ddl m Z erddl mZedd d ZGd d eZy )z3Common base class for media objects with thumbnails) TYPE_CHECKINGOptionalTypeVar) _BaseMedium) PhotoSize)de_json_optional)JSONDict)Bot ThumbedMT_co_BaseThumbedMediumT)bound covariantc eZdZdZdZ ddddededeedeed ee f fd Z e dd e e d e d edde ffd ZxZS)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_kwargsfile_idfile_unique_id file_sizerrc:t|||||||_y)N)rrrr)super__init__r)selfrrrrr __class__s h/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_files/_basethumbedmedium.pyrz_BaseThumbedMedium.__init__Cs, )!  /8clsdatabotr returnc|j|}t|jdts#t |jdt||d<i}|jd|j d|d<t ||||S)z,See :meth:`telegram.TelegramObject.de_json`.rthumb)rrr) _parse_data isinstancegetrrpopr_de_json)rrrrrs rde_jsonz_BaseThumbedMedium.de_jsonUs t$$((;/; 0+1F SV WD   88G  ("&((7"3Jw wTszJJr)NN)N)__name__ __module__ __qualname____doc__ __slots__strrintrr r classmethodtyper r' __classcell__)rs@rr r #s:I $()- 8*.888C= 8 I& 8X&8$HLK , K'/K6>uoK KKrN)r+typingrrrtelegram._files._basemediumrtelegram._files.photosizertelegram._utils.argumentparsingrtelegram._utils.typesr telegramr r r rrr9sC&:333/<*~-ATR CKCKr