
    Yia                         S r SSKJr  SSKJr  SSKJrJr  SSKJr  SSK	J
r
  SSKJrJr  SSKJr  \(       a  SS	KJr   " S
 S\5      rg)zFThis module contains an object that represents a Telegram WebhookInfo.    )Sequence)datetime)TYPE_CHECKINGOptional)TelegramObject)parse_sequence_arg)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)Botc                      ^  \ rS rSrSrSr      SSS.S\S\S\S	\	\
   S
\	\   S\	\   S\	\\      S\	\   S\	\
   S\	\   4U 4S jjjjr\ SS\	\   S\	S   S\	S    4U 4S jjj5       rSrU =r$ )WebhookInfo"   aF  This object represents a Telegram WebhookInfo.

Contains information about the current status of a webhook.

Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`url`, :attr:`has_custom_certificate`,
:attr:`pending_update_count`, :attr:`ip_address`, :attr:`last_error_date`,
:attr:`last_error_message`, :attr:`max_connections`, :attr:`allowed_updates` and
:attr:`last_synchronization_error_date` are equal.

.. versionchanged:: 20.0
   :attr:`last_synchronization_error_date` is considered as well when comparing objects of
   this type in terms of equality.

Args:
    url (:obj:`str`): Webhook URL, may be empty if webhook is not set up.
    has_custom_certificate (:obj:`bool`): :obj:`True`, if a custom certificate was provided for
        webhook certificate checks.
    pending_update_count (:obj:`int`): Number of updates awaiting delivery.
    ip_address (:obj:`str`, optional): Currently used webhook IP address.
    last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent
        error that happened when trying to deliver an update via webhook.

        .. versionchanged:: 20.3
            |datetime_localization|
    last_error_message (:obj:`str`, optional): Error message in human-readable format for the
        most recent error that happened when trying to deliver an update via webhook.
    max_connections (:obj:`int`, optional): Maximum allowed number of simultaneous HTTPS
        connections to the webhook for update delivery.
    allowed_updates (Sequence[:obj:`str`], optional): A sequence of update types the bot is
        subscribed to. Defaults to all update types, except
        :attr:`telegram.Update.chat_member`.

        .. versionchanged:: 20.0
            |sequenceclassargs|

    last_synchronization_error_date (:class:`datetime.datetime`, optional): Datetime of the
        most recent error that happened when trying to synchronize available updates with
        Telegram datacenters.

        .. versionadded:: 20.0

        .. versionchanged:: 20.3
            |datetime_localization|
Attributes:
    url (:obj:`str`): Webhook URL, may be empty if webhook is not set up.
    has_custom_certificate (:obj:`bool`): :obj:`True`, if a custom certificate was provided for
        webhook certificate checks.
    pending_update_count (:obj:`int`): Number of updates awaiting delivery.
    ip_address (:obj:`str`): Optional. Currently used webhook IP address.
    last_error_date (:class:`datetime.datetime`): Optional. Datetime for the most recent
        error that happened when trying to deliver an update via webhook.

        .. versionchanged:: 20.3
            |datetime_localization|
    last_error_message (:obj:`str`): Optional. Error message in human-readable format for the
        most recent error that happened when trying to deliver an update via webhook.
    max_connections (:obj:`int`): Optional. Maximum allowed number of simultaneous HTTPS
        connections to the webhook for update delivery.
    allowed_updates (tuple[:obj:`str`]): Optional. A tuple of update types the bot is
        subscribed to. Defaults to all update types, except
        :attr:`telegram.Update.chat_member`.

        .. versionchanged:: 20.0

            * |tupleclassattrs|
            * |alwaystuple|
    last_synchronization_error_date (:class:`datetime.datetime`, optional): Datetime of the
        most recent error that happened when trying to synchronize available updates with
        Telegram datacenters.

        .. versionadded:: 20.0

        .. versionchanged:: 20.3
            |datetime_localization|
)	allowed_updateshas_custom_certificate
ip_addresslast_error_datelast_error_messagelast_synchronization_error_datemax_connectionspending_update_counturlN
api_kwargsr   r   r   r   r   r   r   r   r   r   c
          	        > [         TU ]  U
S9  Xl        X l        X0l        Xl        X@l        XPl        X`l        [        U5      U l
        Xl        U R                  U R                  U R                  U R
                  U R                  U R                  U R                  U R                  U R                  4	U l        U R                  5         g )Nr   )super__init__r   r   r   r   r   r   r   r   r   r   	_id_attrs_freeze)selfr   r   r   r   r   r   r   r   r   r   	__class__s              @/app/.venv/lib/python3.13/site-packages/telegram/_webhookinfo.pyr   WebhookInfo.__init__|   s     	J/,B#)=! *43B1C.=0B?0SCb, HH''%%OO  ##    00

 	    databotr   returnc                    > U R                  U5      nU(       d  g[        U5      n[        UR                  S5      US9US'   [        UR                  S5      US9US'   [        TU ]  XS9$ )z,See :meth:`telegram.TelegramObject.de_json`.Nr   )tzinfor   )r%   r&   )_parse_datar	   r
   getr   de_json)clsr%   r&   
loc_tzinfor!   s       r"   r,   WebhookInfo.de_json   st    
 t$ 2#6
"0:K1LU_"`2@HH67
3
./ wD22r$   )
r   r   r   r   r   r   r   r   r   r   )NNNNNN)N)__name__
__module____qualname____firstlineno____doc__	__slots__strboolintr   r   r   r   r   classmethodr,   __static_attributes____classcell__)r!   s   @r"   r   r   "   s    KZ
I" /3,0)-37$(>B( *.(( !%( "	(
 "(+( %SM( "#( "(3-0( SM( *2();( X&( (T >B3H%3,4UO3	-	 3 3r$   r   N)r4   collections.abcr   r   typingr   r   telegram._telegramobjectr   telegram._utils.argumentparsingr   telegram._utils.datetimer	   r
   telegram._utils.typesr   telegramr   r    r$   r"   <module>rD      s4   & M $  * 3 > Q *V3. V3r$   