L i2dZddlZddlmZddlmZmZddlm Z ddl m Z ddl m Z mZddlmZerdd lmZGd d e Zy) zFThis module contains an object that represents a Telegram WebhookInfo.N)Sequence) TYPE_CHECKINGOptional)TelegramObject)parse_sequence_arg)extract_tzinfo_from_defaultsfrom_timestamp)JSONDict)BotceZdZdZdZ ddddedededee jd eed eed ee ed eed ee jdee ffdZ edde dedddffd ZxZS) 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_updateshas_custom_certificate ip_addresslast_error_datelast_error_messagelast_synchronization_error_datemax_connectionspending_update_counturlN api_kwargsrrrrrrrrrrc  t || ||_||_||_||_||_||_||_t||_ | |_ |j|j|j|j |j |j|j|j|jf |_ |jy)Nr)super__init__rrrrrrrrrr _id_attrs_freeze) selfrrrrrrrrrr __class__s [/mnt/ssd/data/python-lab/Trading/venv/lib/python3.12/site-packages/telegram/_webhookinfo.pyrzWebhookInfo.__init__|s J/,B#)=!*47F1C.=0B?0S + , HH  ' '  % % OO   # #    0 0   databotr returnc|j|}t|}t|jd||d<t|jd||d<t|||S)z,See :meth:`telegram.TelegramObject.de_json`.r)tzinfor)r"r#) _parse_datarr getrde_json)clsr"r# loc_tzinfors r r)zWebhookInfo.de_jsonspt$2#6 "0:K1LU_"` 2@ HH6 7 3  ./wDc22r!)NNNNNN)N)__name__ __module__ __qualname____doc__ __slots__strboolintrdtmdatetimerr r classmethodr) __classcell__)rs@r r r "sKZ I"37,0)-37$(BF**.* *!%*" * "#,,/ * %SM *"#*"(3-0*SM**2#,,)?*X&*X 38 3(5/ 3] 3 3r!r )r/r5r4collections.abcrtypingrrtelegram._telegramobjectrtelegram._utils.argumentparsingrtelegram._utils.datetimerr telegram._utils.typesr telegramr r r!r r@s4&M$*3>Q*S3.S3r!