U
    g                     @   s\   d Z ddlmZmZ ddlmZ ddlmZ ddlm	Z	 erHddl
mZ G dd deZd	S )
z@This module contains an object that represents a Telegram Venue.    )TYPE_CHECKINGOptional)Location)TelegramObject)JSONDict)Botc                       s|   e Zd ZdZdZdddeeeee ee ee ee ee d fddZ	e
dee ed ed  d	 fd
dZ  ZS )VenueaO  This object represents a venue.

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

    Note:
      Foursquare details and Google Place details are mutually exclusive. However, this
      behaviour is undocumented and might be changed by Telegram.

    Args:
        location (:class:`telegram.Location`): Venue location.
        title (:obj:`str`): Name of the venue.
        address (:obj:`str`): Address of the venue.
        foursquare_id (:obj:`str`, optional): Foursquare identifier of the venue.
        foursquare_type (:obj:`str`, optional): Foursquare type of the venue. (For example,
            "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)
        google_place_id (:obj:`str`, optional): Google Places identifier of the venue.
        google_place_type (:obj:`str`, optional): Google Places type of the venue. (See
            `supported types <https://developers.google.com/maps/documentation/places/web-service            /supported_types>`_.)

    Attributes:
        location (:class:`telegram.Location`): Venue location.
        title (:obj:`str`): Name of the venue.
        address (:obj:`str`): Address of the venue.
        foursquare_id (:obj:`str`): Optional. Foursquare identifier of the venue.
        foursquare_type (:obj:`str`): Optional. Foursquare type of the venue. (For example,
            "arts_entertainment/default", "arts_entertainment/aquarium" or "food/icecream".)
        google_place_id (:obj:`str`): Optional. Google Places identifier of the venue.
        google_place_type (:obj:`str`): Optional. Google Places type of the venue. (See
            `supported types <https://developers.google.com/maps/documentation/places/web-service            /supported_types>`_.)

    )addressfoursquare_idfoursquare_typegoogle_place_idgoogle_place_typelocationtitleN
api_kwargs)r   r   r	   r
   r   r   r   r   c          	         sR   t  j|d || _|| _|| _|| _|| _|| _|| _| j| jf| _	| 
  d S )Nr   )super__init__r   r   r	   r
   r   r   r   Z	_id_attrsZ_freeze)	selfr   r   r	   r
   r   r   r   r   	__class__ 9/tmp/pip-unpacked-wheel-swnnwir2/telegram/_files/venue.pyr   M   s    zVenue.__init__r   )databotreturnc                    s8   |  |}|sdS t|d||d< t j||dS )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )r   r   )Z_parse_datar   de_jsongetr   )clsr   r   r   r   r   r   i   s
    
zVenue.de_json)NNNN)N)__name__
__module____qualname____doc__	__slots__r   strr   r   r   classmethodr   __classcell__r   r   r   r   r      s(   #    
r   N)r"   typingr   r   Ztelegram._files.locationr   Ztelegram._telegramobjectr   Ztelegram._utils.typesr   Ztelegramr   r   r   r   r   r   <module>   s   