U
    2Òtc^
  ã                   @   sX   d Z ddlmZmZmZ ddlmZmZ ddlm	Z	 erDddlm
Z
 G dd„ deƒZdS )	zJThis module contains an object that represents a Telegram Proximity Alert.é    )ÚAnyÚOptionalÚTYPE_CHECKING)ÚTelegramObjectÚUser)ÚJSONDict)ÚBotc                   @   sF   e Zd ZdZdZeeeedœdd„Ze	e
e de
d  dœdd	„ƒZd
S )ÚProximityAlertTriggereda  
    This object represents the content of a service message, sent whenever a user in the chat
    triggers a proximity alert set by another user.

    Objects of this class are comparable in terms of equality. Two objects of this class are
    considered equal, if their :attr:`traveler`, :attr:`watcher` and :attr:`distance` are equal.

    Args:
        traveler (:class:`telegram.User`): User that triggered the alert
        watcher (:class:`telegram.User`): User that set the alert
        distance (:obj:`int`): The distance between the users

    Attributes:
        traveler (:class:`telegram.User`): User that triggered the alert
        watcher (:class:`telegram.User`): User that set the alert
        distance (:obj:`int`): The distance between the users

    )ÚtravelerÚdistanceÚwatcherÚ	_id_attrs)r
   r   r   Ú_kwargsc                 K   s(   || _ || _|| _| j | j| jf| _d S )N)r
   r   r   r   )Úselfr
   r   r   r   © r   úD/tmp/pip-unpacked-wheel-2u9rcp5s/telegram/proximityalerttriggered.pyÚ__init__3   s    z ProximityAlertTriggered.__init__r   )ÚdataÚbotÚreturnc                 C   sP   |   |¡}|sdS t | d¡|¡|d< t | d¡|¡|d< | f d|i|—ŽS )z,See :meth:`telegram.TelegramObject.de_json`.Nr
   r   r   )Z_parse_datar   Úde_jsonÚget)Úclsr   r   r   r   r   r   :   s    
zProximityAlertTriggered.de_jsonN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   Úintr   r   Úclassmethodr   r   r   r   r   r   r   r	      s
   r	   N)r   Útypingr   r   r   Ztelegramr   r   Ztelegram.utils.typesr   r   r	   r   r   r   r   Ú<module>   s   