o
    Zzj7  ã                   @   sh   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ er*ddlmZ G dd	„ d	eƒZd
S )z3This module contains the DirectMessagesTopic class.é    )ÚTYPE_CHECKINGÚOptional)ÚTelegramObject)ÚUser)Úde_json_optional)ÚJSONDict)ÚBotc                	       sh   e Zd ZdZdZ	dddœdededB dedB f‡ fdd	„Ze	dd
ede
d dd f‡ fdd„ƒZ‡  ZS )ÚDirectMessagesTopica¦  
    This class represents a topic for direct messages in a chat.

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

    .. versionadded:: 22.4

    Args:
        topic_id (:obj:`int`): Unique identifier of the topic. This number may have more than 32
            significant bits and some programming languages may have difficulty/silent defects in
            interpreting it. But it has at most 52 significant bits, so a 64-bit integer or
            double-precision float type are safe for storing this identifier.
        user (:class:`telegram.User`, optional): Information about the user that created the topic.

            .. hint::
                According to Telegram, this field is always present as of Bot API 9.2.

    Attributes:
        topic_id (:obj:`int`): Unique identifier of the topic. This number may have more than 32
            significant bits and some programming languages may have difficulty/silent defects in
            interpreting it. But it has at most 52 significant bits, so a 64-bit integer or
            double-precision float type are safe for storing this identifier.
        user (:class:`telegram.User`): Optional. Information about the user that created the topic.

            .. hint::
                According to Telegram, this field is always present as of Bot API 9.2.

    )Útopic_idÚuserN©Ú
api_kwargsr
   r   r   c                   s4   t ƒ j|d� || _|| _| j| jf| _|  ¡  d S )Nr   )ÚsuperÚ__init__r
   r   Ú	_id_attrsÚ_freeze)Úselfr
   r   r   ©Ú	__class__© úX/var/www/kodo/tsheker/venv/lib/python3.10/site-packages/telegram/_directmessagestopic.pyr   A   s
   zDirectMessagesTopic.__init__ÚdataÚbotr   Úreturnc                    s0   |   |¡}t| d¡t|ƒ|d< tƒ j||d�S )z,See :meth:`telegram.TelegramObject.de_json`.r   )r   r   )Ú_parse_datar   Úgetr   r   Úde_json)Úclsr   r   r   r   r   r   O   s   
zDirectMessagesTopic.de_json)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__Úintr   r   r   Úclassmethodr   r   Ú__classcell__r   r   r   r   r	       s    ÿÿÿÿÿ*r	   N)r!   Útypingr   r   Útelegram._telegramobjectr   Útelegram._userr   Útelegram._utils.argumentparsingr   Útelegram._utils.typesr   Útelegram._botr   r	   r   r   r   r   Ú<module>   s   