U
    2ÒtcÑ	  ã                   @   s`   d Z ddlmZmZmZ ddlmZ ddlmZ ddl	m
Z
 erLddlmZ G dd	„ d	eƒZd
S )zWThis module contains an object that represents a location to which a chat is connected.é    )ÚTYPE_CHECKINGÚAnyÚOptional)ÚTelegramObject)ÚJSONDicté   )ÚLocation)ÚBotc                   @   sD   e Zd ZdZdZeeedœdd„Ze	e
e de
d  dœdd	„ƒZd
S )ÚChatLocationaË  This object represents a location to which a chat is connected.

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

    Args:
        location (:class:`telegram.Location`): The location to which the supergroup is connected.
            Can't be a live location.
        address (:obj:`str`): Location address; 1-64 characters, as defined by the chat owner
        **kwargs (:obj:`dict`): Arbitrary keyword arguments.

    Attributes:
        location (:class:`telegram.Location`): The location to which the supergroup is connected.
        address (:obj:`str`): Location address, as defined by the chat owner

    )ÚlocationÚ	_id_attrsÚaddress)r   r   Ú_kwargsc                 K   s   || _ || _| j f| _d S )N)r   r   r   )Úselfr   r   r   © r   ú9/tmp/pip-unpacked-wheel-2u9rcp5s/telegram/chatlocation.pyÚ__init__4   s    zChatLocation.__init__r	   )ÚdataÚbotÚreturnc                 C   s:   |   |¡}|sdS t | d¡|¡|d< | f d|i|—ŽS )z,See :meth:`telegram.TelegramObject.de_json`.Nr   r   )Z_parse_datar   Úde_jsonÚget)Úclsr   r   r   r   r   r   ?   s
    
zChatLocation.de_jsonN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   Ústrr   r   Úclassmethodr   r   r   r   r   r   r   r
       s   ür
   N)r   Útypingr   r   r   Ztelegramr   Ztelegram.utils.typesr   Zfiles.locationr   r	   r
   r   r   r   r   Ú<module>   s   