o
    "h                     @   st   d Z ddl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 ddlmZ ddlmZmZ G d	d
 d
e
ZdS )zUThis module contains the classes that represent Telegram InputLocationMessageContent.    N)FinalOptionalUnion)	constants)InputMessageContent)to_timedelta)get_timedelta_value)JSONDict
TimePeriodc                       s   e Zd ZU dZdZ				ddddededee dee d	ee d
ee dee	 f fddZ
edeeeejf  fddZejjZee ed< 	 ejjZee ed< 	 ejjZee ed< 	 ejjZee ed< 	 ejjZee ed< 	 ejjZee ed< 	 ejjZee ed<   ZS )InputLocationMessageContenta$  
    Represents the content of a location message to be sent as the result of an inline query.

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

    Args:
        latitude (:obj:`float`): Latitude of the location in degrees.
        longitude (:obj:`float`): Longitude of the location in degrees.
        horizontal_accuracy (:obj:`float`, optional): The radius of uncertainty for the location,
            measured in meters; 0-
            :tg-const:`telegram.InputLocationMessageContent.HORIZONTAL_ACCURACY`.
        live_period (:obj:`int` | :class:`datetime.timedelta`, optional): Period in seconds for
            which the location will be updated, should be between
            :tg-const:`telegram.InputLocationMessageContent.MIN_LIVE_PERIOD` and
            :tg-const:`telegram.InputLocationMessageContent.MAX_LIVE_PERIOD` or
            :tg-const:`telegram.constants.LocationLimit.LIVE_PERIOD_FOREVER` for live
            locations that can be edited indefinitely.

            .. versionchanged:: v22.2
                |time-period-input|
        heading (:obj:`int`, optional): For live locations, a direction in which the user is
            moving, in degrees. Must be between
            :tg-const:`telegram.InputLocationMessageContent.MIN_HEADING` and
            :tg-const:`telegram.InputLocationMessageContent.MAX_HEADING` if specified.
        proximity_alert_radius (:obj:`int`, optional): For live locations, a maximum distance
            for proximity alerts about approaching another chat member, in meters. Must be
            between :tg-const:`telegram.InputLocationMessageContent.MIN_PROXIMITY_ALERT_RADIUS`
            and :tg-const:`telegram.InputLocationMessageContent.MAX_PROXIMITY_ALERT_RADIUS`
            if specified.

    Attributes:
        latitude (:obj:`float`): Latitude of the location in degrees.
        longitude (:obj:`float`): Longitude of the location in degrees.
        horizontal_accuracy (:obj:`float`): Optional. The radius of uncertainty for the location,
            measured in meters; 0-
            :tg-const:`telegram.InputLocationMessageContent.HORIZONTAL_ACCURACY`.
        live_period (:obj:`int` | :class:`datetime.timedelta`): Optional. Period in seconds for
            which the location can be updated, should be between
            :tg-const:`telegram.InputLocationMessageContent.MIN_LIVE_PERIOD` and
            :tg-const:`telegram.InputLocationMessageContent.MAX_LIVE_PERIOD`.

            .. deprecated:: v22.2
                |time-period-int-deprecated|
        heading (:obj:`int`): Optional. For live locations, a direction in which the user is
            moving, in degrees. Must be between
            :tg-const:`telegram.InputLocationMessageContent.MIN_HEADING` and
            :tg-const:`telegram.InputLocationMessageContent.MAX_HEADING` if specified.
        proximity_alert_radius (:obj:`int`): Optional. For live locations, a maximum distance
            for proximity alerts about approaching another chat member, in meters. Must be
            between :tg-const:`telegram.InputLocationMessageContent.MIN_PROXIMITY_ALERT_RADIUS`
            and :tg-const:`telegram.InputLocationMessageContent.MAX_PROXIMITY_ALERT_RADIUS`
            if specified.

    )_live_periodheadinghorizontal_accuracylatitude	longitudeproximity_alert_radiusN
api_kwargsr   r   live_periodr   r   r   r   c                   s~   t  j|d |  * || _|| _t|| _|| _|| _|r#t	|nd | _
| j| jf| _W d    d S 1 s8w   Y  d S )Nr   )super__init__	_unfrozenr   r   r   r   r   r   intr   	_id_attrs)selfr   r   r   r   r   r   r   	__class__ _/var/www/html/venv/lib/python3.10/site-packages/telegram/_inline/inputlocationmessagecontent.pyr   c   s   

"z$InputLocationMessageContent.__init__returnc                 C   s   t | jddS )Nr   )	attribute)r   r   )r   r   r   r   r   ~   s   z'InputLocationMessageContent.live_periodHORIZONTAL_ACCURACYMIN_HEADINGMAX_HEADINGMIN_LIVE_PERIODMAX_LIVE_PERIODMIN_PROXIMITY_ALERT_RADIUSMAX_PROXIMITY_ALERT_RADIUS)NNNN)__name__
__module____qualname____doc__	__slots__floatr   r
   r   r	   r   propertyr   dtm	timedeltar   r   LocationLimitr!   r   __annotations__r"   r#   r$   r%   r&   r'   __classcell__r   r   r   r   r      sP   
 8		r   )r+   datetimer/   typingr   r   r   telegramr   $telegram._inline.inputmessagecontentr   telegram._utils.argumentparsingr   telegram._utils.datetimer   telegram._utils.typesr	   r
   r   r   r   r   r   <module>   s   