
    di                     j    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e          Zd	S )
z#Common base class for media objects    )TYPE_CHECKING)TelegramObject)DEFAULT_NONE)JSONDictODVInput)Filec                        e Zd ZdZdZ	 ddddedededz  dedz  f fd	Ze	e	e	e	dd
de
e         de
e         de
e         de
e         dedz  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| _        d S )Nr   )super__init__strr   r   r   	_id_attrs)selfr   r   r   r   	__class__s        X/root/projects/qq-shell/venv/lib/python3.11/site-packages/telegram/_files/_basemedium.pyr   z_BaseMedium.__init__8   sW     	J///  LL#&~#6#6%.-/    )read_timeoutwrite_timeoutconnect_timeoutpool_timeoutr   r   r   r   r   returnr   c                v   K   |                                                      | j        |||||           d{V 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   s         r   r    z_BaseMedium.get_fileJ   s_      ( \\^^,,L%'+%! - 
 
 
 
 
 
 
 
 	
r   )N)__name__
__module____qualname____doc__	__slots__r   intr   r   r   r   floatr    __classcell__)r   s   @r   r
   r
      s        , ;I !%	0 '+0 0 00 0 :	0 tO0 0 0 0 0 0* )5)5+7(4&*
 
 
 uo
  	

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