§
    ªeîié  ã                   óŠ   — d Z ddl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 ddlmZ erdd	lmZ  G d
„ de¦  «        ZdS )zFThis module contains an object that represents a Telegram WebhookInfo.é    N)ÚSequence)ÚTYPE_CHECKING)ÚTelegramObject)Úparse_sequence_arg)Úextract_tzinfo_from_defaultsÚfrom_timestamp)ÚJSONDict)ÚBotc                   óØ   ‡ — e Zd ZdZdZ	 	 	 	 	 	 dddœdedededej	        dz  d	edz  d
edz  de
e         dz  dedz  dej	        dz  dedz  fˆ fd„Zeddedddd fˆ fd„¦   «         Zˆ xZS )ÚWebhookInfoa:  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          ¦   «                              |
¬¦  «         || _        || _        || _        || _        || _        || _        || _        t          |¦  «        | _
        |	| _        | j        | j        | j        | j        | j        | j        | j        | j
        | j        f	| _        |                      ¦   «          d S )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              €úY/home/div/.hermes/hermes-agent/venv/lib/python3.11/site-packages/telegram/_webhookinfo.pyr   zWebhookInfo.__init__|   sÂ   ø€ õ 	‰Œ×Ò JÐÑ/Ô/Ð/àˆŒØ,BˆÔ#Ø)=ˆÔ!ð '1ˆŒØ4CˆÔØ.@ˆÔØ+:ˆÔÝ0BÀ?Ñ0SÔ0SˆÔØDcˆÔ,ð ŒHØÔ'ØÔ%ØŒOØÔ ØÔ#ØÔ ØÔ ØÔ0ð

ˆŒð 	�Š‰Œˆˆˆó    ÚdataÚbotz
Bot | NoneÚreturnc                 ó.  •— |                       |¦  «        }t          |¦  «        }t          |                     d¦  «        |¬¦  «        |d<   t          |                     d¦  «        |¬¦  «        |d<   t	          ¦   «                              ||¬¦  «        S )z,See :meth:`telegram.TelegramObject.de_json`.r   )Útzinfor   )r!   r"   )Ú_parse_datar   r   Úgetr   Úde_json)Úclsr!   r"   Ú
loc_tzinfor   s       €r   r(   zWebhookInfo.de_json¦   s“   ø€ ð �Š˜tÑ$Ô$ˆõ 2°#Ñ6Ô6ˆ
å"0°·²Ð:KÑ1LÔ1LÐU_Ð"`Ñ"`Ô"`ˆÐÑÝ2@Ø�HŠHÐ6Ñ7Ô7À
ð3
ñ 3
ô 3
ˆÐ.Ñ/õ ‰wŒw�Š D¨cˆÑ2Ô2Ð2r    )NNNNNN)N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__ÚstrÚboolÚintÚdtmÚdatetimer   r	   r   Úclassmethodr(   Ú__classcell__)r   s   @r   r   r   "   sG  ø€ € € € € ðKð KðZ
€Ið" 04Ø)-Ø&*Ø04Ø!%Ø?Cð(ð '+ð(ð (ð (àð(ð !%ð(ð "ð	(ð
 œ¨Ñ,ð(ð   $™Jð(ð ˜t™ð(ð " #œ¨Ñ-ð(ð ˜$‘Jð(ð *-¬¸Ñ)<ð(ð ˜t‘Oð(ð (ð (ð (ð (ð (ðT ð3ð 3˜8ð 3¨,ð 3À-ð 3ð 3ð 3ð 3ð 3ñ „[ð3ð 3ð 3ð 3ð 3r    r   )r.   r4   r3   Úcollections.abcr   Útypingr   Útelegram._telegramobjectr   Útelegram._utils.argumentparsingr   Útelegram._utils.datetimer   r   Útelegram._utils.typesr	   Útelegramr
   r   © r    r   ú<module>r?      sä   ðð& MÐ Là Ð Ð Ð Ø $Ð $Ð $Ð $Ð $Ð $Ø  Ð  Ð  Ð  Ð  Ð  à 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø >Ð >Ð >Ð >Ð >Ð >Ø QÐ QÐ QÐ QÐ QÐ QÐ QÐ QØ *Ð *Ð *Ð *Ð *Ð *àð ØÐÐÐÐÐðQ3ð Q3ð Q3ð Q3ð Q3�.ñ Q3ô Q3ð Q3ð Q3ð Q3r    