o
    Zzj»  ã                   @   s\   d Z ddl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„ deƒZd	S )
z#Common base class for media objectsé    )ÚTYPE_CHECKING)ÚTelegramObject)ÚDEFAULT_NONE)ÚJSONDictÚODVInput)ÚFilec                       sŒ   e Zd ZdZdZ	dddœdedededB dedB f‡ fd	d
„Ze	e	e	e	ddœde
e de
e de
e de
e dedB ddfdd„Z‡  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                   s6   t ƒ j|d� t|ƒ| _t|ƒ| _|| _| jf| _d S )Nr   )ÚsuperÚ__init__Ústrr	   r   r
   Ú	_id_attrs)Úselfr	   r   r
   r   ©Ú	__class__© úV/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_files/_basemedium.pyr   8   s
   

z_BaseMedium.__init__)Úread_timeoutÚwrite_timeoutÚconnect_timeoutÚpool_timeoutr   r   r   r   r   Úreturnr   c                Ã   s$   �|   ¡ j| j|||||d�I dH S )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   r   r   r   r   J   s   €úz_BaseMedium.get_file)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   Úintr   r   r   r   Úfloatr   Ú__classcell__r   r   r   r   r      sB    üúþýüúùýüûúùør   N)r!   Útypingr   Útelegram._telegramobjectr   Útelegram._utils.defaultvaluer   Útelegram._utils.typesr   r   Útelegramr   r   r   r   r   r   Ú<module>   s   