
    ՟f                     f    d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	m
Z
 erddlmZ  G d de      Zy	)
z#Common base class for media objects    )TYPE_CHECKINGOptional)TelegramObject)DEFAULT_NONE)JSONDictODVInput)Filec                        e Zd ZdZdZ	 ddddededee   dee   f fd	Z	e
e
e
e
dd
dee   dee   dee   dee   dee   ddfdZ xZS )_BaseMediuma  Base class for objects representing the various media file types.
    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.

    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.


    )file_id	file_sizefile_unique_idN
api_kwargsr   r   r   r   c                    t         |   |       t        |      | _        t        |      | _        || _        | j                  f| _        y )Nr   )super__init__strr   r   r   	_id_attrs)selfr   r   r   r   	__class__s        V/var/www/cvtools/html/venv/lib/python3.12/site-packages/telegram/_files/_basemedium.pyr   z_BaseMedium.__init__7   sF     	J/  L#&~#6(1--/    )read_timeoutwrite_timeoutconnect_timeoutpool_timeoutr   r   r   r   r   returnr	   c                |   K   | j                         j                  | j                  |||||       d{   S 7 w)a  Convenience wrapper over :meth:`telegram.Bot.get_file`

        For the documentation of the arguments, please see :meth:`telegram.Bot.get_file`.

        Returns:
            :class:`telegram.File`

        Raises:
            :class:`telegram.error.TelegramError`

        )r   r   r   r   r   r   N)get_botget_filer   )r   r   r   r   r   r   s         r   r!   z_BaseMedium.get_fileI   sF     ( \\^,,LL%'+%! - 
 
 	
 
s   3<:<)N)__name__
__module____qualname____doc__	__slots__r   r   intr   r   r   r   floatr!   __classcell__)r   s   @r   r   r      s    , ;I $(	0 *.00 0 C=	0 X&0* )5)5+7(4)-
 uo
  	

 "%
 uo
 X&
 

r   r   N)r%   typingr   r   telegram._telegramobjectr   telegram._utils.defaultvaluer   telegram._utils.typesr   r   telegramr	   r    r   r   <module>r0      s*   & * * 3 5 4F
. F
r   